aiy.assistant

A collection of modules that simplify interaction with the Google Assistant API.

These APIs are designed for the Voice Kit, but have no dependency on the Voice HAT/Bonnet specifically. However, they do require some type of sound card attached to the Raspberry Pi that can be detected by the ALSA subsystem.

aiy.assistant.auth_helpers

Auth helpers for Google Assistant API.

aiy.assistant.auth_helpers.get_assistant_credentials(credentials_file=None)

aiy.assistant.grpc

An API to access the Google Assistant Service.

class aiy.assistant.grpc.AssistantServiceClient(language_code='en-US', volume_percentage=100)

Bases: object

conversation(deadline=185)
volume_percentage
class aiy.assistant.grpc.AssistantServiceClientWithLed(board, language_code='en-US', volume_percentage=100)

Bases: aiy.assistant.grpc.AssistantServiceClient

Same API as AssistantServiceClient but it also turns the Voice Kit’s button LED on and off in response to the conversation.

Inherited-members:
 

aiy.assistant.library

This is a wrapper for google.assistant.library that handles model and device registration based on the project name in your assistant.json file.

All APIs from google.assistant.library are available through this module, such as Assistant.start() to start the assistant, and Assistant.start_conversation() to start a conversation, but they are not documented here. Instead refer to the Google Assistant Library for Python documentation.

For example code, see src/examples/voice/assistant_library_demo.py.