dots.tts 多角色音色映射 · T8star-Aix
SpeakerMap — build a whole voice cast for your subtitles, no JSON until you outgrow it
- voice_a
- voice_b
- voice_c
- voice_d
- fallback_voice
- 多角色音色映射
- 映射信息 JSON
If you're dubbing a script with more than one character, this is the node that turns "which voice is talking?" into a wiring problem instead of a pile of if-statements. T8_DotsTTS_SpeakerMap maps the character names in your subtitle file to actual cloned voices, producing a T8_DOTS_TTS_SPEAKER_MAP that T8_DotsTTS_Project and T8_DotsTTS_BatchQueue consume. It's how a single project file gets five different characters all reading their own lines in their own voices.
The character naming is flexible because it comes from how you write your subtitles. In an SRT or VTT line you mark a role with a prefix: [旁白] 文本, 旁白:文本, or the WebVTT <v 旁白>文本 form. This node maps those role names to voice slots. Out of the box there are four hard slots - voice_a through voice_d - plus a fallback_voice for any character that doesn't match. The mapping_json input (default {"旁白":"A","小明":"B"}) declares who maps to which slot.
The four-slot limit is real but you'll rarely hit it, because voice_library is the escape hatch. You can paste a voice library JSON (or a file path to one - the pack ships example_workflows/voice_library.example.json) that describes each character with audio, transcript and language fields. That lifts the character count from four to "however many your library defines," and relative audio paths resolve from the library file's own directory, so a cast library in a folder just works.
What each voice slot expects is a T8_DOTS_TTS_VOICE - the output of T8_DotsTTS_VoicePrompt. So the assembly is: clone each voice once, wire the voices into A–D and fallback, write the mapping, feed the map to Project. Outputs are the map itself plus a mapping_info JSON that spells out which role resolved to which voice - and, crucially, which roles fell back to the default. Read that JSON on your first run; an unmapped role silently using the fallback is the most common surprise, and the report makes it obvious.
What actually matters in practice
mapping_jsonis the source of truth for roles; the A–D slots are where the voices live. Keep them in sync or the wrong character talks.- The fallback is your friend. Wire the narrator or your most generic voice into
fallback_voiceand you can safely add characters to subtitles without touching the map. - Same-voice consistency comes from reusing one VoicePrompt output - dots.tts's continuation clone keeps a character's delivery stable across a long project, which is the whole appeal for dubbing work. See the character-consistency notes in the knowledge base for why this matters for keeping a cast believable.
No install extras - just the pack (Manager → dots-tts-t8, or clone + pip install -r requirements.txt) and the voices you clone with VoicePrompt. The node itself is cheap; the cast is the work.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| mapping_json | STRING | {"旁白":"A","小明":"B"} | — |
| voice_library | STRING | — | |
| voice_aopt | T8_DOTS_TTS_VOICE | — | |
| voice_bopt | T8_DOTS_TTS_VOICE | — | |
| voice_copt | T8_DOTS_TTS_VOICE | — | |
| voice_dopt | T8_DOTS_TTS_VOICE | — | |
| fallback_voiceopt | T8_DOTS_TTS_VOICE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 多角色音色映射 | T8_DOTS_TTS_SPEAKER_MAP | — |
| 映射信息 JSON | STRING | — |