Overview
These are the instructions for installing the Google Assistant SDK and for performing test utterances. Once the Assistant is properly embedded in the Pi, you can begin developing customs actions that will work with your device.
Configure Python virtual environment
Use a Python virtual environment (opens in a new tab) to isolate the SDK and its dependencies from the system Python packages.
Run all commands from the /home/pi
directory."
Run the following commands for Python 3:
$ sudo apt-get update
$ sudo apt-get install python3-dev python3-venv
$ python3 -m venv env
$ env/bin/python -m pip install --upgrade pip setuptools wheel
$ source env/bin/activate
Complete test utterance
Now it's time to complete a test utterance. Once the utterance has been completed successfully, you will be able to begin creating custom actions that will work with your device.
In the command below:
- Replace
my-dev-project
with the Google Cloud Platform project ID for the Actions Console (opens in a new tab) project you created.
- To find the project ID in the Actions Console, select the project, click the gear icon, and select Project settings.
- Replace
my-model
with the name of the model you created previously.
$ googlesamples-assistant-hotword --project-id my-dev-project --device-model-id my-model [--nickname device-nickname] [--query text-query]
- Say test utterance. To initiate, say Ok Google or Hey Google, proceeded by one of the following:
- Tell me a joke.
- What time is it in New York?
- What is the record for the Golden State Warriors?
If the Assistant responds, you have successfully embedded the Assistant into your Pi!