Subtitle File Loader (ASA)
Drag a Subtitle File In, Get Clean Transcript Text Out
- text
- filepath
Subtitle File Loader (ASA) does one surprisingly useful thing: it takes a subtitle file - srt, ass, ssa, vtt, lrc, sub, or even plain txt - and strips away all the formatting so you're left with just the dialogue text. You can literally drag the file onto the input box instead of typing a path.
It exists for two different jobs that share a node, which is why it has two outputs. First, it's a transcript reader: feed its text output into Long Text Splitter and you can re-synthesize existing subtitled content into fresh TTS audio. Second - and this is the pack's signature move - its filepath output feeds straight into Combine Audio From List, which uses the same subtitle file's timestamps to align your synthesized clips to the original timeline. Load once, use the text for one thing and the path for the other.
How it works
The loader is a per-format stripper. For .srt it drops the index numbers and the 00:00:01,000 --> 00:00:03,000 timestamp lines, keeping dialogue. For .ass/.ssa it parses the Dialogue: lines and pulls out just the text field (the last comma-separated segment). VTT gets its WEBVTT header and timestamps removed, LRC gets its [mm:ss.xx] time tags stripped, and .sub skips the {start}{end} markers. Anything else is returned as-is.
The inputs and outputs
- file_path - the subtitle file. Drag and drop works, and gives you an absolute path, which is the reliable route.
- Output text - the cleaned transcript as a
STRING. - Output filepath - the path you fed in, untouched, for handing to the combiner's
srt_fileinput.
Installing it
It ships in whmc76/ComfyUI-AudioSuiteAdvanced (display "AudioSuiteAdvanced"). ComfyUI Manager → search "AudioSuiteAdvanced", or:
cd ComfyUI/custom_nodes
git clone https://github.com/whmc76/ComfyUI-AudioSuiteAdvanced
cd ComfyUI-AudioSuiteAdvanced
pip install -r requirements.txt
Restart ComfyUI. No models, no downloads.
Where people get burned
Encoding is the one that bites. The loader reads files as UTF-8, and if your subtitle came from an older Windows tool it may be GBK or ANSI - in which case you'll get mojibake or an empty output. Re-save the file as UTF-8 in any text editor and it'll work.
The subtler trap is trusting it as a transcript. The text output is the dialogue only - no timestamps, no speaker labels, no scene cues. That's exactly what you want for TTS, but if you were hoping for a structured, who-said-what record, this isn't it; that job belongs to Multi-Speaker Speech To Text, which produces JSON with speaker and timing info instead.
And one formatting note: LRC lyrics get their time tags stripped for the text output, but if you route the same file into Combine Audio From List's timestamp alignment, that combiner assumes each LRC timestamp marks a roughly 1-second slot. Fine for songs, wrong for long dialogue. Match your format to the job - srt is the safe default for the alignment path.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| filepath | STRING | — |