Qwen3-TTS is a series of advanced multilingual, controllable, robust, and streaming text-to-speech models developed by the Qwen team.
1import torch
2import soundfile as sf
3from qwen_tts import Qwen3TTSModel
4
5# Load the model
6model = Qwen3TTSModel.from_pretrained(
7 "Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice",
8 device_map="cuda:0",
9 dtype=torch.bfloat16,
10 attn_implementation="flash_attention_2",
11)
12
13# Generate speech with specific instructions
14wavs, sr = model.generate_custom_voice(
15 text="其实我真的有发现,我是一个特别善于观察别人情绪的人。",
16 language="Chinese",
17 speaker="Vivian",
18 instruct="用特别愤怒的语气说",
19)
20
21# Save the generated audio
22sf.write("output_custom_voice.wav", wavs[0], sr)
1@article{Qwen3-TTS,
2 title={Qwen3-TTS Technical Report},
3 author={Hangrui Hu and Xinfa Zhu and Ting He and Dake Guo and Bin Zhang and Xiong Wang and Zhifang Guo and Ziyue Jiang and Hongkun Hao and Zishan Guo and Xinyu Zhang and Pei Zhang and Baosong Yang and Jin Xu and Jingren Zhou and Junyang Lin},
4 journal={arXiv preprint arXiv:2601.15621},
5 year={2026}
6}