GassistPi (Google Home in Raspberry Pi)




Introduction: GassistPi (Google Home in Raspberry Pi)

About: My hobby is to create games and explore other things like IOT

Google Assistant for Raspberry Pi!

Step 1: Gathering Materials & Tools

  1. Raspberry Pi 3 Model B (You can also use other raspberry pi version but you need Wi-Fi to run this)
  2. 8GB Micro SD Card
  3. Micro SD Card Reader
  4. USB Microphone
  5. USB Powered Speakers
  6. 3.5mm Jack Splitter
  7. 5V 2A USB Power Adaptor
  8. Micro USB Cable
  9. Female to Male Jumper Cables
  10. Breadboard
  11. LEDs (any color you want)
  12. Phillips Screwdriver
  13. Phillips Screws
  14. Electrical Tape
  15. Soldering Iron & Stand
  16. Soldering Lead
  17. Wire Cutter
  18. Ketchup Jug (I've already cut it :) )
  19. 100/150/330 ohms resistor

Step 2: Flashing Raspbian to Micro SD Card

  1. Download Raspbian or Raspbian Lite
  2. Download & Install Etcher
  3. Plug the Micro SD Card Reader with the Micro SD Card in it.
  4. Open Etcher
  5. Click on Select Image and browse the download location of Raspbian/RaspbianLite Zip
  6. Click on Select Drive and find the drive of your micro sd card reader.
  7. Then lastly click on "Flash!"

This could take 10-30 minutes so sit back, relax and eat pie :)

Step 3: Power Up Your Raspberry Pi!

Now after we flash the micro sd card we may now able to boot this raspberry pi to raspbian :)

Plug the raspberry pi to your monitor with the hdmi cable.

Step 4: Installing GassistPi

Now after you boot up your raspberry pi you may now go this Github Repository of GassistPi and you may also follow the guide there.

1. Open terminal and clone the repository

git clone <a href="" rel="nofollow"></a>

2. Update OS and Kernel

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

3. Restart your Raspberry Pi After booting up open your terminal again and execute this command because we'll going to use usb mic and the onboard audio jack (PLUG YOUR USB MIC AND SPEAKER FIRST BEFORE EXECUTING THE COMMAND)

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

4. Download credentials--->.json file (refer to this doc for creating credentials

5. Place the .json file in/home/pi directory

6. Rename it to assistant.json

7. Using the one-line installer for installing Google Assistant and Snowboy dependencies Pi3 and Armv7 users use the "" installer and Pi Zero, Pi A and Pi 1 B+ users use the "" installer. Snowboy installer is common for both

7.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/ 

7.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/GassistPi/scripts/ 
sudo  /home/pi/GassistPi/scripts/ 
sudo  /home/pi/GassistPi/scripts/ 

8. Copy the google assistant authentication link from terminal and authorize using your google account

9. Copy the authorization code from browser onto the terminal and press enter

10. Move into the environment and test the google assistant according to your board

source env/bin/activate 
(say the hotword "ok google")
source env/bin/activate

11. To make our google assistant autostart when the raspberry pi is on run this commands

sudo chmod +x /home/pi/GassistPi/scripts/
sudo /home/pi/GassistPi/scripts/
sudo systemctl enable gassistpi-ok-google.service
sudo systemctl enable snowboy.service
sudo systemctl start gassistpi-ok-google.service
sudo systemctl start snowboy.service

12. Restart your raspberry pi and your google assistant will autostart

Step 5: Customization of Your GassistPi

To feel the real "Google Home" we will be adding custom sounds and led light response.

Changing the sounds

Download my custom sounds

1. Put the downloaded sounds in /home/pi/GassistPi/sample-audio-files

2. Now go to /home/pi/GassistPi/src then open

3. Find & Replace Startup.wav to on.wav

4. Find & Replace Fb.wav to respond.wav

5. Then Save

Adding LED Lights Response

In GassistPi Pin 05 & Pin 06 is Google assistant listening and responding but we'll be adding an extra led to let us know if google assistant is started

In we'll add in #Indicator Pins

GPIO.output(13, GPIO.HIGH)


GPIO.output(13, GPIO.LOW)


GPIO.output(13, GPIO.HIGH)

You can download the and replace your in /home/pi/GassistPi/src

Step 6: Enclosure

I know you can make much more beautiful enclosure :) but i'll show you on how i make this enclosure for my Google Assistant :)

I transfer the leds from breadboard to female to female jumper cables.

My father helps me to saw the scrap wood for the base and middle for the enclosure.

The base wood i attached 1 speaker on it.

The middle wood i attached the 2 speaker at the bottom and raspberry pi at the top

The leds, i use hot glue to attach it at the top of enclosure

For speakes holes and microphone holes, i use my soldering iron to put holes at the bottom of my enclosure and 2 holes at the top.

Step 7: Conclusion.

This project cost less than $50 (Php 2563.70) to make.

This GassistPi project can also helps you to automate your house. It can trigger On/Off relay.

I also added LightshowPi ( in this project so when i play music on it the lights will follow on it :)

If this project is awesome please vote this entry for "Raspberry Pi" & "Wireless" contest :) Thanks!

Wireless Contest

Participated in the
Wireless Contest

Raspberry Pi Contest 2017

Participated in the
Raspberry Pi Contest 2017

Be the First to Share


    • Make It Modular: Student Design Challenge

      Make It Modular: Student Design Challenge
    • Hot Glue Speed Challenge

      Hot Glue Speed Challenge
    • Remote Control Contest

      Remote Control Contest



    Question 4 years ago on Step 7

    One more thing.. Following your guide to the letter: When the conversation starts Pin 6 lights up, when teh conversation stop and teh response starts pin 6 stays lit and blinks. I cannot get pin 5 to work as you instruct at all. I'm looking at the lines in and convo_started, convo_finished, responding_started, responding_finished are correct. Pin 6 for responding and pin 5 for conversation.


    Question 4 years ago on Step 7

    Great Instructable! I have a question though.. at teh bottom you mention using GPIO pin 13 for a 3rd led. You have a typo in your instructions.. I assume by:

    ON_CONVERSATION_TURN_STARTED you actually mean ON_CONVERSATION_TURN_FINISHED in the last line. Meaning the pin is hot when there is no conversation and off when there is. Is this correct?