Views
No views yet

qwen-tts Python package from PyPI:pip install -U qwen-tts1import torch
2import soundfile as sf
3from qwen_tts import Qwen3TTSModel
4
5# Load the model
6model = Qwen3TTSModel.from_pretrained(
7 "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice",
8 device_map="cuda:0",
9 dtype=torch.bfloat16,
10 attn_implementation="flash_attention_2",
11)
12
13# Custom Voice Generation
14wavs, sr = model.generate_custom_voice(
15 text="其实我真的有发现,我是一个特别善于观察别人情绪的人。",
16 language="Chinese",
17 speaker="Vivian",
18 instruct="用特别愤怒的语气说",
19)
20sf.write("output.wav", wavs[0], sr)| Model | test-zh | test-en |
|---|---|---|
| Qwen3-TTS-12Hz-1.7B-Base | 0.77 | 1.24 |
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}