Skip to main content

Installation & Setup

The easiest way is via PyPI:
For development or local modifications:
We recommend using Python 3.12 in a clean conda environment.
FlashAttention-2 is optional but highly recommended for:
  • Reduced GPU memory usage
  • Faster inference
  • Better performance
Install with:
If you have limited RAM (< 96GB) and many CPU cores:
FlashAttention requires compatible hardware (Ampere or newer GPUs). See the FlashAttention repo for details.
Minimum:
  • Python 3.9 or newer (3.12 recommended)
  • CUDA-compatible GPU with 8GB+ VRAM
  • 16GB+ system RAM
Recommended for 1.7B models:
  • Python 3.12
  • NVIDIA GPU with 16GB+ VRAM (A100, RTX 4090, etc.)
  • 32GB+ system RAM
  • FlashAttention-2 support (Ampere or newer)
For 0.6B models:
  • 8GB VRAM is sufficient
  • 16GB system RAM
For users in Mainland China, use ModelScope for faster downloads:
Then load from the local directory:
International users can use Hugging Face:

Model Selection

Choose based on your use case:CustomVoice (1.7B or 0.6B)
  • Use 9 predefined premium voices
  • Control tone/emotion with natural language instructions
  • Best for: Apps with fixed character voices, production deployments
VoiceDesign (1.7B only)
  • Generate voices from text descriptions
  • Create unique voices on demand
  • Best for: Creative applications, voice prototyping, character design
Base (1.7B or 0.6B)
  • Clone any voice from 3-second reference audio
  • Highest quality cloning
  • Best for: Personalization, voice transfer, fine-tuning base
0.6B vs 1.7B:
  • 0.6B: Faster, less memory, good quality
  • 1.7B: Best quality, more natural, better instruction following
12Hz Tokenizer (Recommended):
  • Higher quality audio reconstruction
  • Better content consistency (lower WER)
  • Models: Qwen3-TTS-12Hz-(0.6B/1.7B)-(CustomVoice/VoiceDesign/Base)
25Hz Tokenizer:
  • Faster inference
  • Slightly lower quality
  • Models: Qwen3-TTS-25Hz-(0.6B/1.7B)-(CustomVoice/Base)
For most applications, use 12Hz models for best quality.
Yes! The Base models (0.6B and 1.7B) are designed for fine-tuning.See the Fine-tuning Guide for detailed instructions.Fine-tuning is useful for:
  • Domain-specific vocabulary
  • Custom language variants or dialects
  • Specialized voice characteristics
  • Improved performance on specific tasks

Usage & Features

Qwen3-TTS supports 10 major languages:
  • Chinese (Mandarin)
  • English
  • Japanese
  • Korean
  • German
  • French
  • Russian
  • Portuguese
  • Spanish
  • Italian
Plus Chinese dialects:
  • Beijing dialect (Dylan)
  • Sichuan dialect (Eric)
All models support all languages. For best quality, use each speaker’s native language, though cross-lingual synthesis is supported.
Voice cloning with the Base model is very fast:
  • First generation with new voice: 2-4 seconds (includes prompt extraction)
  • Subsequent generations with cached prompt: < 1 second
For multiple sentences with the same voice, use reusable prompts:
Input (for voice cloning):
  • WAV, MP3, FLAC, OGG (via librosa)
  • URLs (http/https)
  • NumPy arrays
  • Base64 strings
  • Tuples: (numpy_array, sample_rate)
Output:
  • NumPy arrays (float32, -1.0 to 1.0)
  • Sample rate: 16000 Hz
Save with soundfile:
Yes! All models support streaming generation for low-latency applications.The Dual-Track hybrid streaming architecture enables:
  • First audio packet after single character input
  • End-to-end latency as low as 97ms
  • Suitable for real-time interactive scenarios
For streaming API usage, see the DashScope API documentation.Python package streaming support is coming soon.
CustomVoice and VoiceDesign models: Yes, via natural language instructions.
Base model: Control is limited. The model focuses on high-fidelity cloning and relies on the reference audio’s characteristics.
CustomVoice models include 9 premium speakers:Get the list programmatically:

Performance & Optimization

  1. Use FlashAttention-2
  2. Use bfloat16 dtype
  3. Use smaller model (0.6B instead of 1.7B)
  4. Batch processing
  5. Use vLLM for production deployments
Try these solutions:
  1. Use smaller model
  2. Use float16 instead of bfloat16
  3. Reduce batch size
  4. Reduce max_new_tokens
  5. Clear CUDA cache
Yes, but it will be much slower:
For CPU inference:
  • Use 0.6B model for reasonable performance
  • Expect 10-50x slower than GPU
  • Consider using quantized models (coming soon)
Recommended options:
  1. DashScope API (Easiest)
  2. vLLM-Omni (Self-hosted, optimized)
    • Best performance for self-hosted deployments
    • Batch inference optimization
    • See vLLM-Omni quickstart
  3. Gradio demo (Quick prototypes)
  4. Custom Flask/FastAPI service
    • Wrap the Python API in your own service
    • Full control over API design
    • Use gunicorn/uvicorn for production

Troubleshooting

Common causes and solutions:
  1. Reference audio quality (Base model)
    • Use high-quality reference audio (16kHz+, no noise)
    • Provide accurate transcript
    • Use 3+ seconds of reference audio
  2. Text quality
    • Check for typos or special characters
    • Ensure proper punctuation
    • Avoid extremely long sentences
  3. Model selection
    • Try 1.7B model instead of 0.6B
    • Use 12Hz instead of 25Hz tokenizer
  4. Generation parameters
Try these solutions:
  1. Disable x-vector only mode
  2. Improve reference audio
    • Use clean audio without background noise
    • Ensure clear speech without mumbling
    • Use 3-5 seconds of audio
    • Include diverse phonemes
  3. Match target language to reference
    • If reference is English, generate English first
    • Cross-lingual cloning is harder
  4. Use longer reference audio
    • 5-10 seconds often works better than 3 seconds
    • Multiple sentences with varied intonation
This is a browser security issue. Solutions:
  1. Use HTTPS (Required for remote access)
  2. Access via localhost (HTTP allowed for localhost)
    Then access at http://127.0.0.1:8000
  3. Check browser permissions
    • Allow microphone access when prompted
    • Check browser settings for microphone permissions

API & Integration

Yes! Use the DashScope API for production-ready REST API access:Features:
  • Streaming support
  • No infrastructure management
  • Pay-per-use pricing
  • Global availability
Yes! The Python API is framework-agnostic. Example integration:

Licensing & Commercial Use

Qwen3-TTS is released under the Apache 2.0 License.You are free to:
  • Use commercially
  • Modify and distribute
  • Use privately
  • Include in proprietary software
See the LICENSE file for full details.
Yes! Qwen3-TTS is free for commercial use under Apache 2.0.However:
  • You are responsible for the content generated
  • Do not use for illegal, harmful, or infringing content
  • Follow local laws regarding AI-generated audio
  • Consider ethical implications (deepfakes, impersonation, etc.)
See the model’s disclaimer for full terms.

Still Have Questions?

GitHub Issues

Report bugs or request features

Discord

Chat with the community

WeChat Group

Join Chinese community