The Voice Interface uses Google’s Cloud Speech API, which requires registration.
If you followed along with the MagPi when you assembled your AIY Project, then you will already have a Google account and a credentials.json file. If not then you need to follow the instructions to register and obtain this file.
You may also want to modify entries in the preferred_phrases list on line 111 of speech_reco.py. These provide hints to the google speech recognition engine. I’m not convinced they make much difference, but for difficult to understand words they may improve reliability.
To generate a Snowboy .pmdl file containing the pattern for your watchword, pop along to the snowboy site, register for a free account and follow the instructions to record or download a file. I chose to use the most common watchword on the snowboy site, Alexa, as it had the most samples and would theoretically be the most reliable watchword. You should experiment with whatever word you choose.
So, on to system testing…
All resources used in this project are available at the following address:
At various stages in the project, I provide download commands that fetch the database scripts, code files and supporting files required to make the stage function.
In addition there is a setup script and a complete SD Card Image file for anyone wanting to implement the project without working through the posts.
Using the setup script
This is the preferred quick way to setup a home hub, as compiled resources will be built on the target machine. If you have the raspbian os installed, you can fetch the setup script with the following command…
edit the script to customise the settings…
make the script executable…
sudo chmod +x setup.sh
and then run it…
This procedure will install all the necessary software and produce a working skeleton hub.
Using the SD Card Image
If you want to use the sd card image then you will need to:
1. Download it
2. Unzip it to a .img file
3. Write it to an sd card
4. Insert into pi and boot
5. Login over ssh with pi/raspberry
6. Use sudo raspi-config to expand root filesystem and change password
7. reboot and enjoy