~kf5jwc/garretts-plugin-google

c9c743f4712c92eb0dfc20233c5e3aec8b77ebbf — Kyle Jones 2 years ago 3f2266b
Place expected filepath into environment for credentials

google TTS checks the environment for a default path to a credentials file
1 files changed, 5 insertions(+), 0 deletions(-)

M text_synthesizer_plugin_google/__init__.py
M text_synthesizer_plugin_google/__init__.py => text_synthesizer_plugin_google/__init__.py +5 -0
@@ 16,6 16,11 @@ def __exception_catcher(fn):
        except _DefaultCredentialsError:
            raise PluginError("Default credentials were not found!")


# Load the credentials file into the env where TTS expects
_credentials_file = "GOOGLE_APPLICATION_CREDENTIALS"
__environ[_credentials_file] = __Type.plugin_file(_credentials_file)

    return func

# Standard