Skip to main content

Gradium smart home integration, free and open source

Gradium integration for Gladys Assistant

Natural, expressive voices from Gradium for Gladys announcements and voice replies.

This integration makes Gladys speak with the voices of Gradium, a text-to-speech service with natural and expressive voices in English, French, German, Spanish and Portuguese.

Once selected as the voice of your instance, Gradium speaks:

  • the "play a notification" scene action, on your speakers;
  • the replies of the voice assistant.

Gradium is a cloud service: the texts to speak are sent to Gradium, and each synthesis uses credits of your Gradium account.

Requirements​

  • Gladys Assistant 5.3.0 or later.
  • A Gradium account and an API key. The free plan is enough to try.

Configuration​

  1. Sign in to Gradium Studio, open the API keys page and create a key. Copy it: it is shown only once.
  2. In Gladys, open the Configuration tab of the integration, paste the key in API key and save.
  3. Press Test the connection: the message shows your remaining credits.
  4. Open the Artificial Intelligence page of Gladys and select Gradium in the Voice card. Until you do, Gladys keeps its previous voice.

Choosing the voices​

Gradium identifies a voice by a short identifier, such as YTpq7expH9539ERJ.

  • Press List the voices to display the voices of the Gradium catalog and your own voices (cloned or designed in Gradium Studio), with their language and identifier. Gradium Studio also lets you listen to each voice and copy its identifier.
  • Default voice is used whenever the language has no voice of its own.
  • French voice, English voice, German voice, Spanish voice and Portuguese voice are optional. Gladys speaks in the language of the user who asked: fill in the voice of a language to use it for that language.

A voice speaks best in its own language: if your household uses French, put a French voice in French voice (or in Default voice).

Other settings​

  • Region: leave Automatic unless you want your requests processed only in Europe or only in the United States.
  • Speaking pace: 0 is the natural pace of the voice. Negative values (down to -4) speak faster, positive values (up to 4) slower.
  • Audio format: WAV plays on every speaker. Opus is much lighter and suits long texts, but some speakers, Sonos among them, cannot play it.

Limits​

  • Gladys sends at most 2,000 characters per synthesis and accepts a clip of 5 MB. In WAV, a clip longer than about 50 seconds is automatically stored at a lower sample rate to fit; the voice stays clear.
  • A synthesis must complete within 30 seconds.
  • Gradium offers speech-to-text too, but Gladys has no speech-to-text integration type yet: this integration only speaks.

Troubleshooting​

  • "Gradium refused the API key": the key is wrong or was revoked. Create a new one in Gradium Studio and paste it again.
  • "Credits exhausted or too many requests": check your balance with Test the connection, and your plan in Gradium Studio.
  • Gladys does not speak with Gradium: check that Gradium is selected in the Voice card of the Artificial Intelligence page.
  • The speaker stays silent in Opus: switch Audio format back to WAV.
  • The voice has an accent: the voice does not match the language. Set a voice of that language in the matching field.

The Logs tab of the integration shows the reason of every failed synthesis. The API key is never written to the logs.

Configuration settings​

These are the settings Gradium asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Getting startedsectionNoCreate an API key in Gradium Studio, paste it below and save. Then select Gradium in the Voice card of the Artificial Intelligence page of Gladys.
API keysecretYesYour Gradium API key.
RegionselectNoWhere Gradium processes your requests. Pick Europe or United States only to pin the data to that region.
VoicessectionNoA voice is chosen by its identifier. The List the voices button below shows the identifiers of the Gradium catalog and of your own voices. Gladys speaks in the language of the user: set a voice for a language to use it instead of the default voice.
Default voicestringNoIdentifier of the voice used when the language has no voice of its own.
French voicestringNo
English voicestringNo
German voicestringNo
Spanish voicestringNo
Portuguese voicestringNo
Speaking pacenumberNo0 is the natural pace of the voice. Negative values speak faster, positive values slower.
Audio formatselectNoWAV plays on every speaker. Opus is much lighter, but some speakers (Sonos among them) cannot play it.

How to install Gradium in Gladys​

  1. In Gladys, open Integrations: Gradium appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/philippema/gladys-gradium:1.0.1), 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/PhilippeMA/gladys-gradium.

Gradium 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​

Gradium 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 PhilippeMA, 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 🙂