Next Steps

Once you have the Google Assistant running on your project, give these a try:

  1. Customize how your project interacts with the Assistant. For example, trigger the Assistant with the push of a button or blink an LED when playing back audio. You can even show a speech recognition transcript from the Assistant on a display.

  2. Control your project with Device Actions. For example, ask your lamp, with the Assistant built-in, to turn on and change its brightness.

Customize how your project interacts with the Assistant

Trigger the Assistant

With the Google Assistant Library, you trigger an Assistant request by speaking a hotword like Ok Google. You can mute the microphone to stop the Assistant from listening for the hotword. Use the set_mic_mute() to control this. Trigger the start_conversation() method based on your own custom event.

Get the transcript of the user request

The Google Assistant SDK gives you a text transcript of the user request. Use this to provide feedback to the user by rendering the text to a display, or even for something more creative such as performing some local actions on the device.

The transcript is located in a Python string object in the ON_RECOGNIZING_SPEECH_FINISHED event.

Control your project with Device Actions

You can add Device Actions to the Assistant that allow you to control your device via voice. Extend the Google Assistant Library sample to include Device Actions.