Google Assistant on Pi with Extended Features

Voice Activated Google Assistant for all Raspberry Pi Boards

Similar projects worth following
1. Headless auto start on boot with multiple custom wakeword activation triggers.
2. Voice control of GPIOs without IFTTT,, Actions SDK.
3. Voice control of NodeMCU without IFTTT and MQTT.
4. Radio streaming.
5. Voice control of servo connected to RPi GPIO.
6. Safe shutdown RPi using voice command.
7. Stream Music from YouTube.
8. Indicator lights for assistant listening and speaking events.
9. Startup audio and audio feedback for wakeword detection.

Project Git Page:

Related videos:

Though the above video shows the AIY kit, its Google Assistant SDK running inside.

  • 1 × Google Assistant SDK
  • 1 × Raspberry Pi 3 B
  • 1 × Microphone
  • 1 × Speaker
  • 1 × Memory card

View all 6 components

View all 4 project logs

  • 1

    Open the terminal and execute the following

    git clone
  • 2

    1. Update OS and Kernel

    sudo apt-get update  sudo apt-get install raspberrypi-kernel  

    2. Restart Pi

    3. Choose the audio configuration according to your setup. (Run the commands till you get .bak notification in the terminal)

    3.1. USB DAC or USB Sound CARD 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/  

    3.4. USB MIC AND AUDIO JACK users,

    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

    4. Restart Pi

    5. Check the speaker using the following command

    speaker-test -t wav  
  • 3
    GPIO Number (BCM)Purpose
    05 and 06Google assistant listening and responding
    22Snowboy wakeword indicator
    23,24,25Voice control of devices connected to GPIO
    27Voice control of servo

    Note: some HATS may use GPIOs 18, 19, 20, 21 for I2S audio please refer to the manufacturer's pinouts

View all 11 instructions

Enjoy this project?



Danny Martin wrote 5 days ago point

Hello again Sid, I have a working question. I have my Google Assistant up and working, but it awakes with almost any sound, not just OK Google. Is there someway to adjust the sensitivity of the mic?



  Are you sure? yes | no

shivasiddharth wrote 2 hours ago point

Hello Danny, 

Is that the snowboy service or the ok google service ?

  Are you sure? yes | no

Danny Martin wrote 11/14/2017 at 19:03 point

Hello Sid, I just noticed that my Google Assistant responds to the wakeword Alexa as well as Ok Google. When I ask Alexa some simple commands it responds. However I have an Alexa Account where I can turn on and off multiple lights, etc using Alexa, but when I ask my Google Assistant (Alexa) to turn of a designated light she says to check my Google App to be sure this is connected. Can you tell me if any of my Alexa commands can work under this configuration? And if so how do I set things up.



  Are you sure? yes | no

shivasiddharth wrote 11/15/2017 at 14:16 point

The "Alexa" is a custom wakeword  for google assistant. (For those who dont want to use "Hey Google" or  "Ok-Google").

Google Assistant does not support emulated devices like emulated Philips Bridge or Wemo switch. If you have one of those original devices then, you can add them in your google home app. But am not sure whether it would work with Pi or whether you need the official Google Home

  Are you sure? yes | no

Danny Martin wrote 11/06/2017 at 23:18 point

Hey Sid, I have the Nodemcu example set up on a breadboard with the three leds, I have the power going to the long leg of the LED and the short pin on device 1 connected to D1 on the Wemos, device 2 connected to D2, and device 3 connected to D3. When the Wemos is first connected all the lights are on. I have to issue the voice command "Hey Google, turn off wireless device 1" to get the light to come on. Everyone takes the opposite command to function. (Off =ON and On = Off)?? Is there something I am doing wrong?



PS It appears to be the same scenario using the web interface.

  Are you sure? yes | no

shivasiddharth wrote 11/06/2017 at 23:38 point

Do not supply the LEDs with 5V or 3.3V i guess that is what is causing the issue. When you are supplying the voltage directly to LEDs, initially the pins D1, D2 and D3 are pulled low, so they are acting as sink and hence you have the LEDs ON.  Long legs should be connected to Wemos D1, D2 and D3 and short legs to wemos grnd. 

  Are you sure? yes | no

Danny Martin wrote 11/07/2017 at 01:14 point

Thanks Sid that was the problem. It was difficult to see from your video and I did not see a schematic.

  Are you sure? yes | no

shivasiddharth wrote 11/07/2017 at 21:33 point

As the wiring was a very basic one, i did not include a wiring diagram.

  Are you sure? yes | no

Danny Martin wrote 11/05/2017 at 15:16 point

Sid in your video Add a Google Like Neopixel Indicator, your circuit diagram is different from the one you can download. In the video you show the GPIO pins different you have connected Pins 27 and 24 to the Wemos board. In the Fritz file you show Pins 18 and 17. Also you mention files attached to the video. Also where is the modified

Thanks again,


PS I am following and making a lot of your great project.s

  Are you sure? yes | no

shivasiddharth wrote 11/05/2017 at 16:15 point


I made that video in June. Later added some features that required the GPIO 24 and 27, so moved the GPIO to 17 and 18. And after that some AIY users showed interest and also i made the custom HAT which needed the GPIO 18, so changed the neopixel GPIOs to 5 and 6. Right now, the neopixel GPIOs are 5 and 6. Please check the GPIO utilization table in the git.

Thanks for pointing it out, i have just updated the Fritz file in the Git. The in the project folder is already modified to accommodate the indicator leds (Plug and play).

Always the GPIO that i mention in the Git is what matters. Video is just for a reference.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates