Qwen3-TTS
Ultra-low-latency streaming TTS โ Qwen3 text-to-speech model with a first audio packet latency of 97ms.
- Ultra-low latency streaming synthesis: Dual-Track hybrid streaming architecture achieves a first audio packet latency of 97ms (0.6B) / 101ms (1.7B). Voice output begins immediately upon entering a single character. - 3-second zero-shot voice cloning: Replicates the speaker's timbre, rhythm, and intonation using only 3 seconds of reference audio to synthesize new text in that voice. - Natural language voice design (Voice Design): Generates completely new voices using only natural language descriptions such as "a tense teenage male voice." The generated voice can be reused in the Base model. - 10-language multilingual TTS: Supports Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, and Italian. Cross-lingual synthesis is also possible. - Proprietary 12Hz tokenizer: Achieves an extreme compression rate of 12.5 frames per second with a 16-layer multi-codebook design. Fully preserves acoustic information with a 2048-entry codebook (PESQ 3.21, STOI 0.96, UTMOS 4.16). - 9 preset speakers (CustomVoice): Includes 9 native speakers of Chinese, English, Japanese, and Korean, such as Vivian, Serena, Ryan, Aiden, Ono_Anna, and Sohee. - 5 model lineups: 0.6B Base/CustomVoice, 1.7B Base/CustomVoice/VoiceDesign โ selectable based on resources and intended use.
๐ป System Requirements
For the 0.6B model with BF16 precision, approximately 2-4GB of RAM is required; for the 1.7B model with BF16 precision, approximately 4-8GB of RAM is required. NVIDIA GPU with FlashAttention 2 support is recommended (RTX 3060 or higher). CPU-only execution is possible, but real-time streaming will not be supported.
Approximately 1-3GB of storage is required for each model (BF16 safetensors format). A total of 5 models plus the tokenizer will require approximately 10-15GB of storage.
โก Installation
### 4-1. Quick Start
```bash
pip install -U qwen-tts
pip install -U flash-attn --no-build-isolation # Optional, for GPU acceleration
```
### 4-2. Source Code Installation
```bash
git clone https://github.com/QwenLM/Qwen3-TTS.git
cd Qwen3-TTS
pip install -e .
```
### 4-3. Basic Usage (Voice Cloning)
```python
import torch
import soundfile as sf
from qwen_tts import Qwen3TTSModel
model = Qwen3TTSModel.from_pretrained(
"Qwen/Qwen3-TTS-12Hz-1.7B-Base",
device_map="cuda:0",
dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
)
wavs, sr = model.generate_voice_clone(
text="Hello, this is a voice cloning demo.",
language="English",
ref_audio="reference.wav",
ref_text="Reference audio transcript"
)
sf.write("output.wav", wavs[0], sr)
```
### 4-4. Natural Language Voice Design
```python
model = Qwen3TTSModel.from_pretrained(
"Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign",
device_map="cuda:0",
dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
)
wavs, sr = model.generate_voice_design(
text="This is a voice design demo.",
language="Chinese",
instruct="A warm, gentle female voice with a slow speaking pace"
)
sf.write("designed_voice.wav", wavs[0], sr)
```
### 4-5. Run Web UI Demo
```bash
qwen-tts-demo Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice --ip 0.0.0.0 --port 8000
```๐งฌ Bio Use Cases
Multilingual Clinical Trial Voiceover Automation
In global clinical trials, automatically generate standardized voiceovers for Informed Consent documents in 10 languages. Select native speaker voices for each language using CustomVoice presets, and batch-synthesize audio guides tailored to each patient cohort. This reduces production time to one-tenth compared to traditional voice actor recordings, while maintaining pronunciation accuracy (WER of 1.24% or less).
Multilingual Narration for Medical Education Content
Use the Voice Design feature to create custom narrators based on natural language instructions, such as "a calm and authoritative voice of a middle-aged male doctor," for medical lectures and protocol videos. Utilize the 1.7B-VoiceDesign model to perform cross-lingual synthesis, converting Korean original lectures into English, Japanese, German, and other languages for international distribution. Enable real-time subtitle synchronization with 97ms streaming.
Laboratory Protocol Voice Assistant
Provide voice guidance for laboratory protocols to researchers who cannot use their hands during wet-lab experiments. Clone the voice of the lab's PI using a 3-second reference and stream-synthesize step-by-step instructions in a familiar voice. The 0.6B lightweight model enables real-time execution on a workstation GPU, maximizing efficiency in hands-free environments such as pipetting and centrifugation.
๐ Update Notes
No update notes yet.
๐งช Related Code of Life
No related Code of Life posts yet.