Audio SRT Aligner (文稿校对字幕)
Feed it audio and a transcript — get a timed SRT out
- audio
- srt_string
- detected_language
- srt_entries
- coverage
- audio_out
AudioSrtAligner is the node that turns an audio clip into a real, timestamped SRT subtitle file - and it has a party trick most transcription tools don't: you can hand it the transcript you already wrote, and it will align the transcript to the audio instead of making you fix Whisper's garbage yourself.
It's the "proofread subtitles" half of a two-node pack, with its sibling VideoSrtOverlay handling the rendering. Wire it up as LoadAudio → AudioSrtAligner → VideoSrtOverlay → VideoCombine and you've got subtitled video with zero manual timestamp work.
How it works
At the core is faster-whisper with word-level timestamps. That gets you rough timing; the interesting part is what happens if you fill in reference_text. The node aligns your script to Whisper's transcript using a pure-text algorithm - no Wav2Vec2 phoneme model, no 1GB forced-alignment download. It finds unique tokens that appear in both texts, uses a longest-increasing-subsequence pass to keep those anchors in order (so matches can't cross), then diff-matches the gaps with SequenceMatcher. Matched words get real timestamps; unmatched words get linearly interpolated ones. A custom RMS-energy VAD then snaps each subtitle's start/end to actual speech boundaries, and anything running longer than ~5.8s gets auto-split at punctuation. Clever, and it runs on pure Python string ops.
Leave reference_text empty and it just transcribes with Whisper, splitting on punctuation - a quick subtitle burn if you have no script.
The inputs that matter
Most fields you'll leave alone. The ones worth touching:
audio(AUDIO, required) - from LoadAudio or any audio node. This is the only non-optional input.reference_text- the transcript. Empty = raw Whisper transcription; filled = proofread alignment. This one choice changes what the node does.engine_mode- pick your alignment backend. Default isstable-ts(cross-attention forced alignment);Whisper+LISis the classic LIS algorithm from the README; the twoQwen3modes swap in Qwen3-ASR, which the changelog says gives better coverage on music-backed audio. Note the README still only documents Whisper+LIS - the code's ahead of the docs here.model_size- tiny→large-v3, defaultsmall. Accuracy scales with size, so does first-run download (small ~244MB, large-v3 ~1.5GB).language- defaults tozh. Set it explicitly; auto-detect is a coin flip on Chinese.max_chars- max characters per subtitle line (default 12). Too small → dozens of flickering entries; too big → wall-of-text lines.
Outputs
srt_string is the main event - standard SRT text you can save or feed straight into VideoSrtOverlay. detected_language and srt_entries are informational. coverage (0.0–1.0) is the useful diagnostic: in proofread mode it's how much of your transcript actually matched the audio, so a low number means your script and the recording disagree. audio_out is the UVR5-separated vocal track - a nice freebie if you enabled vocal separation.
Installing
Via ComfyUI Manager (search "ComfyUI-Audio-Srt-Aligner"), or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-Audio-Srt-Aligner
cd ComfyUI-Audio-Srt-Aligner
pip install -r requirements.txt
# restart ComfyUI
Don't believe the README when it implies you can skip audio-separator - the actual requirements.txt unconditionally installs audio-separator, stable-ts, qwen-asr and modelscope alongside faster-whisper. It's a heavy install, and that's the usual story for audio nodes in ComfyUI: real capability bolted on top of a dependency pile. First runs also auto-download the Whisper model to ComfyUI/models/stt/whisper/ and the UVR5 Roformer model (~1.8GB) to models/uvr5/ if you leave uvr5_mode on its default roformer.
Where people get burned
- Apple Silicon:
float16may just not work - switchcompute_typetoint8. - Chinese audio: explicitly set
language=zh, or auto-detect guesses wrong surprisingly often. - The first run looks frozen - it's downloading models. Watch the console.
jiebais imported by the node but missing from requirements.txt. It usually comes in transitively; if you hit an import error,pip install jiebafixes it.- Music-heavy audio where Whisper mumbles over the backing track? That's what the Qwen3 engine modes are for.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| reference_text | STRING | — | |
| model_size | COMBO | small | 5 options: tiny, base, small, medium, large-v3 |
| language | STRING | zh | — |
| engine_mode | COMBO | stable-ts | 4 options: Whisper+LIS, stable-ts, Qwen3 ASR+ForcedAligner, Qwen3 ASR+LIS |
| beam_sizeopt | INT | 51–10 | — |
| max_charsopt | INT | 121–100 | — |
| compute_typeopt | COMBO | float16 | 4 options: int8, int8_float16, float16, float32 |
| uvr5_modeopt | COMBO | roformer | 3 options: roformer, mdxnet, none |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| srt_string | STRING | — |
| detected_language | STRING | — |
| srt_entries | INT | — |
| coverage | FLOAT | — |
| audio_out | AUDIO | — |