Turn your raspberry pi into a client for Amazon's Alexa service.
This is compatible with Raspberry Pi 3 (and probably 2).
- A Raspberry Pi 3 (or 2)
- An SD Card with a fresh install of Raspbian Jessie
- An External Speaker with 3.5mm Jack
- A USB Microphone
- A push to make button connected to GPIO 26 and ground
You need to obtain a set of credentials from Amazon to use the Alexa Voice service.
- login at http://developer.amazon.com/login.html
- Go to Alexa then Alexa Voice Service.
- Create a new product type as a Device and give it a name.
- Create a new security profile,
- Under the web settings allowed origins put http://localhost:5000 and/or http://my_ip_address:5000
- Under return URL put http://localhost:5000/code and/or http://my_ip_address:5000
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-pip python-dev
sudo apt-get install python-alsaaudio libasound2-dev mpg123 python-alsaaudio
sudo pip install -r requirements.txt
chmod +x service_raspberryecho.sh
sudo cp service_raspberryecho.sh /etc/init.d/RaspberryEcho
sudo update-rc.d RaspberryEcho defaults
touch /var/log/raspberryecho.log
Open the amazon.ini and fill out the values with your credentials.
Then run,
python ./authenticate.py
Get your IP
echo $(hostname -I)
Then, Open http://my_ip_address:5000/
A screen will open. At this point you have to "ALLOW" the application.
Once, approved, you will get a Success with you token
Installation completed. At this point you can either reboot or start the service manually.
Then, press the button and talk with Alexa, she will reply back!