Google Assistant with Raspberry Pi
What is Google Assistant?
Google Assistant is Google’s voice assistant, which grew out of Google Now, and is available on a range of recent Android devices and now the iPhone.You can use Google Assistant to trigger apps and devices, ask all kinds of questions, make plans, and carry out a variety of useful tasks. If you’re new to the voice assistant, it may be difficult to figure out just how it works. Lucky for you, we can help! If you’re currently wondering, “what is Google Assistant anyway?” or “how can I use all this stuff with OK Google?” then read on to get started.
So,we 'll use Google Assistant on Raspberry Pi.
Hardware
1. Raspberry Pi Board model 3B and accessories2. Speaker and Amplifier with Speaker
3. USB Microphone
Set Google Assistant API
Open Browser in Pi and go to: https://console.cloud.google.com/cloud-resource-managerCreate Project
New Project
Add your Project name. then Create.
Dashboard
Your Project detail.
Enable API
Go to API ( APIs & services ) then Dashboard
Then ENABLE APIs and Services
Search "google assistant"
Click ENABLE
Create credentials
Go to OAuth consent screen
We will use this file on Raspberry pi.
Then copy this file to raspberry pi.
How to Setup on Raspberry Pi
Install python virtual environment
$ sudo apt-get install python3-dev python3-venv
Download Dependencies
$ sudo apt-get install portaudio19-dev libffi-dev libssl-dev
Setup Python3
$ python3 -m venv env
$ env/bin/pip install setuptools --upgrade
set the virtual environment
$ source env/bin/activate
Install Google Assistant SDK
$ python -m pip install google-assistant-sdk[samples]
Updated SDK for newest version
$ pip install --upgrade google-auth-oauthlib[tool]
Setup Google Assistant SDK with Credentials
$ google-oauthlib-tool --client-secrets /home/pi/Downloads/client_secret_XXXXX.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless
Need your credential file form Credential Setup page.
Then you have link to Google Permission Page
Run Google Assistant
$ googlesamples-assistant-pushtotalk
Enjoy your Google Assistant on Raspberry Pi.
see on Youtube
Reference
https://www.novaspirit.com/17SSm
https://www.raspberrypi.org/forums/viewtopic.php?t=188958
https://www.hackster.io/Salmanfarisvp/googlepi-google-assistant-on-raspberry-pi-9f3677
My Website
email : info@softpowergroup.net ,amphancm@gmail.com Tel .+6681-6452400
LINE : adunfong
FaceBook : https://www.facebook.com/adun.nantakaew
email: amphancm@gmail.com