Multiple Custom Wakewords Activation of Google Assistant

Voice activate Google Assistant SDK on Pi using multiple custom wakewords. Works on Pi 3 and Pi Zero W.

This has been implemented using Snowboy for the hotword service. For some “Mysterious” reason, the assistant.start_conversation of the SDK does not seem to work for forcefully initiated custom wakewords. So I have used the gRPC for custom wakewords and SDK for “Hey Google” wakeword.

Works with Pi3 as well as Pi Zero Pi Zero – forked and modified from warchildmd's repo (


  • Headless auto start on boot with multiple wakeword activation trigger.
  • Locally Control GPIOs without IFTTT, API.AI, ACTIONS.
  • Startup audio and audio feedback for wakeword detection.
  • Safe shutdown RPi using voice command.

Features coming soon:

  • Mute button.
  • Neopixel indicator without Arduino.

This is implemented in Python2 so your existing Google Assistant may not work. So please start by making a fresh copy of latest Raspbian.

Install Audio Config Files

  • Update OS and Kernel
sudo apt-get update  
sudo apt-get install raspberrypi-kernel  
  • Restart Pi
  • Choose the audio configuration according to your setup. (Run the commands till you get .bak notification in the terminal)

3.1. USB DAC users:

sudo chmod +x /home/pi/GassistPi/audio-drivers/USB-DAC/scripts/
sudo /home/pi/GassistPi/audio-drivers/USB-DAC/scripts/ 

3.2. AIY-HAT users:

sudo chmod +x /home/pi/GassistPi/audio-drivers/AIY-HAT/scripts/
sudo /home/pi/GassistPi/audio-drivers/AIY-HAT/scripts/  
sudo chmod +x /home/pi/GassistPi/audio-drivers/AIY-HAT/scripts/  
sudo /home/pi/GassistPi/audio-drivers/AIY-HAT/scripts/ 

3.3. USB MIC AND HDMI users:

sudo chmod +x /home/pi/GassistPi/audio-drivers/USB-MIC-HDMI/scripts/ 
sudo /home/pi/GassistPi/audio-drivers/USB-MIC-HDMI/scripts/ 


sudo chmod +x /home/pi/GassistPi/audio-drivers/USB-MIC-JACK/scripts/
sudo /home/pi/GassistPi/audio-drivers/USB-MIC-JACK/scripts/ 

3.5. CUSTOM VOICE HAT users:

sudo chmod +x /home/pi/GassistPi/audio-drivers/CUSTOM-VOICE-HAT/scripts/
sudo /home/pi/GassistPi/audio-drivers/CUSTOM-VOICE-HAT/scripts/  
sudo chmod +x /home/pi/GassistPi/audio-drivers/CUSTOM-VOICE-HAT/scripts/  
sudo /home/pi/GassistPi/audio-drivers/CUSTOM-VOICE-HAT/scripts/ 

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
  • 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 “” installer and Pi Zero users use the “” installer. Snowboy installer is common for both.

4.1 Make the installers executable:

sudo chmod +x /home/pi/GassistPi/scripts/
sudo chmod +x /home/pi/GassistPi/scripts/ 
sudo chmod +x /home/pi/GassistPi/scripts/    

4.2 Execute the installers (Run the snowboy installer first. Don't be in a hurry and Don't run them in parallel, Run them one after the other:

sudo  /home/pi/GassistPi/scripts/ 
sudo  /home/pi/GassistPi/scripts/ 
sudo  /home/pi/GassistPi/scripts/    
  • 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  
  • 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/GassistPi/scripts/ 
  • Run the service installer:
sudo /home/pi/GassistPi/scripts/
  • Enable the services: Pi3 and Armv7 users enable both the services for custom wakewords. Pi Zero users enable snowboy services alone:
sudo systemctl enable gassistpi-ok-google.service 
sudo systemctl enable snowboy.service
  • Start the service: Pi3 and Armv7 users start both the services for custom wakewords. Pi Zero users start snowboy services alone:
sudo systemctl start gassistpi-ok-google.service 
sudo systemctl start snowboy.service   

Restart and enjoy!

Voice Control of GPIOs and Pi Shutdown

The default GPIO and shutdown trigger word is “trigger” if you wish to change the trigger word, you can replace the ‘trigger'in the folder) and folder) code with your desired trigger word.

Similarly, you can define your own device names under the variable name var.

The number of GPIO pins declared should match the number of devices.

For NeoPixel Indicator

  • Replace the in src folder with the from Neopixel Indicator Folder.
  • Reboot
  • Change the Pin numbers in the given sketch according to your board and upload it.

Source: Multiple Custom Wakewords Activation of Google Assistant

About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top