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.

Functionalities are limited right now, with RPC API and Python sample code, but it only works with English language, and features such as timers & alarm, playing music, news, or podcasts, and precise location are not supported. Location is determined using your IP address only, and if you’re using some third party services / products such as Uber or Hue, you’ll need an actual Google Home device for initial setup.

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] 1 2 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 1 2 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.