Things used in this project
Google published it's Assistant SDK for the Raspberry Pi ten days ago. The avaiable sample app can be triggered via keyboard in the command line and it takes quite some steps to get it up and running. I've been wondering, if there's a better way to do it - and AssistantPi was born :)
AssistantPi is basically a tweak of AlexaPi. It includes the Google Assistant SDK and uses AlexaPi's hotword recognition to activate either Assistant or Alexa. The installer provides an easy way to get everything set up in just under an hour.
You can find the Github Repository here.
Credits / Further Resources:
You will need:
- A Raspberry Pi and an SD Card with a fresh install of Raspbian
- external speaker with 3.5mm Jack
- USB microphone
Assuming you already own a Raspberry Pi, the costs for the two are about ~€10, so it's worth a shot.
- Have your Raspberry Pi running Raspbian ready and connected to the Internet. I recommend to use a fresh install of Raspbian Jessie Lite without Pixel.
- Follow this Google Guide and place the Google Assistant Credentials JSON in
- Prepare Amazon AVS Credentials as described in Step 1 in AlexaPi Installation Guide, you'll need them during Installation. Even if you only want Google Assistant, this has to be done for AlexaPi to work properly.
- Connect your audio peripherals (i.e. USB-Mic and Speaker via Jack).
- Clone the repository to
/optdirectory and rename the folder to AlexaPi (both important, it will fail otherwise):
cd /opt sudo git clone https://github.com/xtools-at/AssistantPi.git AlexaPi
- Run the setup and go through all the steps. This will take a while, approx. 25min with a somewhat good Internet connection.
- If Authentication with Google Assistant API fails during setup, try to run it manually:
/opt/AlexaPi/env/bin/python -m googlesamples.assistant.auth_helpers --client-secrets /home/pi/Downloads/client_secret.json
- If you haven't opted for starting AssistantPi at boot, or the Installer threw an error during setup, start the script manually using
python /opt/AlexaPi/src/main.py. Otherwise, it will be started automatically when the setup finishes.
- Trigger Assistant and Alexa with the hotwords Google and Alexa
Make sure you've been to
, Advanced Options > Audio and have set the desired audio output (i.e. 3.5mm Jack, not HDMI).
Please refer to the following guides if you encounter any audio problems:
To change the hotwords (currently Alexa and Google), change both these files before running the setup:
(phrase and phrase_assistant) and
In the latter, you can also tweak the sensitivity of the hotword recognition.
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!