Google Home allows you to select music, control your home automation system and more with voice commands, but now you can do the same with a Raspberry Pi 3 as Google released a developer preview (alpha v1) of the Google Assistant API that works on Raspberry Pi 3, and other development boards running Debian or Ubuntu.
Google has provided instructions to use Google Assistant SDK with Raspberry Pi 3 board. First you’ll need a USB microphone ($5.99 on Amazon), and speakers connected via USB or the 3.5 mm audio jack. After installing Raspbian on the board, you’ll need to configure a developer project and account settings, configure and test audio (with arecord/aplay), and finally install Python and the Assistant API sample:
sudo apt-get install portaudio19-dev libffi-dev libssl-dev
python -m pip install google-assistant-sdk[samples]
Once this is done, authorize and run the sample:
python -m googlesamples.assistant.auth_helpers --client-secrets /home/pi/client_secret_XXXX.json
python -m googlesamples.assistant
Press Enter, ask something, and your Raspberry Pi 3 board should answer.
Since you just need audio and network working on the hardware, this should also work on other development boards, and Google has indeed provided instructions for other platforms too. Basically the same steps, but less detailed, except for the authorization part which seems a little more complicated.
Thanks to Harley for the tip.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
9 Replies to “Google Assistant SDK Turns Your Raspberry Pi 3 into Google Home”
Raspberry Pi 1 and 2 must be perfectly capable to do this also. I don’t know why they choose to just recommend Rpi 3.
So let me get this straight.. you need a Pi3, you can’t use timers & alarm, playing music, news, or podcasts, and precise location and if you want to do home control you have to have a Google Home device in the first place.
Seems to me like a simply attempt to home in on Amazon to me – a bit like Microsoft’s attempt with so called “Windows 10” to home in on the Raspberry Pi etc IOT market. Think I’ll give that a miss until they are actually offering something.
Home Assistant (HASS) community have many hints and tips
Main issues seems to be the currect issue with this preview release does not come with a hot-word function (which means it requires a key-press to activate listening-mode) and you will need a good microphone array for it to hear you at a distance. Jabra 510 is example suggested a proof-of-concept, but there are of course less expensive microphone array development kits available out there.
@Peter Scargill This is just an SDK (Software Development Kit) which is meant to help developers develop new products based on Google Assistant or integrate it into existing products, and this SDK is a preview release to boot. Developers do not need to use a Raspberry Pi. The code is portable as Raspberry Pi 3 is only suggested as a reference platform for proof-of-concept. Regardless you need to understand that this SDK is not directed towards end-users as-is.
“…you’ll need an actual Google Home device for initial setup.” Why for crying out loud!!??
Instructions to use Google AIY Projects voice kit code / Google Assistant SDK in Ubuntu: https://gist.github.com/ali1234/2474ff0312094699b5d55ca707e52f20
Probably because RPi 1 and 2 are in ARMv6 & v7. RPi uses ARMv8!
Google has now released developer preview 0.2.0 which includes a Google Assistant library for Python and hot-word voice activation
New features in the developer preview 0.2.0 version are:
* Initial release of the library for Python.
* Ok Google and Hey Google hotword support for voice activation
* Ability to set alarms and timers.
Previous developer preview 0.1.0 release version already had: An RPC API is available to communicate with the Assistant. Python sample code is available.
still i dont know how to change the languuauge
The best project of IA is the open souce :
Mycroft is the world’s first open source assistant.
Mycroft runs anywhere – on a desktop computer, inside an automobile, or on a Raspberry Pi. This is open source software which can be freely remixed, extended, and improved. Mycroft may be used in anything from a science project to an enterprise software application.