Skip to content
View original post on X: meng shao
Published
44/100

Armin Ronacher explains building custom voices with Qwen3-TTS

AIArmin Ronacher says Qwen3-TTS Base can clone a voice from about 28 seconds of audio and extract a roughly 2048-number speaker embedding. He reports that feeding that embedding into CustomVoice lets the cloned voice take instructions such as sad or whispering, though results are less stable than with built-in speakers.
meng shaoVerified on X
@shao__meng
View on X

Armin Ronacher 的 Qwen3-TTS 自定义音色笔记

Armin 和孩子做地下城爬行小游戏时需要旁白,又不想用大众脸 AI 声线,就想到用 Qwen3-TTS 的 Base 克隆给出约 2048 维说话人嵌入;把它塞进 CustomVoice 的同一说话人槽位,就能在克隆音色上加「悲伤 / 耳语」类指令;嵌入还能做加权混合、回烤成参考音,甚至用「平均女声 − 平均男声」方向挪动性别感,可玩性很高!
https://lucumr.pocoo.org/2026/10/29/qwen3-custom-voices/

Qwen3 三类模型
· Base(1.7B / 0.6B):几秒参考音频克隆;支持上下文克隆或只用 speaker embedding
· CustomVoice:九个内置说话人 + 指令(如情绪、风格)
· VoiceDesign:用文字描述「发明」一个声音

Armin 遇到的问题:Base 能克隆,但文档路径下不能一边克隆一边下指令(「伤心地说」)。官方变通多是:单说话人微调 Base,或 VoiceDesign 出一段再拿 Base 克隆,指令能力会丢。

Armin 怎么做的?
从 PyAI Conf 演讲里剪约 28 秒、停顿之间完整句,Whisper 出转写。强调:不需要特别干净或特别长;放到低质量通话场景里,骗过熟人并不难(提醒滥用风险)。

可用 VoiceDesign 先造一条「四十来岁、温暖、中低音、平静朗读」的音色,再与本人录音对照、混合。

嵌入与混合
x_vector_only_mode 下,Base 从录音抽出 speaker embedding(约 2048 个数)。同一人相近、不同人分开;也可粗做说话人切分。因为是向量,可做加权平均并按范数缩放,得到「介于两人之间」的音色。文中用本人与设计音做十一档混合:很快就不像本人,但仍保留部分特征,整体更独特。两路录音频谱接近(类似麦与环境)时效果更好。喜欢的混合可再合成一段音频、重新 fingerprint,回烤成单一参考文件(不完全等于原混合,但更好管)。

说话人识别上:用会议片段当参考去认播客里的自己,Qwen3 几乎不行;改用播客开头约 20 秒自我介绍当参考,对后续窗口约 98% 对。专门的说话人验证模型(如 ECAPA)用会议片段也能约 97% 找回。

给克隆音色下指令
观察:CustomVoice 与 Base 操纵说话人的方式同类,往 talker 输入序列插一个向量;CustomVoice 用表中的一行,Base 用 x-vector;生成代码两边都能接,权重几乎相同。于是:用 Base 抽嵌入,交给 CustomVoice 的 voice_clone_prompt,再带 instruct。悲伤等指令在克隆音上不如内置说话人稳,但 Armin 觉得已够给游戏做「别人游戏里不太会撞车」的定制旁白。

性别轴算术
VoiceDesign 各做 14 个男声 / 女声,取平均差当方向,把任意嵌入沿该轴平移(保留其余成分)。文中展示了本人克隆沿轴挪动的样例。收尾 rem:「Use it for good, not evil。」

Armin Ronacher ⇌@mitsuhiko
My boys and I continue to build our little game with AI and a side adventure has been voice overs with custom voices with Qwen3 TTS. Wrote down my learnings from playing with it for a while now. https://lucumr.pocoo.org/2026/10/29/qwen3-custom-voices/
View quoted post on X
Source details

meng shao · x.comPublished · added here

Original title: Armin Ronacher 的 Qwen3-TTS 自定义音色笔记