The Google Assistant SDK lets you add hotword detection, voice control, natural language understanding and Google’s smarts to your devices. Your device captures an utterance (a spoken audio request, such as What's on my calendar?), sends it to the Google Assistant, and receives a spoken audio response in addition to the raw text of the utterance.
The SDK provides two options for integrating the Assistant into your device: the Google Assistant library, and the Google Assistant gRPC API.
Google Assistant library for Python
The Google Assistant library is a turnkey solution for anyone who wants to quickly integrate the Assistant into a prototype device. The library is written in Python and supports devices with linux-armv7l architectures (like the Raspberry Pi 3 B).
The library exposes a high level, event-based API that is easy to extend. It provides the following features out of the box:
- Hands-free activation - activate your device by saying Hey Google or Ok Google, just like with Google Home!
- Audio capture and playback
- Conversation state management
- Timer and alarm management
Google Assistant gRPC API
The Google Assistant gRPC API is the best option for flexibility and broad platform support. It exposes a low level API which directly manipulates the audio bytes of an Assistant request and response. This API can run on any platform that supports gRPC.
Reference code is provided in Python for audio capture, audio playback, and conversation state management.
Steps to start building your prototypes
The SDK lets you prototype devices quickly by embedding the Google Assistant into your device and then letting you add unique functionality with Actions on Google:
- Prototype your device on a Raspberry Pi using the Python library or in other platforms and programming languages using the gRPC API.
- Get ideas for next steps to customize it.
- Polish your device by reading best practices for privacy and security and audio configuration.
Finally, if you're looking to ship a commercial device with the Google Assistant, contact us to get started.
Developer preview and roadmap
The Google Assistant SDK is currently in developer preview. It is free to use for development purposes only and has a limit imposed on the number of requests you can make per day.
We have many more features coming, including extended platform support, companion app integration, and improved ways to control your devices with voice. If you're interested in receiving updates about these features, sign up here.