Artificial intelligence (AI, also machine intelligence, MI) is intelligence exhibited by machines, rather than humans or other animals (natural intelligence, NI). In computer science, the field of AI research defines itself as the study of "intelligent agents": any device that perceives its environment and takes actions that maximise its chance of success at some goal.
**Works with Raspberry Pi 3
1. Headless auto start on boot with multiple wakeword activation trigger.
2. Startup audio and audio feedback for wakeword detection.
This is implemented in Python2 so your existing Google Assistant may not work. So please start by making a fresh copy of latest Raspbian
After extartcting the project rename it to Personal-AssistPi in /home/pi/ directory
INSTALL AUDIO CONFIG FILES
- Choose the audio configuration according to your setup.
(Run the commands till you get .bak notification in the terminal)
1.1. USB DAC users,
sudo chmod +x /home/pi/Personal-AssistPi/audio-drivers/USB-DAC/scripts/install-usb-dac.sh
sudo /home/pi/Personal-AssistPi/audio-drivers/USB-DAC/scripts/install-usb-dac.sh
1.2. USB MIC AND HDMI users,
sudo chmod +x /home/pi/Personal-AssistPi/audio-drivers/USB-MIC-HDMI/scripts/install-usb-mic-hdmi.sh
sudo /home/pi/Personal-AssistPi/audio-drivers/USB-MIC-HDMI/scripts/install-usb-mic-hdmi.sh
1.3. USB MIC AND AUDIO JACK users,
sudo chmod +x /home/pi/Personal-AssistPi/audio-drivers/USB-MIC-JACK/scripts/usb-mic-onboard-jack.sh
sudo /home/pi/Personal-AssistPi/audio-drivers/USB-MIC-JACK/scripts/usb-mic-onboard-jack.sh
Those Using HDMI/Onboard Jack, make sure to force the audio
sudo raspi-config
Select advanced options, then audio and choose to force audio
Those using any other DACs or HATs install the cards as per the manufacturer's guide and then you can try using the USB-DAC config file after changing the hardware ids
-
Restart Pi
-
Check the speaker using the following command
speaker-test -t wav
CONTINUE AFTER SETTING UP AUDIO
-
Download credentials--->.json file (refer to this doc for creating credentials https://developers.google.com/assistant/sdk/develop/python/config-dev-project-and-account)
-
Place the .json file in/home/pi directory
-
Rename it to assistant--->assistant.json
-
Using the one-line installer for installing Google Assistant and Snowboy dependencies
Pi3 and Armv7 users use the "gassist-installer-pi3.sh" installer and Pi Zero users use the "gassist-installer-pi-zero.sh" installer. Snowboy installer is common for both
4.1 Make the installers Executablesudo chmod +x /home/pi/Personal-AssistPi/scripts/gassist-installer-pi3.sh sudo chmod +x /home/pi/Personal-AssistPi/scripts/snowboy-deps-installer.sh
4.2 Execute the installers (Run the snowboy installer first. Don't be in a hurry and Don't run them parallely, Run them one after the other
sudo /home/pi/Personal-AssistPi/scripts/snowboy-deps-installer.sh sudo /home/pi/Personal-AssistPi/scripts/gassist-installer-pi3.sh
-
Copy the google assistant authentication link from terminal and authorize using your google account
-
Copy the authorization code from browser onto the terminal and press enter
-
Move into the environment and test the google assistant according to your board
source env/bin/activate
google-assistant-demo
googlesamples-assistant-pushtotalk
- After verifying the working of assistant, close and exit the terminal
HEADLESS AUTOSTART ON BOOT SERVICE SETUP
- Make the service installer executable
sudo chmod +x /home/pi/Personal-AssistPi/scripts/service-installer.sh
- Run the service installer
sudo /home/pi/Personal-AssistPi/scripts/service-installer.sh
- Enable the services
sudo systemctl enable gassistpi-ok-google.service
sudo systemctl enable snowboy.service
- Start the service
sudo systemctl start gassistpi-ok-google.service
sudo systemctl start snowboy.service
RESTART and ENJOY
Thanks to
Google Cloud Network grpc.io for Remote Procedure Calls (gRPC Protocol) Pi 3 Installer has been forked and modified from Shivasiddharth