XB-BOX - 🔄 CosyVoice3 语音转换
Respeak someone else's words in your own voice
- model
- source_audio
- target_audio
- audio
Voice conversion is the sibling of voice cloning, and it's the one people overlook. Cloning makes new speech in a voice. Conversion takes existing speech - someone else's words, an old recording, a podcast clip - and re-renders it so it sounds like a different person said it. In CosyVoice3 terms: one audio is the content, the other is the voice, and the node keeps the first and swaps the second.
Reach for it when you have source material you want to re-voice without re-recording. Localizing an existing voiceover into a character's voice, rescuing a take where the recording was bad but the delivery was right, or just dubbing one person over another for a demo. It's not a replacement for clean text-to-speech - you can't edit the words this way - but for transforming audio you already have, it's exactly the tool.
How it works
The node takes source_audio (the words) and target_audio (the voice to copy), checks both are between 0.5 and 30 seconds, resamples them to the model's 24kHz, and calls CosyVoice's inference_vc - the model's dedicated voice-conversion path. Under the hood that's a soft voice conversion: it extracts the content from the source and the timbre from the target, then re-synthesizes, which is why the target only needs a few seconds while the source can be a full line.
One thing to be clear-eyed about: the output isn't the target's voice reading the source's words with perfect prosody. It's a conversion, so it inherits the pitch contour and rhythm of the source while wearing the target's timbre. That's usually what you want - the delivery stays - but if the source is flat, the result will be flat, because the target audio only supplies the voice, not the performance.
The inputs that matter
- source_audio - the speech to convert. 0.5–30s. The words and the delivery come from here.
- target_audio - the voice to become. 3–10s of clean, single-speaker audio. The timbre comes from here.
- speed - 0.5x to 2.0x, applied to the output.
- seed - default 42; fix it while tuning so you can compare takes honestly.
Output: audio (AUDIO), into a preview or saver, or a downstream video/digital-human stage.
Install and gotchas
Same pack install as the rest of the suite: ComfyUI Manager → XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart, CosyVoice deps from requirements.txt.
The failure modes are all audio-hygiene issues. Both clips get duration-checked (0.5s min, 30s max), so long files need cropping first. Background music or a second speaker in the target contaminates the timbre directly - this is the one clip where you must be picky. And because conversion inherits source prosody, feeding it a source with heavy reverb or studio processing will carry that through into the re-voiced output.
There's one structural limit worth knowing: the model needs inference_vc support, and if you load CosyVoice-300M (the oldest model in the loader), that method may not exist - you'll get a clean error telling you the model doesn't support conversion. Stick with CosyVoice3 and it's a non-issue.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COSYVOICE_MODEL | — | |
| source_audio | AUDIO | — | |
| target_audio | AUDIO | — | |
| speed | FLOAT | 1.000.5–2 | — |
| seedopt | INT | 42-1–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |