andimarafioti/faster-qwen3-tts
Local Qwen3-TTS streaming with Torch graphs and a native GGML backend
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Faster Qwen3-TTS is a Python inference engine with two execution paths. The Torch path uses a static cache and captures decode work with torch.cuda.CUDAGraph to reduce per-step overhead. On AMD ROCm, PyTorch exposes the same torch.cuda API, so the backend remains torch and the device remains cuda. The experimental GGML adapter delegates inference to the native qwentts.cpp runtime through qwentts-cpp-python.
Applications load the engine through FasterQwen3TTS.from_pretrained or use the faster-qwen3-tts CLI. Streaming generation yields audio chunks with sample rate and timing data; full generation returns the audio at once. warmup(prefill_len=100) captures Torch graphs ahead of requests and is a no-op on GGML. For HTTP integrations, examples/openai_server.py wraps synthesis behind an OpenAI-compatible speech endpoint rather than requiring clients to use the Python interface.
Key Capabilities & Differentiators
The model lineup covers 0.6B and 1.7B Base voice cloning via speaker embeddings (xvec) or full in-context conditioning (ICL), plus 1.7B CustomVoice and VoiceDesign. GGML can cache reference audio as .spk speaker latents and .rvq acoustic latents or accept those assets directly. The example server maps requested voice names to reference configurations and streams WAV and PCM; MP3 requires pydub.
On the RTX 4090, the CUDA Graphs benchmark reduced time to first audio from 800 ms to 156 ms for 0.6B and from 850 ms to 174 ms for 1.7B. The corresponding generation rates were 4.78× and 4.22× real time, using the project's convention of audio duration divided by generation time. These are benchmark results, not service latency budgets: the 1.7B model reached only 0.925× real time and 1,096 ms to first audio on a Tesla T4.
Trade-offs & Limitations
The graph path improves time to first audio against the upstream dynamic-cache baseline on the listed hardware, but its static-cache output is not bit-identical: kernel and reduction order differ, so assess the supplied audio pairs and listen to your own material. Chunking also trades latency for throughput. On Jetson AGX Orin with 0.6B, a one-step chunk starts at 240 ms but generates at 0.750× real time; two steps start at 266 ms and reach 1.042×, the smallest tested chunk that sustains real-time output.
Audio streaming is independent of non_streaming_mode, which controls how input text is fed into generation. GGML can stream audio but cannot honor explicit step-by-step text feeding through its current ABI; it warns and uses its native layout. Compared with a managed alternative such as ElevenLabs, self-hosting gives you control over where inference and reference files live, but you own runtime compatibility, capacity planning, and service operations. The example endpoint supplies the speech API contract, not a verified production serving stack.
Hardware & Deployment Guide
Install faster-qwen3-tts with Python 3.10+; the Torch path requires PyTorch 2.5.1+ and a compatible CUDA or ROCm environment. Match the NVIDIA driver to the PyTorch build; RTX 50-series Blackwell uses CUDA 12.8 wheels. The validated MI300X VF Torch setup used ROCm 7.2.4, PyTorch 2.9.1 and transformers==5.15.1. Do not install qwen-tts-hf alongside qwen-tts, as both provide the qwen_tts package.
On macOS 14+ with native Apple Silicon Python, the default installation includes GGML Metal; the wheel does not support Intel Macs or Rosetta Python. Elsewhere, use the ggml extra with a matching native runtime. AMD GGML requires a source build with GGML_HIP=ON and selection of ROCm0; the published Linux wheels are for NVIDIA CUDA. For local HTTP serving, install the demo extra and run the example server from a checkout. v0.5.4 moved the GGML dependency to qwentts-cpp-python 0.5.0 with ABI v5 and kept native diagnostics quiet by default, with --verbose available for troubleshooting.
Self-hosted voice agents or local playback pipelines that need early audio, local control of reference material, and a team that can benchmark and operate the target hardware.
You need managed capacity and service guarantees, or your chosen GGML deployment must support step-by-step text feeding.
Quick Start & Installation
pip install faster-qwen3-ttsComparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| faster-qwen3-tts ★ | 1.4k | +12 | Python | MIT | Local Qwen3-TTS streaming with Torch graphs and a native GGML backend |
| fish-speech | 34k | +84 | Python | — | Self-hosted PyTorch speech inference for directed, multi-speaker audio |
| voicebox | 61.8k | +399 | Python | MIT | Local-first voice studio with multi-engine speech synthesis, dictation and MCP. |
| ChatTTS | 40.1k | +24 | Python | AGPL-3.0 | Local autoregressive TTS for expressive Chinese and English dialogue |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/andimarafioti/faster-qwen3-tts.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about faster-qwen3-tts
Can I connect an OpenAI-compatible client without writing an adapter?
examples/openai_server.py with the demo extra and point the client at POST /v1/audio/speech. With --voices, the request’s voice field selects a named reference configuration. WAV and PCM stream during generation; MP3 requires pydub.How much GPU memory do I need, and how should I size the service?
What should I check before using it commercially or hosting it internally?
.spk and .rvq files in your data-retention policy.When is it a better fit than upstream Qwen3-TTS or ElevenLabs?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy