Installation

May 25, 2026 ยท View on GitHub

RealtimeTTS installs a small core plus optional engine dependencies. The safest first install is one engine extra that matches the engine you plan to use.

Starter Install

pip install "realtimetts[system]"

The system extra installs the local system TTS path through pyttsx3. It is usually the quickest way to test that Python, PyAudio, and audio output are working.

Platform Audio Prerequisites

RealtimeTTS uses PyAudio for normal PCM playback.

Linux:

sudo apt-get update
sudo apt-get install python3-dev portaudio19-dev

macOS:

brew install portaudio

Windows usually installs PyAudio wheels directly. If PyAudio fails to install, check that your Python version has a compatible wheel.

Current Extras

These extras are present in setup.py:

ExtraIntended use
minimalCore streaming dependencies only.
systemSystem TTS through pyttsx3.
azureAzure Speech SDK.
elevenlabsElevenLabs SDK.
openaiOpenAI SDK.
gttsGoogle Text-to-Speech package.
coquiCoqui TTS package.
edgeMicrosoft Edge TTS package.
kokoroKokoro engine package.
cambCAMB SDK.
minimaxMiniMax engine dependencies.
modelslabModelsLab engine dependencies.
cartesiaCartesia SDK.
typecastTypecast SDK.
orpheusSNAC dependency used by Orpheus.
omnivoiceOmniVoice package.
luxttsLuxTTS-related Git dependencies and local stack packages.
zipvoiceShared ZipVoice Python dependencies; still needs a ZipVoice checkout.
chatterboxChatterbox TTS package.
soproSopro package.
sopranoSoprano TTS package.
neutts, neutts-ggufNeuTTS package and optional GGUF/ONNX extras.
pockettts, pocketPocketTTS package.
pockettts-gpu, pocket-gpuShared dependencies for PocketTTSGpuEngine; install a CUDA PyTorch build and the pinned PocketTTS GPU fork separately.
styletts, styleStyleTTS Python dependencies; still needs a StyleTTS checkout/assets.
parlerPyPI-resolvable Parler support dependencies; install the upstream Parler package separately.
moss, moss-ttsPyPI-resolvable MOSS runtime dependencies; install MOSS-TTS-Nano/model assets separately.
piperCore RealtimeTTS dependencies; Piper binary/model assets remain external.
qwenFaster Qwen3 TTS package.
jp, zh, koExtra language support packages for Kokoro.
allBest-effort convenience set for all Python-installable engine stacks.

Example:

pip install "realtimetts[azure,openai]"

Engine-Specific Setup

The table below is intentionally more explicit than the README. Some engines are covered by package extras, while others currently require an upstream package, local checkout, model files, or Docker example.

EngineInstall or setup pathExtra setup
SystemEnginepip install "realtimetts[system]"Uses system voices through pyttsx3.
GTTSEnginepip install "realtimetts[gtts]"Network access to the Google Translate TTS service.
EdgeEnginepip install "realtimetts[edge]"Install mpv for compressed audio playback.
OpenAIEnginepip install "realtimetts[openai]"Set OPENAI_API_KEY; install mpv for MP3 playback or use PCM response format.
AzureEnginepip install "realtimetts[azure]"Pass speech_key and service_region; source does not currently read Azure env vars.
ElevenlabsEnginepip install "realtimetts[elevenlabs]"Set ELEVENLABS_API_KEY; install mpv.
CambEnginepip install "realtimetts[camb]"Set CAMB_API_KEY.
MiniMaxEnginepip install "realtimetts[minimax]"Set MINIMAX_API_KEY; install mpv for MP3 playback.
CartesiaEnginepip install "realtimetts[cartesia]"Set CARTESIA_API_KEY.
TypecastEnginepip install "realtimetts[typecast]"Set TYPECAST_API_KEY and provide voice_id or TYPECAST_VOICE_ID.
ModelsLabEnginepip install "realtimetts[modelslab]"Set MODELSLAB_API_KEY; import from RealtimeTTS.engines until root export is added.
CoquiEnginepip install "realtimetts[coqui]"Local XTTS model download/cache; GPU strongly recommended for realtime use.
PiperEnginepip install "realtimetts[piper]" plus Piper executable/model files.Provide a Piper executable, model, and config; PIPER_PATH can point to the executable.
StyleTTSEnginepip install "realtimetts[styletts]" plus StyleTTS2 checkout/model files.Pass style_root, model config, checkpoint, and reference audio.
ParlerEnginepip install "realtimetts[parler]" plus the upstream Parler package.Torch/torchaudio and GPU setup are usually required for realtime performance.
KokoroEnginepip install "realtimetts[kokoro]"Add jp, zh, or ko extras for those language stacks.
OrpheusEnginepip install "realtimetts[orpheus]"Requires an OpenAI-compatible completions endpoint such as a local LM Studio server.
FasterQwenEnginepip install "realtimetts[qwen]"Needs reference audio/text or a speaker embedding; CUDA is the expected fast path.
OmniVoiceEnginepip install "realtimetts[omnivoice]"Requires reference audio and exact reference text.
PocketTTSEngine / PocketTTSGpuEnginepip install "realtimetts[pockettts]"; for GPU use pip install "realtimetts[pockettts-gpu]", install CUDA PyTorch, then install the pinned PocketTTS GPU fork.Optional prompt WAV for voice cloning; CPU-oriented default, separate CUDA fork engine.
NeuTTSEnginepip install "realtimetts[neutts]"; use realtimetts[neutts-gguf] for NeuTTS optional extras.Use neutts[llama,onnx] and GGUF for low-latency streaming.
ZipVoiceEnginepip install "realtimetts[zipvoice]" plus a ZipVoice checkout passed as zipvoice_root.Needs prompt WAV and exact transcript; use distill with at least 3 steps for fast quality work.
LuxTTSEnginepip install "realtimetts[luxtts]" or install LuxTTS separately.Pass lux_root if using a local LuxTTS checkout; requires prompt WAV/text.
ChatterboxEnginepip install "realtimetts[chatterbox]"Uses chatterbox-tts; prompt WAV should be longer than 5 seconds.
SoproTTSEnginepip install "realtimetts[sopro]"Uses sopro; optional Hugging Face cache/token and reference WAV.
SopranoEnginepip install "realtimetts[soprano]"Uses soprano-tts; single-voice English, no cloning.
MossTTSEnginepip install "realtimetts[moss]" or install MOSS-TTS-Nano separately.Needs MOSS model/runtime assets; ONNX and torch backends have different dependencies.

Cloud Credentials

Cloud engines usually accept an API key constructor argument and also read an environment variable. Azure is the current exception: older docs mention env vars, but the source constructor takes direct key and region arguments.

EngineCredential path observed
OpenAIOPENAI_API_KEY
AzureConstructor arguments speech_key and service_region
ElevenLabsELEVENLABS_API_KEY
CAMBCAMB_API_KEY
MiniMaxMINIMAX_API_KEY
CartesiaCARTESIA_API_KEY
TypecastTYPECAST_API_KEY, optional TYPECAST_VOICE_ID
ModelsLabMODELSLAB_API_KEY

External Tools

Some engines need tools or assets outside Python packages.

RequirementUsed byNotes
mpvEngines that stream compressed audio, including Edge, ElevenLabs, OpenAI MP3, MiniMax, and ModelsLab.Run mpv --audio-device=help to inspect mpv output device names.
ffmpegAudio conversion workflows through pydub.Install from your OS package manager or ffmpeg.org.
Piper executable and model filesPiperEnginePIPER_PATH can point to the executable.
Local model checkouts or Hugging Face assetsMany local neural enginesNeeded by engines such as Coqui, Parler, StyleTTS2, ZipVoice, LuxTTS, Sopro, Soprano, and MOSS-TTS.
CUDA, PyTorch, torchaudio, CUDNNLocal neural enginesExact requirements vary by engine and model.
NLTK punkt and punkt_tab dataSentence splitting around many neural engine testsSeveral Zaphod venvs needed local tokenizer data to avoid blocked online lookups.

Packaging Notes

Some engines need setup outside the Python extras, and a few compatibility notes are worth checking before choosing an engine:

  • ModelsLabEngine is exported from RealtimeTTS.engines, but not from the root RealtimeTTS lazy export table.
  • PiperEngine still needs an external executable and voice model; its setup extra cannot install those assets.
  • StyleTTSEngine and ZipVoiceEngine still need local upstream checkouts and model assets even though setup extras now install their Python dependency scaffolding.
  • [all] is now broader, but it is a best-effort Python dependency set and still cannot install OS tools, CUDA builds, local model files, or provider accounts.
  • setup.py declares Python >=3.9, <3.15, while older docs still say <3.13.

See the source inventory for the full audit notes.