- Support Alexa Voice Service API v20160207
- Support multiple audio players: gstreamer 1.0, mpv and mpg123
- 支持Baidu DuerOS
-
Player
We have 3 players (
mpv
,mpg123
and gstreamer) to use.SpeechSynthesizer
andAlerts
prefermpg123
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 ofAudioPlayer
using the environment variablePLAYER
. -
Recorder
2 recorders (pyaudio &
arecord
) are available. We can use environment variableRECORDER
to specify the recorder. For example, runRECORDER=pyaudio alexa-tap
will use pyaudio as the recorder. By default,arecord
is used as the recorder. -
Keyword detector (optional)
Use PocketSphinx or Snowboy. To use pocketsphinx, install respeaker python library and pocketsphinx. To use Snowboy, go to Snowboy's Github 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
-
For ReSpeaker Core (MT7688)
gstreamer1.0, pyaudio and pocketsphinx and respeaker python library are already installed by default, just run
pip install avs
-
For Debian/Ubuntu/Raspbian
sudo apt-install mpg123 mpv sudo apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ gir1.2-gstreamer-1.0 python-gi python-gst-1.0 sudo apt-get install python-pyaudio