Nodes/Comfyui-MOSS-Transcribe-Diarize-T8/MOSS 智能长音频转写 · T8star-Aix
ComfyUI Node

MOSS 智能长音频转写 · T8star-Aix

The long-audio node that splits at silences and picks up where it died

By T8mars·Created 25 days ago·Updated about 21 hours ago· 5
MOSS 智能长音频转写 · T8star-Aix
  • model
  • audio
  • prompt
  • 原音频透传
  • 合并原始文本
  • 结构化 JSON
  • SRT 字幕
  • ASS 字幕
  • MOSS_TRANSCRIPT
  • 分片报告 JSON
max_new_tokens_per_chunk0
target_chunk_minutes8.0
max_chunk_minutes10.0
overlap_seconds1.00
split_strategyvad
silence_policywarn
vad_aggressiveness2
retry_policyquality_failure
checkpoint_moderead_write
speaker_link_modeoff
checkpoint_id

If you've ever transcribed a 45-minute podcast in ComfyUI, you know the pain: the model chokes, the queue dies at minute 32, and you start over from zero. T8_MOSS_SmartLongAudio is the pack's answer to that. It's the same MOSS transcribe-and-diarize engine as T8_MOSS_TranscribeDiarize, but restructured for long files: it splits audio near VAD silence boundaries into chunks, transcribes them in order, dedups the overlap, keeps a global timeline, and - the killer feature - writes atomic checkpoints so an interrupted run resumes from where it stopped instead of from the top.

The one honest caveat, stated right in the README: each chunk gets its own local speaker namespace. S01 in chunk one and S01 in chunk five are not assumed to be the same person. The pack refuses to pretend - you map the same speaker across chunks manually in the export node using keys like {"part001:S01": "主持人"}. Annoying, but it's the difference between a tool that lies to you and one that tells you what it knows.

How it works

It downmixes/resamples to 16kHz, runs WebRTC VAD to find silence boundaries, and plans chunks that aim for your target duration but hard-stop at the max - with a small overlap so nothing gets cut off at a seam. Overlap duplicates are removed only when the audio actually overlapped and the segments genuinely coincide (a fix that landed in 0.3.4, after earlier versions could delete real repeated short phrases). Each chunk transcribes with the local speaker namespace, and a global timeline reassembles the whole file.

The inputs that matter

  • target_chunk_minutes (8) and max_chunk_minutes (10) - the goal and the ceiling. Lower the target if you're tight on VRAM; each ~10-minute chunk can peak around 11.6GB on a 24GB card per the author's tests.
  • overlap_seconds (1) - seam protection. You rarely need to touch it.
  • split_strategy - vad (default, splits at silences) or fixed (blind time-slices, for when VAD misbehaves on music/noise).
  • checkpoint_mode - the important one. read_write auto-resumes from an existing checkpoint; restart ignores and overwrites old checkpoints; off never writes to disk. Resume is genuinely fast - the author's 75s fixture resumed in 0.044 seconds with 0GB VRAM.
  • checkpoint_id - optional name; defaults to an audio fingerprint. Set your own if you want a resumable job identity across runs.
  • max_new_tokens_per_chunk - 0 = auto, estimated per chunk.
  • retry_policy - defaults to quality_failure, meaning a chunk that fails quality checks gets one stricter-prompt retry.

Outputs: audio passthrough, merged raw text, structured JSON, SRT and ASS strings, the typed MOSS_TRANSCRIPT, and a chunk report JSON telling you how many chunks, where they split, and what happened in each. Checkpoints live under ComfyUI/output/moss_transcribe_diarize/checkpoints/.

Installing it

Same pack install as everything else:

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 ..\..

The long-audio example workflow lives at example_workflows/ui/02_long_audio_diagnostics.json and covers VAD splitting, checkpoints, the quality gate, and environment diagnostics.

Gotchas

  • Chunk size is a VRAM lever. Smaller chunks = lower peak memory. If you're on the 8–10GB compatibility tier, this node is your best shot at long audio, but keep chunks modest and expect slower wall-clock time.
  • Checkpoint staleness is handled, but config changes reset you. The checkpoint fingerprint covers silence policy, VAD strictness, device, precision, and attention backend. Change any of those and it safely starts over and reports configuration_changed instead of silently reusing a stale transcript. That's correct behavior - don't be confused when a re-run with new settings takes full time.
  • Cross-chunk speakers need manual mapping. This is by design. Use the cross_chunk_speaker_map_json in T8_MOSS_SubtitleExport ({"part001:S01": "Host"}). The export node applies it automatically to the namespaced IDs.
  • Silence, music, and noise still fool the model. VAD and quality gating catch and expose the risk; they don't magically fix garbage audio. Review the chunk report before you trust the output.
CategoryT8star-Aix/Audio/MOSS Transcribe Diarize

Inputs (14)

NameTypeDefaultDescription
modelT8_MOSS_TRANSCRIBE_MODEL
audioAUDIO
max_new_tokens_per_chunkINT00–65536
target_chunk_minutesFLOAT8.01–30
max_chunk_minutesFLOAT10.01–40
overlap_secondsFLOAT1.000–10
split_strategyCOMBOvad2 options: vad, fixed
silence_policyCOMBOwarn3 options: warn, reject, ignore
vad_aggressivenessINT20–3
retry_policyCOMBOquality_failure3 options: never, invalid_format, quality_failure
checkpoint_modeCOMBOread_writeread_write 自动续跑;restart 忽略并覆盖旧检查点;off 不写磁盘。
speaker_link_modeCOMBOoffoverlap_only 仅在重叠区文本和时间同时匹配时关联,并在分片报告中给出证据。
promptoptT8_MOSS_PROMPT
checkpoint_idoptSTRING

Outputs (7)

NameTypeDescription
原音频透传AUDIO
合并原始文本STRING
结构化 JSONSTRING
SRT 字幕STRING
ASS 字幕STRING
MOSS_TRANSCRIPTT8_MOSS_TRANSCRIPT
分片报告 JSONSTRING