MOSS 智能长音频转写 · T8star-Aix
The long-audio node that splits at silences and picks up where it died
- model
- audio
- prompt
- 原音频透传
- 合并原始文本
- 结构化 JSON
- SRT 字幕
- ASS 字幕
- MOSS_TRANSCRIPT
- 分片报告 JSON
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) orfixed(blind time-slices, for when VAD misbehaves on music/noise). - checkpoint_mode - the important one.
read_writeauto-resumes from an existing checkpoint;restartignores and overwrites old checkpoints;offnever 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_changedinstead 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_jsoninT8_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.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | T8_MOSS_TRANSCRIBE_MODEL | — | |
| audio | AUDIO | — | |
| max_new_tokens_per_chunk | INT | 00–65536 | — |
| target_chunk_minutes | FLOAT | 8.01–30 | — |
| max_chunk_minutes | FLOAT | 10.01–40 | — |
| overlap_seconds | FLOAT | 1.000–10 | — |
| split_strategy | COMBO | vad | 2 options: vad, fixed |
| silence_policy | COMBO | warn | 3 options: warn, reject, ignore |
| vad_aggressiveness | INT | 20–3 | — |
| retry_policy | COMBO | quality_failure | 3 options: never, invalid_format, quality_failure |
| checkpoint_mode | COMBO | read_write | read_write 自动续跑;restart 忽略并覆盖旧检查点;off 不写磁盘。 |
| speaker_link_mode | COMBO | off | overlap_only 仅在重叠区文本和时间同时匹配时关联,并在分片报告中给出证据。 |
| promptopt | T8_MOSS_PROMPT | — | |
| checkpoint_idopt | STRING | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| 原音频透传 | AUDIO | — |
| 合并原始文本 | STRING | — |
| 结构化 JSON | STRING | — |
| SRT 字幕 | STRING | — |
| ASS 字幕 | STRING | — |
| MOSS_TRANSCRIPT | T8_MOSS_TRANSCRIPT | — |
| 分片报告 JSON | STRING | — |