Amazon alexa on raspberry pi.
To install alexa on your raspberry pi you'll need:
Once you have installed your os, run:
cd $HOME
mkdir /opt/alexa
cd /opt/alexa
sudo chown -R pi:pi ../
Follow instructions to install alexa device sdk from amazon's website.
Remember to replace /home/pi/
with /opt/alexa
when running any script from the guide bellow.
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
git clone https://github.com/vanelk/alexa-pi.git
cd alexa-pi
pip install -r requirements.txt
npm install
sudo apt install mpg123
In folder where you cloned this project, run:
npm start
Wait for the Hello sound to confirm activation. Try saying Alexa followed by your query. For example:
To run the script on device start we will use the systemd service.
sudo install -Dm644 ./scripts/alexapi.service /usr/lib/systemd/system/alexapi.service
sudo systemctl daemon-reload
Check if it is actually running
sudo systemctl start alexapi
systemctl status alexapi
If you see Running
just press q
to exit and run
sudo systemctl enable alexapi
After this you are all set and after rebooting your pi you should hear the hello sound indicating the app have started
reboot