IndexTTS2-音色情感分别参考
IndexTTS2 with the voice from one clip and the emotion from another
- audio
- ref_audio
- params
- audio_path
- task_id
Most voice-cloning TTS makes you take the emotion along with the voice - the mood in your reference clip leaks into everything you generate. LamIndexTTS2Node1 (音色情感分别参考, "timbre and emotion referenced separately") is the version that lets you split them: one clip for who's talking, a different clip for how they're talking. That's a genuinely useful trick and one of the reasons people get excited about IndexTTS2.
Everything else about it matches its siblings. The node doesn't run the model - it's a client for a separate IndexTTS2 service on http://localhost:5000 (endpoints like /generate and /task/result), submits the job, polls, and drops the finished wav into your ComfyUI output folder.
Inputs that matter
- audio - the 音色 reference: this decides the timbre, i.e. whose voice it sounds like.
- ref_audio - the 情感 reference: this decides the emotion the delivery is colored with.
- text - what to say. Multiline.
- server -
http://localhost:5000, tooltip says don't touch it unless your server moved. - params (optional) - wire
LamIndexTTS2AdvancedParamshere to override sampling settings. - audio_dir (optional) - output subfolder under ComfyUI's output directory.
Both audio and ref_audio accept either a file path or an AUDIO tensor from another node; tensors get saved to temp files before upload. There's a quirk in the source where if you pass ref_audio as a tensor it actually writes audio instead - so in practice, feed both of these as file paths to be safe.
Outputs
- audio_path - full path to the generated audio.
- task_id - the job id on the TTS server.
Install
Part of the ComfyUI_Lam pack:
cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam
or via ComfyUI Manager, then run the README's install + 修改文件 scripts and pull the IndexTTS-2 model (下载模型.bat on Windows). The real prerequisite is a running IndexTTS2 server on port 5000 with the model loaded.
Gotchas
The same "no server on 5000" failure applies here - nothing works until that service is up. Pick an emotion reference with a clear, unambiguous mood; if the clip is neutral mush, you'll get neutral speech and wonder why the feature "didn't work." And watch that tensor-input quirk noted above: path strings are the reliable route for both references. If you only have one clip and want both voice and mood from it, drop down to LamIndexTTS2Node0 instead of duplicating the same file.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| server | STRING | http://localhost:5000 | 请勿修改 |
| audio | AUDIO,STRING | 音色参考音频地址 | |
| ref_audio | AUDIO,STRING | 情感参考音频地址 | |
| text | STRING | 合成内容 | |
| paramsopt | ADVANCED_PARAMS | — | |
| audio_diropt | STRING | 文件夹 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio_path | STRING | — |
| task_id | STRING | — |