Google Assistant Library for Python
It is part of the Google Assistant SDK for devices.
It includes the following features:
- "Ok Google" or "Hey Google" hotword detection
- Audio recording
- Assistant response playback
- Timer and alarm features
- Volume ducking and control
- Conversation state management
- Playback of podcasts and news
- Broadcast voice messages
See Introduction to the Google Assistant Library for a step by step guide on how to get started with the library on Raspberry Pi 3.
You can install using pip.:
pip install --upgrade google-assistant-library
Follow the steps to configure the Actions Console project and the Google account.
Follow the steps to register a new device model and download the client secrets file.
Generate credentials using
pip install --upgrade google-auth-oauthlib[tool] google-oauthlib-tool --client-secrets path/to/client_secret_<client-id>.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --scope https://www.googleapis.com/auth/gcm --save --headless
Run the demo:
Say "Ok Google" or "Hey Google" followed by a voice query. The demo should play back the Assistant's response and log events to the screen.
Register the device and run the demo with device actions:
google-assistant-demo --project-id PROJECT_ID --device-model-id DEVICE_MODEL