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
Log into your Raspbian with PIXL Desktop.
Open up a Web Browser and go to "console.cloud.google.com/project"
Log into your Google Account.
Click on "CREATE PROJECT"
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
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
Head over to "myaccount.google/activitycontrols"
Scroll down and activate the following controls:
- Web & App Activity
- Location History
- Device Information
- Voice & Audio Activity
Step 5: 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
Type in "python -m pip install –upgrade https://github.com/googlesamples/assistant-sdk-py... 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 https://www.googleapis.com/auth/assistant-sdk-pro... –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
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.