With the Google Assistant SDK, you can embed the Google Assistant into your own device, making it function similarly to a Google Home. However, your device may have unique hardware capabilities that Google Home does not have: for example, it may have a unique LED display with customizable brightness and color settings.
Device actions are a set of tools and APIs that allow you to extend what the Assistant can do, in the devices you develop, to take full potential of their hardware capabilities.
For example, you will be able to create a device that responds not only to normal Assistant commands like:
- Ok Google, when's my first event tomorrow?
- Hey Google, add milk to my shopping list.
- Ok Google, is my flight on time?
but also to commands for many Smart Home traits like:
- Ok Google, turn on.
- Ok Google, set the brightness to 50%.
- Ok Google, set the temperature to 98 degrees.
How it works
The device has the Google Assistant SDK installed on it along with credentials for accessing the Google Assistant Service. The device sends out the spoken request (Turn on.) and asks the service to turn on the device's onboard LED. The device also sends its model and device instance identifiers so the service can determine how to best respond in context to the request.
The service uses Automatic Speech Recognition (ASR) to determine what words were spoken by the user, Natural Language Processing (NLP) to analyze and understand the meaning of the request from these words, and device matching to provide context for the request. This context is important because it defines the actions the device supports and how these actions should be fulfilled.
The service then responds with text that is spoken back to the user (Sure.) along with the device-specific command. The device knows how to handle this command: it turns on its LED!
The SDK lets you prototype devices quickly by embedding the Google Assistant into your device and then letting you add unique functionality with Device actions. You can prototype your device using the Python library, or in other platforms and programming languages using the service. Can't decide which one to use? Take a look at the Compatibility and feature support table to see the differences.