Skip to content

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongyihui committed Mar 28, 2018
1 parent d459acd commit 929cd67
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 97 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
History
=======

0.2.0 (2018-3-28)
------------------

* support using mpg123 or mpv as player

0.1.1 (2017-12-29)
------------------

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include AUTHORS.rst
include CONTRIBUTING.rst
include HISTORY.rst
include LICENSE
include README.rst
include README.md

recursive-include avs *
recursive-include tests *
Expand Down
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Python Alexa Voice Service App
==============================

[![](https://img.shields.io/pypi/v/avs.svg)](https://pypi.python.org/pypi/avs)
[![](https://img.shields.io/travis/respeaker/avs.svg)](https://travis-ci.org/respeaker/avs)

### Features
* Support Alexa Voice Service API v20160207
* Support multiple audio players: gstreamer 1.0, mpv and mpg123
* 支持[DuerOS](https://github.com/respeaker/avs/wiki/%E4%BD%BF%E7%94%A8DuerOS%E7%9A%84AVS%E5%85%BC%E5%AE%B9%E6%9C%8D%E5%8A%A1)


### Requirements

Choose a player from `mpv`, `mpg123` and gstreamer.
`SpeechSynthesizer` and `Alerts` prefer `mpg123` as it is more responsive.
`AudioPlayer` likes `mpv` > gstreamer > `mpg123` as `mpv` and gstreamer support more audio format. We can also specify the player of `AudioPlayer` using the environment variable `PLAYER`.

* one of mpg123, mpv and gstreamer 1.0
* python-pyaudio
* respeaker python library and pocketsphinx (optional, for hands-free keyword spotting)


### Installation
* For ReSpeaker Core (MT7688)

gstreamer1.0, pyaudio and pocketsphinx and respeaker python library are already installed by default, just run `pip install avs`

* For Ubuntu/Debian

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
sudo pip install avs respeaker pocketsphinx # requires gcc toolchain and libpulse-dev

### 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

$alexa-audio-check
RMS: 41
RMS: 43

2. run `alexa-auth` to login Amazon, it will save authorization information to `~/.avs.json`
3. run `alexa-tap`, then press Enter to talk with alexa
4. run `alexa`, then use "alexa" to start with conversation with alexa, for example, "alexa, what time is it"

>If you want to use a specified player, use the environment variable `PLAYER` to specify it, such as `PLAYER=mpv alexa-tap` or `PLAYER=mpg123 alexa` or `PLAYER=gstreamer alexa`
### To do
* Speaker interface
* Notifications interface

### Change Alexa Voice Service client id and product id
If you want to use your own client id and product id, try:

1. [register for an Amazon Developer Account](https://github.com/alexa/alexa-avs-raspberry-pi#61---register-your-product-and-create-a-security-profile)

2. create a file named config.json with your product_id, client_id and client_secret

{
"product_id": "x",
"client_id": "y",
"client_secret": "z"
}

3. run `alexa-auth -c config.json`

4. run `alexa-tap` or `alexa`

### License
GNU General Public License v3


### Credits
This project is based on [nicholas-gh/python-alexa-client](https://github.com/nicholas-gh/python-alexa-client)

This package was created with Cookiecutter_ and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template.
96 changes: 0 additions & 96 deletions README.rst

This file was deleted.

0 comments on commit 929cd67

Please sign in to comment.