Nodes/TKNodes/Speaker Talk Times
ComfyUI Node

Speaker Talk Times

The boring little input node your diarization workflow is built on

By trashkollector·Created about a year ago·Updated a day ago· 1
Speaker Talk Times
    • trackTimesCombined
    track_start_10.00
    track_end_10.00
    track_start_20.00
    track_end_20.00
    track_start_30.00
    track_end_30.00
    track_start_40.00
    track_end_40.00
    track_start_50.00
    track_end_50.00

    If you've opened the speaker-related nodes in the TKNodes pack and wondered where the "tracks" come from, this is where they start. Speaker Talk Times is a pure input helper: it gives you five pairs of start/end time boxes and turns whatever you fill in into a single comma-separated string that the rest of the pack can consume. No audio goes in, no audio comes out. It's the boring node that makes the fancy ones work.

    The string it produces is the currency of this pack's whole speaker workflow - the same format TKLocateSpeakersUsingSilenceBreaks emits, and the exact format TKSpeakerAudioTrackExtractor and TKTotalTracksInAudio expect to eat. So it's the manual-answer path: instead of asking the detector to guess where speakers talk, you type the times you already know.

    How it works

    Five (track_start, track_end) pairs in seconds, each a FLOAT box from 0 to 500. On execution the node walks the pairs, throws out any that are both 0.0 (so unfilled slots vanish instead of producing garbage), and flattens what's left into start,end,start,end,...:

    track_start_1=1.0, track_end_1=3.9, track_start_2=5.2, track_end_2=9.5
    → "1.0,3.9,5.2,9.5"
    

    That one string is the output - trackTimesCombined, a single STRING socket. Wire it into the combinedTrackInfo1 input of TKSpeakerAudioTrackExtractor and you've told the extractor exactly which slices of the full audio belong to this speaker.

    The inputs that matter

    Only track_start_1 / track_end_1 are required. The other four pairs are optional - fill as many as you need. Times are in seconds, not milliseconds; a 1.5s line is 1.5, not 1500. Get that wrong and your extracted tracks will be wildly misplaced, and the extractor will (helpfully) throw a "timings exceeds the Audio Length" error rather than silently trimming.

    When you'd actually reach for it

    When the auto-detector gets it wrong. Silence-based speaker detection is guessing, and with overlapping dialogue or no real pauses between speakers it guesses badly. This node is the fallback that works 100% of the time because you're not guessing - you're typing what you heard. The price is that you're typing what you heard, which is tedious for a long clip. It also plays nice as a manual override companion: the detector node has its own hidden track boxes, and this node gives you the same idea in a cleaner, loop-friendly form.

    Installing it

    Part of the trashkollector/TKNodes pack ("ComfyUI Handy Nodes"). Install via ComfyUI Manager (search "Handy Nodes") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/trashkollector/TKNodes
    

    Restart, and it appears under the TKNodes category. Nothing special needed for this one - no models, no FFmpeg - though the speaker extractor you'll probably pair it with does pull in the pack's normal pydub/FFmpeg requirements.

    Honestly? For a node this simple you could type the comma string into any text box. What you're paying for is five labeled inputs you don't have to count commas in, and output that the rest of the pack already understands.

    CategoryTKNodes

    Inputs (10)

    NameTypeDefaultDescription
    track_start_1FLOAT0.000–500
    track_end_1FLOAT0.000–500
    track_start_2optFLOAT0.000–500
    track_end_2optFLOAT0.000–500
    track_start_3optFLOAT0.000–500
    track_end_3optFLOAT0.000–500
    track_start_4optFLOAT0.000–500
    track_end_4optFLOAT0.000–500
    track_start_5optFLOAT0.000–500
    track_end_5optFLOAT0.000–500

    Outputs (1)

    NameTypeDescription
    trackTimesCombinedSTRING