From 3c0c3fbb139e53cbf1339c80117437b875220527 Mon Sep 17 00:00:00 2001 From: Yihui Xiong Date: Wed, 23 May 2018 19:06:51 +0800 Subject: [PATCH] 0.4.0 --- HISTORY.rst | 6 ++++++ README.md | 23 +++++++++++++++-------- setup.py | 4 ++-- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index bff2f88..3f0b39d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,12 @@ History ======= +0.4.0 (2018-5-23) +------------------ + +* rewrite directive parser, fix an issue when EOL is in MP3 octet-stream +* add a new recorder using ALSA arecord as lots of forks reported that they were confused by the log of pyaudio (portaudio) + 0.3.0 (2018-5-21) ------------------ diff --git a/README.md b/README.md index 44cccb0..1511949 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,20 @@ Python Alexa Voice Service App ### Requirements -Choose a player from `mpv`, `mpg123` and gstreamer. -`SpeechSynthesizer` and `Alerts` prefer `mpg123` as it is more responsive. -`AudioPlayer` likes gstreamer > `mpv` > `mpg123`. Gstreamer supports more audio format and works well on raspberry pi. We can also specify the player of `AudioPlayer` using the environment variable `PLAYER`. +1. Player -* one of mpg123, mpv and gstreamer 1.0 -* python-pyaudio -* respeaker python library, pocketsphinx and snowboy (optional, for hands-free keyword spotting) + We have 3 players (`mpv`, `mpg123` and gstreamer) to use. + `SpeechSynthesizer` and `Alerts` prefer `mpg123` which is more responsive. + `AudioPlayer` likes gstreamer > `mpv` > `mpg123`. Gstreamer supports more audio format and works well on raspberry pi. We can also specify the player of `AudioPlayer` using the environment variable `PLAYER`. + +2. Recorder + + 2 recorders (pyaudio & `arecord`) are available. We can use environment variable `RECORDER` to specify the recorder. For example, run `RECORDER=pyaudio alexa-tap` will use pyaudio as the recorder. By default, `arecord` is used as the recorder. + +3. Keyword detector (optional) + + Use PocketSphinx or Snowboy. To use pocketsphinx, install respeaker python library and pocketsphinx. + To use Snowboy, go to [Snowboy's Github](https://github.com/Kitt-AI/snowboy) to install it. >If you use raspberry pi and gstreamer, it is likely that gstreamer's default audio sink is GstOMXHdmiAudioSink. It ignores ALSA configurations and outputs audio to HDMI. If you don't want to use HDMI audio output, you should run `sudo apt remove gstreamer1.0-omx gstreamer1.0-omx-rpi` @@ -36,7 +43,7 @@ Choose a player from `mpv`, `mpg123` and gstreamer. ### Get started -1. run ``alexa-audio-check`` to check if recording & playing is OK. If RMS is not zero, recording is OK, if you can hear alarm, playing is OK +1. run `alexa-audio-check` to check if recording & playing is OK. If RMS is not zero, recording is OK, if you can hear alarm, playing is OK $alexa-audio-check RMS: 41 @@ -56,7 +63,7 @@ Choose a player from `mpv`, `mpg123` and gstreamer. 2. run `alexa`, then use "alexa" to start a conversation with alexa, for example, "alexa, what time is it" #### Using Snowboy for Keyword Spotting -1. Install [Snowboy](https://github.com/Kitt-AI/snowboy) python library +1. Install [Snowboy](https://github.com/Kitt-AI/snowboy) 2. Install voice-engine python library `sudo pip install voice-engine` diff --git a/setup.py b/setup.py index 98eb9be..8f0a5f9 100644 --- a/setup.py +++ b/setup.py @@ -28,8 +28,8 @@ setup( name='avs', - version='0.3.0', - description="Python implementation of Alexa Voice Service App", + version='0.4.0', + description="Alexa Voice Service Python SDK", long_description=long_description, long_description_content_type='text/markdown', author="Yihui Xiong",