assistant.google
Platypush documentation
assistant.google
- class platypush.backend.assistant.google.AssistantGoogleBackend(credentials_file='/home/blacklight/.config/google-oauthlib-tool/credentials.json', device_model_id='Platypush', **kwargs)[source]
Bases:
AssistantBackend
Google Assistant backend.
It listens for voice commands and post conversation events on the bus.
WARNING: The Google Assistant library used by this backend has officially been deprecated: https://developers.google.com/assistant/sdk/reference/library/python/. This backend still works on most of the devices where I use it, but its correct functioning is not guaranteed as the assistant library is no longer maintained.
Triggers:
platypush.message.event.assistant.ConversationStartEvent
when a new conversation startsplatypush.message.event.assistant.SpeechRecognizedEvent
when a new voice command is recognizedplatypush.message.event.assistant.NoResponse
when a conversation returned no responseplatypush.message.event.assistant.ResponseEvent
when the assistant is speaking a responseplatypush.message.event.assistant.ConversationTimeoutEvent
when a conversation times outplatypush.message.event.assistant.ConversationEndEvent
when a new conversation endsplatypush.message.event.assistant.AlarmStartedEvent
when an alarm startsplatypush.message.event.assistant.AlarmEndEvent
when an alarm endsplatypush.message.event.assistant.TimerStartedEvent
when a timer startsplatypush.message.event.assistant.TimerEndEvent
when a timer endsplatypush.message.event.assistant.MicMutedEvent
when the microphone is muted.platypush.message.event.assistant.MicUnmutedEvent
when the microphone is un-muted.
Requires:
google-assistant-library (
pip install google-assistant-library
)google-assistant-sdk[samples] (
pip install google-assistant-sdk[samples]
)
- __init__(credentials_file='/home/blacklight/.config/google-oauthlib-tool/credentials.json', device_model_id='Platypush', **kwargs)[source]
- Parameters:
credentials_file (str) – Path to the Google OAuth credentials file (default: ~/.config/google-oauthlib-tool/credentials.json). See https://developers.google.com/assistant/sdk/guides/library/python/embed/install-sample#generate_credentials for instructions to get your own credentials file.
device_model_id (str) – Device model ID to use for the assistant (default: Platypush)