TS CosyVoice Text to Voice
10 seconds of a voice, any text, and a line about how it should sound
- model
- reference_audio
- audio
This is the node most people install the pack for. TS CosyVoice Text to Voice takes a short clip of a real voice, a block of text, and a plain-English instruction about delivery, and speaks the text in that voice - timbre cloned from the reference, emotion steered by the instruction. It's the zero-shot voice cloning that made local TTS competitive with the paid services, and it runs entirely on your GPU. No API, no key, nothing leaves your machine.
CosyVoice 3 is Alibaba's model, and the community's one-line verdict on it is "max speaker similarity" - its clone fidelity is the reason to reach for it over F5-TTS (faster but lower-ceiling) or Chatterbox (better known, but a different trade). The pack exists partly because Alibaba's own ComfyUI wrapper was stuck on CosyVoice 1 for over a year; this one wraps v3 properly.
How it works
The node runs CosyVoice's inference_instruct2: your reference_audio becomes the prompt (automatically trimmed to 30 seconds, downmixed to mono 24 kHz), your text is what gets synthesized, and instruct_text is a separate instruction input that guides emotion, pacing, and delivery. Long text gets split into chunks and recombined, so you can throw a paragraph at it. The clone quality is essentially decided by the reference: clean 5–15 seconds of a single speaker, one tone, no music, no reverb, beats a noisy 30-second grab every time.
The inputs that matter
reference_audio- the whole game. Quality here is the ceiling for everything else.text- what to say.instruct_textplusemotion_preset- the fun part. The preset dropdown ships 12 delivery presets (warm/friendly, calm/soft, energetic, dramatic, intimate, authoritative, playful, and so on). Pick "Your instruction" and type whatever you want: "speak warmly and slowly," "sound excited." The instruction is only read when you select the custom option.speed- 0.5× to 2× output rate. Usually stays at 1.seed- leave at 42 for reproducibility, or set -1 for a fresh take every run. Fixed seeds give you the same take back, but repeated runs with the same seed can start to sound mechanical - the README says this out loud.
One input to know about but rarely touch: text_normalize. It's on by default; switch it off if you're feeding it CMU phonemes or special tags that normalization would mangle.
Output
A single audio output. Wire it into any Save Audio / Preview Audio node. That's the whole pipeline: Model Loader → Text to Voice → Save Audio.
Installing
Search TS CosyVoice in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AlexYez/comfyui-ts-cosyvoice.git
cd comfyui-ts-cosyvoice
pip install -r requirements.txt
Two extra steps that aren't optional: install one ONNX Runtime (pip install onnxruntime-gpu for NVIDIA, onnxruntime otherwise), and make sure CUDA torch is in place before the pack's deps. The ~1.5 GB model downloads itself into ComfyUI/models/cosyvoice/ the first time you run the Model Loader.
Troubleshooting
- Output voice sounds nothing like your reference - the reference is the problem. Music, room echo, or two people talking in one clip will wreck the clone. Grab a cleaner 5–15 seconds.
- It errors that
inference_instruct2isn't available - you need a CosyVoice 2/3 model, so check what the Model Loader is pointing at. - Nothing but the first clip of a batch comes through - the pack rejects multi-clip batches on purpose now (it used to silently drop the rest). Split the batch upstream or run once per clip.
- Every rerun sounds identical - set
seedto-1.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COSYVOICE_MODEL | Загруженная модель CosyVoice из ноды загрузчика. | |
| text | STRING | Hello, this is my cloned voice speaking. | Текст, который нужно озвучить голосом из референса. |
| instruct_text | STRING | Speak in a warm and friendly tone. | Текстовая инструкция для эмоции и манеры речи; используется только при выборе пункта 'Ваша инструкция'. |
| reference_audio | AUDIO | Референсный голос; аудио будет обрезано до 30 секунд и приведено к mono 24 kHz. | |
| speed | FLOAT | 1.000.5–2 | Множитель скорости итоговой речи. |
| seedopt | INT | 42-1–2147483647 | Зерно случайности; значение -1 использует случайный seed. |
| text_normalizeopt | BOOLEAN | true | Включает нормализацию текста; отключайте для фонем CMU и специальных тегов. |
| emotion_presetopt | COMBO | Ваша инструкция | Готовый пресет эмоции и манеры подачи; при выборе 'Ваша инструкция' используется поле instruct_text. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |