Nodes/ComfyUI-VoiceBridge/Save SRT From String
ComfyUI Node

Save SRT From String

The zero-drama way to get your subtitles onto disk

By YanTianlong-01·Created 7 months ago·Updated 3 months ago· 11
Save SRT From String
    • save_path
    srt_string
    filename_prefixVoiceBridge_subtitle

    Every SRT-making pipeline ends the same way: you have a subtitle string in the graph and you want a .srt file in your output folder. That's this node's entire job, and it's refreshingly boring. You feed it SRT text, it writes a UTF-8 .srt file to ComfyUI/output/, and it tells you exactly where it put it.

    Why you'd reach for it

    The pack has a couple of different save paths - Generate SRT can auto-save as a side effect, and SRT To Audio / Audio List Merger by SRT hand you an adjusted_srt string whose timing reflects what the audio actually did. That last one is the workflow where this node earns its keep: you ran a translation-to-audio pipeline, the merger shifted timings around to make the voice fit, and you want the corrected subtitles saved alongside the audio. Save SRT From String is the node you tack on to grab that adjusted_srt output and write it out.

    It's also handy for the decoupled universal-TTS pipeline. If you're driving a third-party TTS via VoiceBridge SRT Splitter → any TTS → VoiceBridge Audio List Merger by SRT, the merger's adjusted_srt is the final word on timing - and this node is the natural sink for it.

    What you set

    Only two inputs, both strings:

    • srt_string - the SRT content. Wire it from Generate SRT, from SRT To Audio's adjusted_srt output, from the merger, or paste it in by hand. It just writes what it's given.
    • filename_prefix (default VoiceBridge_subtitle) - the base filename. Files land in ComfyUI/output/, and if the name already exists the node appends _1, _2, etc. instead of clobbering your previous render. That's a small touch but it saves you from the classic "where did my last subtitle file go" panic.

    One output: save_path, a plain string with the full path of the written file. It's handy for wiring into a "show me the path" or logging node, or just reading it in the node's output.

    Installing it

    Part of the comfyui_voicebridge pack - ComfyUI Manager search "VoiceBridge", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/YanTianlong-01/comfyui_voicebridge.git
    cd comfyui_voicebridge
    pip install -r requirements.txt
    

    Restart ComfyUI. Note this node has no model dependency at all - it's pure file I/O, so it's the cheapest node in the pack to use. You don't even need the ASR or TTS models loaded to save a subtitle file.

    Gotchas

    The main thing to know is that it doesn't validate its input. Give it a garbage string and it writes a garbage .srt - there's no parser checking that the timing lines are well-formed. The pack's SRT Splitter is the stricter sibling if you want validation (it'll throw on malformed SRT), so if you're hand-pasting something you're not sure about, run it through the splitter first. Otherwise this is one of those nodes that just works, which after fighting with the rest of an audio pipeline is exactly what you want at the finish line.

    CategoryVoiceBridge

    Inputs (2)

    NameTypeDefaultDescription
    srt_stringSTRING
    filename_prefixSTRINGVoiceBridge_subtitle

    Outputs (1)

    NameTypeDescription
    save_pathSTRING