From 645e8c8f7701d98f7beb3a067e8cc5e9fde3cef8 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 22 Oct 2023 21:53:15 +0200 Subject: [PATCH] Added updated configuration snippet for `assistant.google` plugin. --- platypush/config/config.yaml | 29 +++++++++++++++++++ .../plugins/assistant/google/__init__.py | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/platypush/config/config.yaml b/platypush/config/config.yaml index df1ec68a60..b0005cb911 100644 --- a/platypush/config/config.yaml +++ b/platypush/config/config.yaml @@ -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 +# # /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 diff --git a/platypush/plugins/assistant/google/__init__.py b/platypush/plugins/assistant/google/__init__.py index 5623d27873..07c02d0663 100644 --- a/platypush/plugins/assistant/google/__init__.py +++ b/platypush/plugins/assistant/google/__init__.py @@ -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: