IndexTTS2-音色情感同时参考
IndexTTS2 voice cloning with timbre and emotion from one reference clip
- audio
- params
- audio_path
- task_id
LamIndexTTS2Node0 is the workhorse of the pack's TTS set: give it a short reference audio clip and some text, and it produces speech in that voice - including the feeling of the clip. This is the "音色情感同时参考" node, meaning the timbre and the emotion both come from the same reference audio. One clip in, voice and mood out.
IndexTTS2 is the open-source IndexTeam model (the same one behind the well-regarded "IndexTTS-2" ComfyUI integrations - community sentiment is that its emotion control is genuinely interesting). The model itself does not run inside ComfyUI. This node is a client for a separate IndexTTS2 HTTP service listening on http://localhost:5000. You start that server, and the node talks to it over /initialize, /generate, and /task/result.
The flow
It checks whether the model is loaded on the server and calls /initialize if not, submits your text plus the reference audio to /generate, then polls until the job completes and downloads the resulting wav into ComfyUI's output directory. Your reference clip can be a file path (string) or an AUDIO tensor from another node - if it's a tensor, the node saves it to a temp file first. So the wiring is easy: text in, reference audio in, wav path out.
Inputs
- server -
http://localhost:5000, tooltip 请勿修改 ("don't modify"). Only change if your IndexTTS2 server is elsewhere. - audio - the reference clip. Path string or AUDIO. This one clip carries both the voice and the emotion.
- text - the lines to synthesize. Multiline, so drop a whole paragraph in if you want.
- params (optional) - plug in
LamIndexTTS2AdvancedParamsto override sampling settings. Not required. - audio_dir (optional) - a subfolder under ComfyUI's output directory where the result lands.
Outputs
- audio_path - full path to the generated wav. Feed it to a play/preview node or
LamSaveAudio. - task_id - the server's job id, handy for bookkeeping.
Install
ComfyUI_Lam pack, same as all its nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam
or via ComfyUI Manager. Run the pack's install + patch scripts per the README, and download the IndexTTS-2 model - the pack ships 下载模型.bat which pulls IndexTeam/IndexTTS-2 from Hugging Face (via the hf-mirror endpoint). Then set up the separate IndexTTS2 service on port 5000; that's the part people forget.
Gotchas
"No server on 5000" is the #1 failure - the node throws if it can't reach it. The model download is multi-gigabyte, so budget for it. And if your reference clip is quiet or short (under a couple seconds), the cloned voice comes out mushy; feed it clean, isolated speech. Want the voice and the emotion from different clips? That's LamIndexTTS2Node1's job instead.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| server | STRING | http://localhost:5000 | 请勿修改 |
| audio | AUDIO,STRING | 参考音频地址 | |
| text | STRING | 合成内容 | |
| paramsopt | ADVANCED_PARAMS | — | |
| audio_diropt | STRING | 文件夹 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio_path | STRING | — |
| task_id | STRING | — |