Nodes/ComfyUI-ALICE-Lab-Audio-Tools/Transcript Range Selector
ComfyUI Node

Transcript Range Selector

Transcript Range Selector

By alice-lab-dev·Created 16 days ago·Updated 2 days ago· 2
Transcript Range Selector
    • start_seconds
    • end_seconds
    transcript
    start_segment0
    end_segment0

    If you've ever transcribed a video and then squinted at the timestamps trying to figure out which start/end pair covers "the part where she talks about the cat," this node is for you. Transcript Range Selector lets you pick a dialogue range by sentence, not by number: you feed it a transcript, it turns each segment into a dropdown entry, you pick a Start and an End, and out pop start_seconds and end_seconds as FLOATs ready to drive a Media Range node.

    It's part of ALICE Lab Audio Tools, a pack built around one idea: media editing in ComfyUI should be a human-in-the-loop A-B selection, not blind numeric guessing. The transcript node is the keystone for audio work - it converts "the speech you can read" into "the numbers the graph needs." Audio is the thinnest, newest layer in ComfyUI's stack (image-first, video-second, sound bolted on last), so almost nobody has solved this UX; this is one of the few attempts.

    How it works

    The node accepts a STRING transcript in a few shapes, and it's flexible on purpose:

    • A JSON array of segments like [{"text": "...", "start": 1.2, "end": 2.4}, ...], or a JSON object wrapping them under segments, result.segments, or transcription.segments - handy because different STT tools emit different envelopes.
    • Plain timestamped SRT or WebVTT text, pasted or wired straight in.

    Internally every segment is normalized to {text, start, end} and validated hard: timestamps must be numeric and finite, end must come after start, and out-of-range segment indices get a clear error instead of a silent wrong range.

    Here's the workflow rhythm you need to internalize, because it trips everyone the first time. Transcripts are usually produced at execution time (your Whisper node hasn't run yet when you load the graph), so the node can't populate its dropdowns from the widget. You run the graph once with your STT upstream, the selectors fill with your actual segments, then you pick Start/End and run again to pass the numbers downstream. The frontend replaces the two boring start_segment/end_segment INT widgets with Start and End combo boxes, and picking a Start that's past your End automatically pulls End up to match - a nice touch that spares you the "End precedes Start" error.

    Inputs and outputs that matter

    • transcript (STRING, multiline) - the only input you'll actually wire or paste into. The tooltip says it plainly: connect a STRING output from an STT adapter when you can.
    • start_segment / end_segment (INT) - hidden behind the dropdowns after the first run; you'll rarely touch the raw numbers.
    • Outputs start_seconds and end_seconds (FLOAT) - wire these into the start_seconds/end_seconds inputs of a Media Range node to cut exactly that speech out of the video.

    For the popular AIFSH/ComfyUI-WhisperX, route its SRT output through its bundled SRTToString node first - the README calls this out explicitly.

    Installing it

    The pack has zero Python dependencies beyond what ComfyUI already ships and no models to download - the one system requirement is ffmpeg and ffprobe on the PATH of the process that launches ComfyUI. Easiest path is ComfyUI Manager (search "ALICE Lab Audio Tools"). Manual, equally fine:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alice-lab-dev/ComfyUI-ALICE-Lab-Audio-Tools
    

    Then restart ComfyUI and look for the ALICE_Lab categories. Since it leans on ComfyUI's current AUDIO type and comfy_api.latest video APIs, you need a reasonably fresh ComfyUI build - if the nodes don't appear, update ComfyUI first, then check the terminal for import errors.

    Where people get burned

    This is an alpha pack, and the README says so - node interfaces can still shift. The two real gotchas are: (1) forgetting the two-run dance, and (2) feeding it a transcript format it can't parse - you'll get an error like "Transcript is neither supported JSON nor timestamped SRT/VTT text," which at least tells you exactly what's wrong. Oh, and if you paste in an SRT, drop the byte-order mark handling isn't your problem - it strips BOMs itself. Honestly, for a brand-new niche node, this is unusually well-built: 10,000-segment transcripts normalize fine, and Japanese text survives round-trips intact.

    CategoryALICE_Lab/Media

    Inputs (3)

    NameTypeDefaultDescription
    transcriptSTRINGTimestamped transcript as JSON segments or SRT/VTT text. Connect a STRING output from an STT adapter when available.
    start_segmentINT00–1000000
    end_segmentINT00–1000000

    Outputs (2)

    NameTypeDescription
    start_secondsFLOAT
    end_secondsFLOAT