openhab-addons/bundles/org.openhab.voice.googletts/README.md
Wouter Born 68f9c13719
Replace deprecated Google OAuth OOB flow (#12602)
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google TTS add-ons.

Instead they will now use https://www.google.com as redirect_uri.
The instructions in the README and config descriptions have been updated for this change.

See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob

Fixes #12455

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-13 11:56:34 +02:00

3.8 KiB
Raw Blame History

Google Cloud Text-to-Speech

Google Cloud TTS Service uses the non-free Google Cloud Text-to-Speech API to convert text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. It provides multiple voices, available in different languages and variants and applies DeepMinds groundbreaking research in WaveNet and Googles powerful neural networks. The implementation caches the converted texts to reduce the load on the API and make the conversion faster. You can find them in the $OPENHAB_USERDATA/cache/org.openhab.voice.googletts folder. Be aware, that using this service may incur cost on your Google Cloud account. You can find pricing information on the documentation page.

Table of Contents

Obtaining Credentials

Before you can integrate this service with your Google Cloud Text-to-Speech, you must have a Google API Console project:

  • Select or create a GCP project. link
  • Make sure that billing is enabled for your project. link
  • Enable the Cloud Text-to-Speech API. link
  • Set up authentication:
    • Go to the "APIs & Services" -> "Credentials" page in the GCP Console and your project. link
    • From the "Create credentials" drop-down list, select "OAuth client ID".
    • Select application type "Web application" and enter a name into the "Name" field.
    • Add "https://www.google.com" to the "Authorized redirect URIs".
    • Click Create. A pop-up appears, showing your "client ID" and "client secret".

Service Configuration

Using your favorite configuration UI to edit Settings / Other Services - Google Cloud Text-to-Speech and set:

When enabled the cache is purged once. Make sure to disable this setting again so the cache is maintained after restarts.

Voice Configuration

Using your favorite configuration UI:

  • Go to Settings.
  • Edit System Services - Voice.
  • Set Google Cloud as Default Text-to-Speech.
  • Choose your preferred Default Voice for your setup.