Skip to main content

Google Cloud Text-to-Speech smart home integration, free and open source

Google Cloud Text-to-Speech integration for Gladys Assistant

Give Gladys a Google Cloud voice: Chirp 3 HD, Neural2, WaveNet, with your own API key.

Overview​

This integration gives Gladys a Google Cloud voice (Chirp 3 HD, Neural2, WaveNet…), through the official Cloud Text-to-Speech API and your own API key. Once you choose it as the voice in Settings → Artificial Intelligence, everything Gladys says goes through Google: the "play a notification" scene action on your speakers, and the spoken replies of the voice assistant. Each text is spoken in the language of the user.

It keeps costs under control: a monthly character limit (95 % of the free allowance by default), and a clip cache so that a sentence already spoken ("The garage door is open") is never billed twice. It also adds three scene triggers (speech fails, speech works again, monthly limit) and a dashboard widget.

Not affiliated with Google. Not tested with a real Google Cloud key yet: feedback welcome.

Prerequisites​

  • Gladys Assistant 5.3.0 or later.
  • A Google Cloud project with billing enabled (Google requires a billing account even within the free allowance), the Cloud Text-to-Speech API enabled, and an API key (APIs & Services → Credentials → Create credentials → API key). Restrict the key to the Cloud Text-to-Speech API.
  • Costs: Google bills every character spoken, spaces included, per calendar month (Pacific time). Free every month: 1 million characters for Chirp 3 HD, Neural2 and Studio, 4 million for WaveNet and Standard together. Beyond: $30, $16, $160 and $4 per million. A home that speaks 50 notifications a day of 60 characters uses about 90,000 characters a month.
  • Your data: every text Gladys reads aloud (notifications, replies of the assistant) goes to Google over HTTPS.

Configuration​

Field or buttonDefaultMeaning
API key—Required. Never shown again, never logged
Voice familyChirp 3 HDChirp 3 HD, Neural2, WaveNet, Standard, Studio or Polyglot
Voice genderFemaleThe voice picked in the family, for each language
Voices by name—Optional: one voice per language, separated by commas (fr-FR-Chirp3-HD-Charon)
Language when unknownEnglishWhen Gladys does not say the language of the text (rare)
Speed1×From 0.75× to 1.5×
Pitch0In semitones, −6 to +6; Chirp 3 HD and Studio ignore it
Volume gain0 dBFrom −6 to +6 dB
Tuned forNothing in particularGoogle adjusts the sound to the device: small speaker, smart speaker, hi-fi, headphones…
Audio formatMP3MP3 plays everywhere; Ogg Opus sounds better; WAV only for short texts (5 MB at most)
Monthly limit0Characters a month; 0 = 95 % of the free allowance of the family
Test the voice—Speaks a short sentence (about 60 characters billed) and shows the voice and the month
List the voices—The voices of the family for a language, to type one by name (free)
Empty the clip cache—Forgets the sentences already spoken

The status of the configuration screen says whether Google accepts the key and has a voice for the fallback language, without billing a character. It cannot see whether billing is enabled: Test the voice does.

Usage​

  1. Integrations → Google Cloud Text-to-Speech → Configuration: paste the API key, choose the family and the gender, press Test the voice.
  2. Settings → Artificial Intelligence, Voice card: choose Google Cloud Text-to-Speech.
  3. In a scene, add the action play a notification on a speaker: Gladys speaks with the Google voice. The voice assistant answers with it too.

Choosing the voice​

FamilyFree each monthThen, per million charactersSound
Chirp 3 HD1 million$30The most natural, about thirty languages
Neural21 million (with Polyglot)$16Natural, many languages
WaveNet4 million (with Standard)$4Good, almost every language
Standard4 million (with WaveNet)$4Robotic, every language
Studio1 million$160Narration, a few languages
Polyglot1 million (with Neural2)$16Preview, a few languages

Prices checked on the Google Cloud pricing page on 9 November 2026. For each language, the integration picks a voice of the chosen family and gender in the main region of the language (fr-FR for French), always the same. When the family has no voice for a language, Chirp 3 HD, Neural2, WaveNet then Standard are tried. To choose a precise voice or another region (fr-CA, en-GB), press List the voices, copy a name and type it in Voices by name.

Dashboard widget​

The Google voice widget shows the characters of the month against the limit (gauge), the characters left, the clips of the day, the clips read from the cache this month (free), the characters per day over 30 days, whether Google speaks, the last clip and the last error. It counts what this integration sent; the same key used elsewhere is not in it. The Google Cloud console stays the reference for the bill.

The Google voice widget: share of the monthly limit, characters left, clips of the day and from the cache, characters per day, state, last clip and last error (generated illustration, not a screenshot)

Scenes​

  • Trigger "Google voice: speech fails": once per failure (key refused, API not enabled, billing not enabled, voice unknown, rate limit, API unreachable, too slow, Google error), with the kind, the message, the voice and the language. A text refused on its own and the monthly limit start nothing here.
  • Trigger "Google voice: speaks again": the first clip after a failure, with the minutes of failure.
  • Trigger "Google voice: monthly limit": at 80 % of the limit (warning), then when a clip is refused (reached), once per level and month, with the characters used, the limit and the percentage.

Examples: when speech fails, send a Telegram message to the administrator with the message; at 80 % of the monthly limit, send an e-mail with the percentage; when the limit is reached, send a text notification, which costs nothing.

There is no scene action: the audio is played by Gladys itself, through "play a notification".

Troubleshooting​

  • "Google refused the API key": copy the key again from Credentials; if the key is restricted, its API restrictions must include the Cloud Text-to-Speech API.
  • "The Cloud Text-to-Speech API is not enabled": enable it in the API Library of the project of the key, wait a minute, then press Test the voice.
  • "Google requires billing": link a billing account to the project. The free allowance still applies.
  • "Monthly character limit reached": clips are refused until the 1st of next month, Pacific time; raise Monthly limit to go on (beyond the free allowance, Google bills).
  • "No voice found": a voice typed by name does not exist, or no family has a voice for the language; press List the voices.
  • The speaker plays nothing: choose MP3; Ogg Opus and WAV are not played by every speaker, and a long text in WAV goes over the 5 MB Gladys accepts.
  • A word is pronounced badly: Google improves its voices; press Empty the clip cache to hear the new pronunciation of a sentence already spoken.
  • Logs: Settings → Supervision, the logs of the integration. Never share your API key.

Configuration settings​

These are the settings Google Cloud Text-to-Speech asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Getting startedsectionNoIn the Google Cloud console: create a project, link a billing account to it (required even within the free allowance), enable the Cloud Text-to-Speech API, then create an API key restricted to that API and paste it below. Then select this integration as the voice in Settings, Artificial Intelligence.
Costs and privacysectionNoGoogle bills every character spoken, spaces included, each month: Chirp 3 HD, Neural2 and Studio include 1 million free characters, WaveNet and Standard 4 million together. The integration stops at the monthly limit below (95 % of the free allowance by default) and does not bill a sentence already spoken again. Every text read aloud goes to Google.
API keysecretYes
VoicesectionNoGladys gives the language of the user: the integration picks a voice of the chosen family and gender in that language, always the same one. To choose a precise voice, type its name below; the “List the voices” button shows them.
Voice familyselectNoWhen the family has no voice for a language, Chirp 3 HD, Neural2, WaveNet then Standard are tried.
Voice genderselectNo
Voices by name (optional)stringNoOne voice per language at most, separated by commas. It replaces the automatic choice for its language, also its region (fr-CA, en-GB).
Language when unknownselectNoSpoken when Gladys does not say the language of the text (rare).
SoundsectionNo
SpeedselectNo
PitchselectNoIn semitones. Chirp 3 HD and Studio voices ignore it.
Volume gainselectNo
Tuned forselectNoGoogle adjusts the sound to the device that plays it.
Audio formatselectNo
Monthly limit (characters)numberNo0: 95 % of the free allowance of the family. Beyond it, clips are refused until the 1st of next month (Pacific time, like Google bills).

How to install Google Cloud Text-to-Speech in Gladys​

  1. In Gladys, open Integrations: Google Cloud Text-to-Speech appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/william-de71/gladys-google-cloud-tts:0.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/William-De71/gladys-google-cloud-tts.

Google Cloud Text-to-Speech requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Google Cloud Text-to-Speech is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by William-De71, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂