Nodes/ComfyUI-speech-dataset-toolkit/kotoba-whisper Segment Property
ComfyUI Node

kotoba-whisper Segment Property

Pull start, end, and text off one segment

By kale4eat·Created 2 years ago·Updated about a year ago· 23
kotoba-whisper Segment Property
  • segment
  • start
  • end
  • text

The node that actually gets you usable data out of a kotoba-whisper segment. SDT_KotobaWhisperListSegments explodes a bundled transcript into individual segment objects, but those objects are still opaque KOTOBA_WHISPER_SEGMENT values you can't do anything with directly - this node unpacks one into the three plain values you actually want: when it starts, when it ends, and what was said.

How it works

It reads three fields off a single segment and exposes them as separate typed outputs - no processing, no transformation, just field access. The README notes this pack deliberately doesn't include general-purpose numerical or string-processing nodes, which is exactly why a node like this exists: it's the minimal bridge between the pack's structured ASR output types and the plain values (a float for timing, a string for text) that the rest of ComfyUI's ecosystem and any string/number nodes you already have installed can actually work with.

The inputs and outputs that matter

  • segment (required, KOTOBA_WHISPER_SEGMENT) - one individual segment, typically wired straight from SDT_KotobaWhisperListSegments's list output inside a for-each style loop.
  • start (output, FLOAT) - the segment's start time in seconds.
  • end (output, FLOAT) - the segment's end time in seconds.
  • text (output, STRING) - the transcribed text for just that segment.

How to install it

ComfyUI Manager: search ComfyUI-speech-dataset-toolkit, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/kale4eat/ComfyUI-speech-dataset-toolkit
cd ComfyUI-speech-dataset-toolkit
pip install torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt

No extra dependencies - this is a plain field-reader, the lightest kind of node in the pack.

Common issues & troubleshooting

Wired in a raw KOTOBA_WHISPER_SEGMENTS bundle directly and got a type error. This node wants a single exploded KOTOBA_WHISPER_SEGMENT, not the bundle - run it through SDT_KotobaWhisperListSegments first to split the bundle into individual items.

Want to use start/end to actually cut the matching slice of audio. These outputs are exactly the numbers SDT_TrimAudio or SDT_CutAudio want for their start_second/end_second inputs - pairing this node's start/end with the trim node against the same original audio clip is a common way to slice a long recording into per-sentence files for dataset building.

Timestamps look close but not sample-exact when used to cut audio. Expected - Whisper-family model timestamps generally aren't precise to the sample, and long-form chunking adds its own boundary uncertainty on top. Pad the cut range slightly if you need clean edges rather than assuming these numbers are exact.

Only getting one segment's worth of data per run. That's the intended design - this node handles one segment at a time. Wrap it in whatever list-iteration pattern your graph uses (ComfyUI's native list handling, or a loop node if you've got one installed) to process every segment SDT_KotobaWhisperListSegments produced.

Categoryspeech-dataset-toolkit/ai/kotoba-whisper

Inputs (1)

NameTypeDefaultDescription
segmentKOTOBA_WHISPER_SEGMENT

Outputs (3)

NameTypeDescription
startFLOAT
endFLOAT
textSTRING