Nodes/comfyui-minimax-h3-prompt-enhancer-T8/T8 语音参考 / Speech Reference(默认关闭)
ComfyUI Node

T8 语音参考 / Speech Reference(默认关闭)

Stop your H3 prompt enhancer inventing the dialogue

By T8mars·Created 3 months ago·Updated about 11 hours ago· 378
T8 语音参考 / Speech Reference(默认关闭)
  • audio
  • video
  • provider_config
  • speech_reference
  • speech_text
  • timed_transcript_json
  • subtitles_srt
◄modeOff►
◄source_modeProvided text►
◄purposereference►
◄provided_text►
◄provided_formatauto►
◄speaker_map_json{}►
◄partial_policyreject►
◄failure_policystop►
◄start_s0.00►
◄duration_s0.00►
◄languageAuto►
◄context►
◄audio_track0►
◄channelmean►
◄offset_ms0►
◄timeout_s1800.00►

Here's the trap nobody mentions when they hand you a prompt enhancer. The H3 and Seedance nodes in this pack read your text and your visuals. They do not hear anything. That's the architecture, not a bug - local video analysis samples timestamped frames and never touches the audio track, and the cloud vision path rejects input_audio outright. So when you write "the woman argues with the guard," the LLM writes her lines for her. Lines you didn't ask for, in a language you didn't pick.

T8SpeechReference is the door for real words. It turns existing subtitles, or an audio/video track, into a validated transcript contract that plugs into an optional socket on those enhancers. It is Off by default, and that matters: connect it and leave it off and your old workflow behaves exactly as it did.

How it works

Three sources, one selected at a time. Provided text is fully offline: paste plain text, SRT, VTT or the node's own canonical JSON and provided_format: auto sniffs it ({/[ → JSON, WEBVTT → VTT, a --> line → SRT, otherwise plain). No service, no key, no network. AUDIO and VIDEO send the track to an already running Strata service's CPU transcription worker. It doesn't start, stop, switch or unload anything on that service, and it never downloads weights - if Strata isn't up, you get an error before any billed work.

Output is a closed typed contract (t8-speech-reference/v1), not loose text. Wired into an enhancer, it's injected as a fenced evidence block the model is told to treat as quoted data, not instructions, and the enhancer gains a speech-aware output check: at most one extra speech-contract correction, counted separately from the language and quality corrections, which may bill.

The inputs you'll actually touch

  • mode - Off / Enabled. Off returns nothing and no downstream behaviour changes.
  • source_mode - Provided text / AUDIO / VIDEO. One at a time; a hidden cached subtitle in the tab won't leak into an AUDIO request.
  • purpose - the one that bites people. reference (default) means understand the words, don't speak them: the enhancer won't reproduce the transcript as dialogue unless your main prompt already supplies those same words. keep_dialogue locks the exact wording, language, order and count - and it requires you to assign roles in speaker_map_json, e.g. {"default":"<Subject 1> / S1"} for H3 or {"default":"讲解者"} for Seedance. Read that as you deciding who says it - ASR doesn't identify speakers and the node won't guess.
  • provided_text / provided_format - the offline path. Cues need blank lines between them, duplicate IDs are rejected, and subtitles with <v> tags or HTML entities are refused rather than read as dialogue.
  • The advanced block is genuinely optional: start_s / duration_s window (0 = rest of the input), language, context vocabulary hints, audio_track (must be 0 for AUDIO), channel, offset_ms calibration, partial_policy (default: reject partials), failure_policy (default: stop), timeout_s.

Outputs: speech_reference goes to the H3 or Seedance node's optional "语音/字幕参考(可选)" socket. speech_text is a plain string you can reuse in the Music 3, YuE2 or Qwen nodes. timed_transcript_json and subtitles_srt are for proofreading - and corrected JSON beats corrected SRT, since SRT keeps your cue IDs only when they're all numeric and rounds to milliseconds.

Install

No special steps - install the pack and you have it:

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-prompt-enhancer-T8.git

or search ComfyUI-Manager for MiniMax H3 / Seedance 2.0 / Music 3 Prompt Enhancer (T8). Restart, then Ctrl+F5. The pack's dependencies are NumPy, Pillow and requests - no dependency surgery - and Provided text needs no key and no Strata service at all. For automatic transcription, add T8 LLM Provider Config in Strata mode only if your service isn't on the default http://127.0.0.1:8080.

Where people get burned

Auto transcription requires a newer Strata that advertises an atomic CPU guard. Older services are rejected hard rather than quietly downgraded to GPU - for good reason, since a CUDA ASR pass can evict your resident models. Expect "it just errors" on an old build.

Two limits from the author's acceptance notes: timestamps are segment estimates, not word-level or lip-sync alignment, and source time isn't target-film time. Their ASR testing covered clean synthetic speech - overlapping speakers, noise, dialects and sung vocals are untested - so treat a transcript as evidence you check, not truth. And it's not music or ambience understanding either.

Last workflow note: a failed validation isn't cached as success, and "restore last result" reads the in-process cache without re-running ASR - so re-run the enhancer rather than re-transcribing, unless the words themselves were wrong.

CategoryT8/Utilities

Inputs (19)

NameTypeDefaultDescription
modeCOMBOOff2 options: Off, Enabled
source_modeCOMBOProvided text3 options: Provided text, AUDIO, VIDEO
purposeCOMBOreference2 options: reference, keep_dialogue
provided_textSTRING—
provided_formatCOMBOauto5 options: auto, plain, srt, vtt, json
speaker_map_jsonSTRING{}keep_dialogue 必须明确指派角色。例:{"default":"<Subject 1> / S1"};default仅为用户指派,不代表识别出了单说话人。也可按cue ID或speaker ID分别映射。
partial_policyCOMBOreject2 options: reject, accept_review
failure_policyCOMBOstop2 options: stop, continue_empty
start_sFLOAT0.000–86400—
duration_sFLOAT0.000–3600—
languageCOMBOAuto12 options: Auto, Chinese, English, Cantonese, Japanese, Korean, +6
contextSTRING—
audio_trackINT00–31—
channelCOMBOmean3 options: mean, left, right
offset_msINT0-86400000–86400000—
timeout_sFLOAT1800.005–86400—
audiooptAUDIO—
videooptVIDEO—
provider_configoptT8_LLM_PROVIDER_CONFIG—

Outputs (4)

NameTypeDescription
speech_referenceT8_SPEECH_REFERENCE—
speech_textSTRING—
timed_transcript_jsonSTRING—
subtitles_srtSTRING—