This page is part of archived documentation for openHAB 3.4. Go to the current stable version

# 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 DeepMind’s groundbreaking research in WaveNet and Google’s 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 (opens new window).

# 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:

# 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.

In case you would like to setup the service via a text file, create a new file in $OPENHAB_ROOT/conf/services named googletts.cfg

Its contents should look similar to:


# Default Text-to-Speech and Voice Configuration

You can setup your preferred default Text-to-Speech and default voice in the UI:

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

In case you would like to setup these settings via a text file, you can edit the file runtime.cfg in $OPENHAB_ROOT/conf/services and set the following entries: