I picked up the AIY Google Assistant kit from MicroCenter the other day. Man it is a cool project. All the instructions you need to get up and rolling are in the box. The MicroCenter deal came with the Raspberry Pi 3 included and only cost 35$, essentially you get the kit for free.
After the build I wanted a way to start the Google Voice Python script on startup. The AIY project site has great instructions that I will summarize here.
After the build I wanted a way to start the Google Voice Python script on startup. The AIY project site has great instructions that I will summarize here.
- Create a new file in /home/pi called voice_assistant.service using the command: sudo nano /home/pi/voice_assistant.service
- Enter the following text into the file
Description=My awesome assistant app
[Service]
ExecStart=/bin/bash -c '/home/pi/AIY-voice-kit-python/env/bin/python3 -u src/assistant_library_demo.py'
WorkingDirectory=/home/pi/AIY-voice-kit-python
Restart=always
User=pi
[Install]
WantedBy=multi-user.target - Move the file to the correct folder using this command: sudo mv voice_assistant.service /lib/systemd/system
- Enable your service: sudo systemctl enable voice_assistant.service
- Start your service: sudo service voice_assistant start
- Reboot the pi: reboot
- After reboot check the status of the service: sudo service voice_assistant status
- The status should be started and you should be able to say "Okay Google"