Nodes/Comfyui-MOSS-Transcribe-Diarize-T8/MOSS 转写解析与校验 · T8star-Aix
ComfyUI Node

MOSS 转写解析与校验 · T8star-Aix

Checks timestamps, tokens, and won't hide the mess

By T8mars·Created 25 days ago·Updated about 21 hours ago· 5
MOSS 转写解析与校验 · T8star-Aix
  • transcript
  • 已校验 MOSS_TRANSCRIPT
  • 校验报告 JSON
  • 段落 JSON
raw_text
media_duration_seconds0.0
generated_tokens0
max_new_tokens0

A generative transcription model will occasionally hand you text that looks like a transcript but isn't usable: segments out of order, timestamps past the end of the audio, a run that silently stopped at its token cap. T8_MOSS_TranscriptValidate exists to catch exactly that. It takes the model's raw output, parses it into structured segments, and checks format, timestamp ordering and bounds, and token limits - and it explicitly does not hide silence hallucinations or truncation risk. The pack's whole philosophy is "surface the problem so you can act on it," and this node is that philosophy in a box.

How you'd use it

Two ways. The normal way: wire a MOSS_TRANSCRIPT from T8_MOSS_TranscribeDiarize or T8_MOSS_SmartLongAudio into the optional transcript input, and it re-validates that payload, pulling audio duration and token counts from the transcript's own metadata so you don't have to type them. The debug way: paste raw model text straight into raw_text and hand-feed media_duration_seconds, generated_tokens, and max_new_tokens - useful when you have transcript text from somewhere else and want the same checking.

One behavior worth knowing: valid segments that come back missing a speaker label are kept, not discarded. They're flagged as unknown speaker S00 and reported as a warning. That's a deliberate choice - you lose information by dropping segments, so the node keeps them and tells you they're suspect.

Outputs: a validated MOSS_TRANSCRIPT (chain it onward), a 校验报告 JSON (validation report: valid/passed, possibly_truncated, segment count, diagnostics), and 段落 JSON (the parsed segments). The validation report and the quality report from T8_MOSS_QualityGate are complementary - this one checks structure, the quality gate checks usability.

The inputs that matter

  • transcript (optional) - wire it and the three text/number inputs become optional fill-ins.
  • raw_text - the model's raw output when you're validating standalone.
  • media_duration_seconds - 0 means unknown. With a known duration, the validator can catch segments whose timestamps run past the end of the file.
  • generated_tokens / max_new_tokens - if generated_tokens bumps against max_new_tokens, the report flags possible truncation. This is how you catch the classic "it ended mid-sentence because it ran out of budget" failure.

Installing it

It ships in the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-MOSS-Transcribe-Diarize-T8.git comfyui-MOSS-Transcribe-Diarize-T8
cd comfyui-MOSS-Transcribe-Diarize-T8
pip install -r requirements.txt
python scripts/check_transformers.py      # requires Transformers >= 5.5.0
python scripts/download_models.py --comfyui-root ..\..

Restart ComfyUI and it appears alongside the other eight nodes. Model and Transformers requirements are identical to the rest of the pack.

Gotchas

  • Don't treat a red report as a bug. This node's job is to tell you the transcript is malformed before you burn an export on it. A warning about S00 segments or possible truncation is the node working correctly.
  • It chains safely. The changelog notes fixes for it clobbering long-audio chunk diagnostics when chained - that's been handled, and it's designed to sit between transcription and the quality gate or export.
  • Unknown duration means weaker checks. With media_duration_seconds at 0, out-of-bounds timestamp checking has nothing to check against. Give it the duration when you can.
CategoryT8star-Aix/Audio/MOSS Transcribe Diarize

Inputs (5)

NameTypeDefaultDescription
raw_textSTRING
media_duration_secondsFLOAT0.00–86400
generated_tokensINT00–131072
max_new_tokensINT00–131072
transcriptoptT8_MOSS_TRANSCRIPT

Outputs (3)

NameTypeDescription
已校验 MOSS_TRANSCRIPTT8_MOSS_TRANSCRIPT
校验报告 JSONSTRING
段落 JSONSTRING