Skip to main content

Wyoming OVOS TTS Bridge

MIT License Python Wyoming OVOS

Expose any OpenVoiceOS TTS plugin as a Wyoming protocol server for use with Home Assistant, Rhasspy, and other Wyoming-compatible voice pipelines.

                         ┌──────────────────────────────────────┐
  Wyoming client         │         wyoming-ovos-tts              │
  (Home Assistant,       │                                      │
   Rhasspy, etc.)        │  ┌────────────────────────────────┐  │
                         │  │   OVOSTTSEventHandler          │  │
  Synthesize ───────────►│  │                                │  │
  AudioStart ◄───────────│  │  asyncio.to_thread() ──────────►│  OVOSTTSFactory
  AudioChunk* ◄──────────│  │  TTS.synth(text)               │  └──> TTS plugin
  AudioStop  ◄───────────│  │                                │
                         │  └────────────────────────────────┘  │
  Describe ─────────────►│  Info(tts=[TtsProgram(...)])         │
  Info ◄─────────────────│                                      │
                         └──────────────────────────────────────┘

Features

  • Non-streaming TTS — Single Synthesize event returns complete audio
  • Streaming TTS (Wyoming v1.7+) — SynthesizeStart/SynthesizeChunk/SynthesizeStop with sentence-boundary-aware audio streaming (via sentence-stream, the same segmenter used by wyoming-piper) for lower latency
  • Multi-language — Advertises the plugin's available_languages in the Wyoming Info response
  • Thread-safe — Blocking tts.synth() is offloaded via asyncio.to_thread() so the event loop stays responsive
  • Error reporting — Failures are sent back as Wyoming Error events
  • Signal handling — Graceful shutdown on SIGINT/SIGTERM

Installation

From PyPI

pip install wyoming-ovos-tts

You also need to install the OVOS TTS plugin you intend to bridge, e.g.:

pip install ovos-tts-plugin-server
pip install ovos-tts-plugin-piper

From source

git clone https://github.com/OpenVoiceOS/wyoming-ovos-tts.git
cd wyoming-ovos-tts
pip install -e .

Configuration

Plugin configuration is read from mycroft.conf under tts.<plugin-name>:

{
  "lang": "en-US",
  "tts": {
    "ovos-tts-plugin-server": {
      "host": "https://pipertts.ziggyai.online"
    },
    "ovos-tts-plugin-piper": {
      "voice": "en_US-lessac-medium"
    },
    "ovos-tts-plugin-espeak": {
      "voice": "en+f3"
    }
  }
}

The language is taken from tts.<plugin-name>.lang if set, otherwise from lang at the root level. Each plugin's config section must match the value passed to --plugin-name.

Usage

# TCP server using public OVOS TTS servers
wyoming-ovos-tts --uri tcp://0.0.0.0:7892 \
                 --plugin-name ovos-tts-plugin-server \
                 --debug

# With streaming disabled (requires wyoming info)
wyoming-ovos-tts --uri tcp://0.0.0.0:7892 \
                 --plugin-name ovos-tts-plugin-piper \
                 --no-streaming

# Unix socket
wyoming-ovos-tts --uri unix:///run/wyoming-tts.sock \
                 --plugin-name ovos-tts-plugin-server

# Over stdio (for subprocess usage)
wyoming-ovos-tts --plugin-name ovos-tts-plugin-server

CLI Reference

Argument Required Default Description
--plugin-name Yes — OVOS TTS plugin module name (e.g. ovos-tts-plugin-server)
--uri No stdio:// tcp://HOST:PORT, unix:///path, or stdio://
--samples-per-chunk No 1024 Audio samples per Wyoming AudioChunk event
--no-streaming No False Disable streaming TTS protocol (only Synthesize)
--debug No False Enable DEBUG-level logging
--log-format No %(levelname)s:%(name)s:%(message)s Python log format string
--version No — Print version and exit

Wyoming Protocol

Non-streaming flow

Client → Describe
Server → Info(tts=[TtsProgram(supports_synthesize_streaming=True, ...)])

Client → Synthesize(text="Hello world", voice=VoiceSettings(...))
Server → AudioStart(rate=22050, width=2, channels=1)
       → AudioChunk (1024 samples of PCM)
       → AudioChunk ...
       → AudioStop

Streaming flow (v1.7+)

Client → SynthesizeStart
Client → SynthesizeChunk(text="Hello. ")
Server → AudioStart → AudioChunk+ → AudioStop   (sentence "Hello.")
Client → SynthesizeChunk(text="How are you? I'm ")
Server → AudioStart → AudioChunk+ → AudioStop   (sentence "How are you?")
Client → SynthesizeChunk(text="fine.")
Client → SynthesizeStop
Server → AudioStart → AudioChunk+ → AudioStop   (sentence "I'm fine.")
Server → SynthesizeStopped

When --no-streaming is not set, incoming text is segmented into complete sentences by sentence-stream — which correctly handles abbreviations (Dr.), decimals (3.14), ellipses and non-Latin scripts — and each sentence is synthesized and streamed as its own AudioStart→AudioChunk→AudioStop group as soon as it is complete. This lowers time-to-first-audio compared to the non-streaming path. A trailing partial sentence is flushed when SynthesizeStop arrives, followed by a single SynthesizeStopped.

Supported Plugin Types

Any OVOS STT plugin implementing TTS from ovos_plugin_manager.templates.tts:

  • ovos-tts-plugin-server — proxy to remote TTS servers
  • ovos-tts-plugin-piper — local Piper TTS
  • ovos-tts-plugin-espeak — eSpeak NG synthesizer
  • ovos-tts-plugin-mimic — Mycroft Mimic
  • ovos-tts-plugin-google-tx — Google Translate TTS
  • ovos-tts-plugin-nos — NOS TTS
  • ovos-tts-plugin-sam — Software Automatic Mouth
  • ovos-tts-plugin-azure — Microsoft Azure Cognitive Services
  • ovos-tts-plugin-ibm — IBM Watson TTS
  • ovos-tts-plugin-amazon — Amazon Polly TTS

Documentation

Detailed docs live in docs/:

Credits

Developed by TigreGótico for OpenVoiceOS.

NGI0 Commons Fund

This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429.

Metadata

Release files for wyoming-ovos-tts 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wyoming-ovos-tts 0.2.0
File Size Uploaded
wyoming_ovos_tts-0.2.0.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wyoming-ovos-tts 0.2.0
File Interpreter ABI Platform
wyoming_ovos_tts-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / wyoming_ovos_tts-0.2.0.tar.gz

Download URL wyoming_ovos_tts-0.2.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e6ebeed0c11ce4b06d924b0aeb44bea38be07509dae296d3506a50cc1e25437f
BLAKE2b-256 checksum
How to use checksums
94dbd39da21220ab9c014bb2dff8a4d0910d1ad23b3f99757b13d90a3577c5ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / wyoming_ovos_tts-0.2.0-py3-none-any.whl

Download URL wyoming_ovos_tts-0.2.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d812333d5ee77a59169f5894d68f9e79626bc41d02458c1ef79bd86ec603496
BLAKE2b-256 checksum
How to use checksums
a0377069bc9dc8bc26d44224cf6a246bcd939afaa00f2d6f04f7918b0ff781e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page