New assistant.google integration #335

Merged
blacklight merged 9 commits from 284/refactor-google-assistant-integration into master 2023-10-23 16:04:35 +02:00
2 changed files with 30 additions and 1 deletions
Showing only changes of commit 645e8c8f77 - Show all commits

View File

@ -280,6 +280,35 @@ backend.http:
# - platypush/tests
###
###
# # Example configuration of a voice assistant.
# # Several voice assistant plugins and engines are available - Google
# # Assistant, Alexa, DeepSpeech, Picovoice etc.
# #
# # The Google Assistant is probably the most straightforward to configure and
# # the richest in terms of features provided out-of-the-box and speech
# # detection quality, while others may require further tinkering, may perform
# # worse than the Google model, and/or may run models on-device which could not
# # be within reach for some machines.
# #
# # Check the documentation of the `assistant.google` plugin for instructions on
# # how to get a credentials file that you can use with a custom assistant
# # installation.
# #
# # Note however that the Google Assistant plugin leverages the
# # `google-assistant-library`, which has been deprecated a while ago by Google
# # and it's unlikely to receive updates (although it still works and I'd still
# # expect it to work).
#
# assistant.google:
# # Path to your credentials file (by default it will look either under
# # ~/.config/google-oauthlib-tool/credentials.json or
# # <WORKDIR>/credentials/google/assistant.json
# # credentials_file: ~/credentials/assistant.json
# # If specified, then this sound will be played when a conversation starts
# # conversation_start_sound: ~/sounds/assistant-start.mp3
###
###
# # Example configuration of music.mpd plugin, a plugin to interact with MPD and
# # Mopidy music server instances. See

View File

@ -102,7 +102,7 @@ class AssistantGooglePlugin(AssistantPlugin, RunnablePlugin):
@property
def credentials_file(self) -> str:
if self._credentials_file:
return self._credentials_file
return os.path.abspath(os.path.expanduser(self._credentials_file))
f = None
for default_file in self._default_credentials_files: