Favicon of RealtimeTTS

RealtimeTTS

A Python text-to-speech library turns streamed LLM output into audio with local models, voice cloning, and a self-hosted OpenAI-compatible API.

Alternative to:

RealtimeTTS is a Python text-to-speech library for developers building voice assistants and other apps that need spoken responses before the full text is ready. It accepts both complete text and incoming LLM output.

  • Streaming speech: Start playback while text is still arriving, with controls to pause, resume, or stop audio.
  • Engine choice and fallback: Use system voices or local models such as Qwen3-TTS, Piper, Kokoro, and Coqui XTTS, and fall back to another engine if synthesis fails.
  • Voice cloning: Qwen supports multilingual speech and voice cloning; other engines offer voice switching or cloning according to their capabilities.
  • Audio output and timing: Play speech locally, save WAV files, or send audio chunks to another process, with word and character timing support for matching speech to text.
  • Self-hosted speech API: Run the Qwen engine behind an OpenAI-compatible HTTP API, with browser playback and registration of custom voices.

Local engines perform speech synthesis on your hardware. Cloud engines such as OpenAI, Azure, ElevenLabs, and Speechify send text to external services and require an internet connection. Qwen may download models on first use.

Qwen's GPU runtime supports compatible NVIDIA hardware on Windows and Linux. Its CPU runtime supports Windows and Linux x86-64, plus Intel and Apple Silicon macOS; CPU speed depends on the machine. Linux ARM, Windows ARM64, and Metal acceleration aren't supported by that runtime.

The library is open source under MIT. Models, voice recordings, generated audio, and external services can have separate license terms.

Similar to RealtimeTTS