Phonon TTS smart home integration, free and open source

Offline text-to-speech: Gladys speaks with Gradium's Phonon voices, on your own hardware.
Phonon TTS gives Gladys an offline voice: the texts to speak (scene "Play a notification" announcements) are synthesized on your Gladys machine by Gradium's Phonon models, with no cloud service or subscription. Once the model is downloaded, no internet connection is needed.
Prerequisites
-
Gladys 5.3 or later (pluggable voices).
-
Gladys in
hostnetwork mode (standard installation): the speakers (Sonos, Google Cast, AirPlay…) download the audio from an address of your local network. -
About 1 GB of memory and 150 MB of disk free for the speech engine. A Raspberry Pi 4 or 5 is fine.
-
For the Phonon 40m models (every language): a free Hugging Face account.
- Open the model page, for instance gradium/phonon-40m-fr, and accept its terms of use (approval is instant).
- Create a read token at huggingface.co/settings/tokens.
The Phonon 31m model (English only) needs no account.
The Phonon 40m models are licensed CC BY-NC 4.0 (non-commercial use); Phonon 31m and the catalog voices are licensed Apache 2.0.
Configuration
Right after installation, the integration does not speak: no model is selected by default and nothing is downloaded.
- Open the Configuration tab of the integration.
- Choose the model: a 40m model in your language (the best choice), the multilingual model (then choose its language), or Phonon 31m for English without an account.
- For a 40m model, paste your Hugging Face token. It is only used for the download and never sent to the speech engine.
- Choose the voice: the model's own voice, or one of the 102 voices of the Phonon catalog. Listen to them first on the voice demo page, which shows the exact name to pick in the list. Every voice works with every model, but sounds best in its own language.
- Save. The status at the top of the screen follows the download (about 75 MB), then the engine startup, until Ready.
- Make Phonon TTS the voice of Gladys: Integrations › Artificial Intelligence › Voice, choose Phonon TTS.
Your "Play a notification" scenes now speak with Phonon.
Only the selected model and voice are kept on disk: switching model or voice deletes the previous ones. While a new model downloads, the current voice keeps speaking.
Custom voice (Gradium Studio)
A voice designed or cloned in Gradium Studio works too:
- Create an API key in Gradium Studio, paste it into Gradium API key, and save.
- Run the List my Gradium Studio voices action: it shows the ID of each of your voices.
- Choose Custom voice in the voice list, paste the ID into Custom voice, and save.
You can also enter the https URL of a Phonon voice file (.safetensors)
there. The voice is downloaded once.
Advanced settings
- Speech rate: slower, normal or faster.
- Model weights:
q8(recommended) is smaller and faster on a CPU;f32is larger and slower.
Actions
- Test the voice: synthesizes a sentence (yours, or a sample one) and reports the length of the generated speech and the computing time.
- List my Gradium Studio voices: see above.
- Restart the speech engine: retries the download and restarts the engine, for instance after a network outage.
Limitations
- The voice assistant answers in text with Phonon TTS: its page is served over HTTPS, and browsers refuse to play audio served over plain HTTP on the local network. Scene announcements speak normally.
- Gladys waits 30 seconds at most for a synthesis. On a modest machine, a very long text is cut and only its beginning is spoken.
- One language per model (the model's, or the one chosen for the multilingual model): a text in another language is read with the model's accent.
Troubleshooting
- "No model selected": choose a model and save.
- "Gated model" / "Access denied": accept the terms on the Hugging Face page of the model with the account of the token, check the token, then save again.
- "Cannot reach Hugging Face": Gladys needs the internet for the first download. Check the connection, then run Restart the speech engine.
- The engine stops while starting: check the logs of the
phononcontainer in the Supervision block (not enough memory, unsupported CPU…). - The speakers play nothing: check that Gladys runs in
hostnetwork mode and that Phonon TTS is the voice selected in Integrations › Artificial Intelligence. - The logs of the integration (Supervision block) detail every step.
Report an issue at github.com/bertrandda/gladys-phonon.
Configuration settings
These are the settings Phonon TTS asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Phonon model | section | No | Nothing is downloaded and Gladys cannot speak until you choose a model and save. The 40m models need a free Hugging Face account: open the model page, accept its terms (approval is instant), then create a read token. They are licensed CC BY-NC 4.0 (non-commercial use). Phonon 31m (English) is Apache 2.0 and needs no account. Once downloaded, everything runs offline. |
| Model | select | Yes | Each 40m model speaks one language. The multilingual one speaks all five: pick its language below. |
| Language (multilingual model only) | select | No | How numbers, dates and symbols are read out. Ignored by the single-language models. |
| Hugging Face token | secret | No | Read token of the account that accepted the model's terms. Only used to download a 40m model, never sent to the speech engine. |
| Voice | section | No | Choose the model's own voice or one of the voices of the Phonon catalog: listen to them on the demo page first. Only the selected voice is downloaded. Every voice works with every model, but sounds best in its own language. You can also use a voice you designed or cloned in Gradium Studio. |
| Voice | select | No | |
| Custom voice | string | No | Used when the voice is "Custom voice": the ID of a voice designed or cloned in Gradium Studio (the "List my Gradium Studio voices" action below shows them), or the https URL of a Phonon voice file (.safetensors). |
| Gradium API key | secret | No | Only for a custom voice given by its ID: create a key in Gradium Studio. The voice is downloaded once, then works offline. |
| Advanced | section | No | The defaults suit most installations. |
| Speech rate | select | No | |
| Model weights | select | No | q8 is smaller and faster on a CPU, with the same voice quality for most uses. |
How to install Phonon TTS in Gladys
- In Gladys, open Integrations: Phonon TTS appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/bertrandda/gladys-phonon:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/bertrandda/gladys-phonon.
Phonon TTS 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
Phonon TTS 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 bertrandda, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation