Introduction: Voice Activated Google Assistant for Raspberry Pi

Picture of Voice Activated Google Assistant for Raspberry Pi

On this Instructablel I will be showing you how you can allow voice activation on your Google Assistant on your Raspberry Pi.

It's way more simple that you'll thought. Hope that you like it and thanks for reading this.

Step 1: What You'll Need

Step 2: Set Everything Up

Picture of Set Everything Up

Log into your Raspbian with PIXL Desktop.

Open up a Web Browser and go to ""

Log into your Google Account.


Give it any name you like and click "Create"

Wait for your project to show and then click the three dots on the project's name.

Click on the three little lines at the top left of the page, then select "API Manager"

Click on the dropdown menu.

Hit all, then select your project.

Type "Google assistant" on the search bar, this will make the searching process a lot quicker and easier.

Click on the "Google Assistant API" and then click "Enable"

Step 3: OAuth Key

Picture of OAuth Key

Go to the bar on the left and select "Credentials" and then click on the "OAuth Consent Screen"

Hit on "Create Credentials", then select "OAuth client ID"

In the next screen, choose "Other" and give it any name that you want.

Hit "Ok" and then move your mouse over to an arrow pointing down at the right of the screen, click on it to download your Credentials file.

Step 4: Enable Permissions

Picture of Enable Permissions

Head over to ""

Scroll down and activate the following controls:

  • Web & App Activity
  • Location History
  • Device Information
  • Voice & Audio Activity

Step 5: Download and Install Dependencies

Picture of Download and Install Dependencies

Open up the Command Prompt.

Update your System.

Once it finishes, type in "sudo apt-get install python3-dev python3-venv" press "Enter" and wait for it to finish.

When the download finishes, type in "python3 -m venv env"

Once you enabled that, type "env/bin/python -m pip install –upgrade pip setuptools –upgrade" and press "Enter"

Type "source env/bin/activate" to get into the enviroment.

Step 6: Run Your Assistant

Picture of Run Your Assistant

Type in "python -m pip install –upgrade and then press "Enter"

After it finishes downloading, run the OAuth tool by typing "python -m pip install –upgrade google-auth-oauthlib[tool]"

Type in "google-oauthlib-tool –client-secrets /home/pi/Downloads/client_secret_client-idxxx.json –scope –save –headless". Replace "idxxx" with your project's ID number.

An URL will be displayed, right click on it, select "Copy" then paste it on your browser.

Copy the Auth key.

Go to the Terminal, right lick on it and then hit "Paste" to paste the Authentication Key.

Step 7: Start Google Assistant

Picture of Start Google Assistant

You can start enjoying your Google Assistant with voice recognition by typing "google-assistant-demo"

Enjoy your shiny new voice recognition on your Raspberry Pi-based Google Assistant.

And that's it, I hope that you liked this Instructable, if you have any problem, suggestion or comment, leave it down below.


Kumarmohan7 (author)2017-07-09


I use this voice activation Google Assistant through USB Sound Card,

Its working fine,

But i want use Bluetooth Speaker & Mic

Please Help to how to Configure Bluetooth Speaker & Mic in Raspberry Pi for Google Assistant

if u know please help to i will try....

Thanks & Regards


AndreasH1 (author)Kumarmohan72017-08-13

how did you get the usb sound card to work? My sound card is working but not with google.


dsnaith (author)2017-07-18

Thanks SO much for posting this. Unfortunately, I was trying it on a Pi Zero W, and I found out in the last step that the SDK only supports ARM7L, not the ARM6L used in the Zero. It sucks, but I was looking for an excuse to buy a Pi 3b, and now I have one.

A couple of notes to help others where I stumbled:

1) in the command "env/bin/python -m pip install –upgrade pip setuptools –upgrade" there are 2 hyphens before the word "upgrade". It was really hard to see in the proportionally spaced font and took me a lot of reading to find my mistake.

2) the command "python -m pip install –upgrade" is truncated. Right click on the link and select "Copy link address" and paste it into the command line (I tried to enter the full address here in the comment, but the editor keeps truncating it too, even if I try to unlink it!). Again, there are 2 hyphens before the words "upgrade".

3) similarly, the command "google-oauthlib-tool –client-secrets /home/pi/Downloads/client_secret_client-idxxx.json –scope" is also truncated. Just copy and paste the link address into the command line.

About This Instructable




Bio: Avid Thinker, Computer Programmer, Web evangelist, Hacking / Breaking expert, Problem Solver, Technology Obsessed, Gamer, 3D printing, Coffee lover!
More by novaspirittech:Voice Activated Google Assistant for Raspberry PiGoogle Assistant on a Raspberry PiButton Trigger for Google Assistant on the Raspberry Pi
Add instructable to: