MaryTTS smart home integration, free and open source

A free voice for Gladys announcements: MaryTTS speaks on your network, without Internet.
Gives Gladys a free, local voice with MaryTTS, the open-source text-to-speech server of the DFKI (German Research Center for Artificial Intelligence) and of Saarland University. It runs on a machine of your network, without Internet and without graphics card: the texts stay at home. The scene announcements are spoken by it on your speakers.
What you get
- A voice for Gladys (Gladys 5.3.0 or later): once selected, the Talk on a speaker scene action speaks with MaryTTS on your speakers (Sonos, Google Cast, AirPlay…).
- French, English and German voices (MaryTTS has no Spanish voice: see Limits). Each user hears their language, with the voice set for it.
- One voice per language, chosen among those installed on your server (the first one of the language by default), a speed and an optional audio effect (robot, whisper, stadium, chorus, jet pilot).
- Test the voice, Show the voices and Check the server buttons in the configuration.
- Two scene triggers: MaryTTS server unavailable and MaryTTS server back, for example to be warned when announcements can no longer be spoken.
Before you start
- Run a MaryTTS 5.x server on a machine of your network. The simplest is the
Docker image of the community, which already holds French, English and
German voices (about 400 MB, 500 MB of memory):
docker run -d --restart unless-stopped -p 59125:59125 synesthesiam/marytts:5.2. - Or install MaryTTS by hand from github.com/marytts/marytts (Java), then add voices with its installer.
- The server listens on port 59125. Its web page at
http://<host>:59125lets you try the voices. - Not affiliated with the DFKI nor with the MaryTTS project.
Configuration
- Install the integration, then open its Configuration tab.
- Server address: the address of your MaryTTS server, for example
http://<host>:59125. A barehost:portis completed withhttp://. - Voice for French / English / German / Spanish (optional): the name of a
voice installed on the server, for example
upmc-pierre-hsmm,cmu-slt-hsmmordfki-pavoque-neutral-hsmm. Empty: the first voice of the server in that language. - Speed (much slower to much faster) and Audio effect (none by default).
- Save, then press Show the voices to see the voices of the server, Check the server to see its version, and Test the voice to check that a clip comes back (seconds of sound and time taken; the button does not play it).
- Open Integrations → Artificial Intelligence and choose MaryTTS in the Voice card.
Using it in scenes
Add a Talk on a speaker action to a scene, pick a speaker and type the text. Gladys asks this integration for the clip, then serves it to the speaker on your local network.
The triggers MaryTTS server unavailable (the server stopped answering) and MaryTTS server back start a scene, for example to send you a message. The server is checked every 5 minutes.
The voice assistant of Gladys stays text-only with a voice integration: its page runs over HTTPS, and the clip is served over the local network in HTTP, which the browser blocks. This is a limit of Gladys, the same for every voice integration.
Limits
- No Spanish voice in MaryTTS: an announcement in Spanish fails, unless you set any voice in Voice for Spanish (it then reads Spanish with its own accent).
- The voices of MaryTTS are clear but synthetic, older than neural voices.
- Gladys waits 30 seconds for the clip. MaryTTS is fast: measured, 0.3 s for a sentence, 7 to 15 s for the 2,000 characters Gladys allows.
- The clips are WAV (16 or 48 kHz depending on the voice). Gladys refuses clips over 5 MB: a longer clip is resampled to a lower rate.
- A clip already made (same text, voice, speed and effect) is kept in memory (the 16 latest), and one announcement on several speakers asks the server once.
- The speed applies through SSML; the effect is applied by MaryTTS to the whole clip.
Troubleshooting
- Supervision shows whether the server answers, its version and its number of voices.
- A failed announcement is written in the logs of the integration, with the reason the server gave (voice not installed, no answer in time…). The text spoken is never written.
- "Cannot be reached": check the address and the port (59125 by default), and that the port of the container is published.
- "Not installed": the voice name has a typo, or the voice was removed from the server. Show the voices gives the exact names.
- More details in debug: set the log level of the integration to debug.
Configuration settings
These are the settings MaryTTS asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Your MaryTTS server | section | No | MaryTTS is a free text-to-speech server that runs on your network, without Internet. Start it with Docker, for example docker run -p 59125:59125 synesthesiam/marytts:5.2. Once saved, choose this voice in Integrations → Artificial Intelligence → Voice. |
| Server address | string | Yes | Address of the MaryTTS server, port 59125 by default. |
| Voice for French | string | No | A voice name, as listed by “Show the voices”. Empty: the first voice of the server in this language. |
| Voice for English | string | No | A voice name, as listed by “Show the voices”. Empty: the first voice of the server in this language. |
| Voice for German | string | No | A voice name, as listed by “Show the voices”. Empty: the first voice of the server in this language. |
| Voice for Spanish | string | No | MaryTTS has no Spanish voice: name another one here to read Spanish with its accent. Empty: announcements in Spanish fail. |
| Speed | select | No | Pace of speech, compared with the voice's own. |
| Audio effect | select | No | An effect of MaryTTS applied to every announcement. |
How to install MaryTTS in Gladys
- In Gladys, open Integrations: MaryTTS appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-marytts: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/guim31/gladys-marytts.
MaryTTS 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
MaryTTS 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 guim31, 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