ComfyUI Node

Load kotoba-whisper

The configurable kotoba-whisper loader, short or long form

By kale4eat·Created 2 years ago·Updated about a year ago· 23
Load kotoba-whisper
    • model
    device
    form_length
    chunk_length_s15
    batch_size16

    This pack actually ships three separate ways into kotoba-whisper, Kotoba Technologies' distilled Japanese Whisper model - dedicated short-form and long-form loaders (SDT_KotobaWhisperLoaderShort / SDT_KotobaWhisperLoaderShort's long counterpart), and this one, the generic loader that lets you pick which mode you want from a single node instead of committing to a specific pair of loader/transcribe nodes up front.

    How it works

    Under the hood this configures Hugging Face's automatic-speech-recognition pipeline, and the form_length choice tells it whether to run kotoba-whisper as a single-pass model (clips under Whisper's native ~30-second window) or as a chunked, sliding-window pipeline for longer audio. That's the same underlying distinction the dedicated Short/Long loaders bake in permanently - this node just exposes the choice as a setting instead of a separate node, at the cost of pairing with a transcribe node (SDT_KotobaWhisperTranscribe) that's less feature-rich than the dedicated ones.

    The inputs and outputs that matter

    • device - auto, cpu, or cuda. auto is the sensible default; force cuda if you want a loud failure instead of a silent, much slower CPU fallback.
    • form_length - short or long. This is the setting that actually changes behavior: short-form processes the whole clip in one pass, long-form chunks it. Pick based on your typical clip length, not a guess - anything meaningfully over 30 seconds wants long.
    • chunk_length_s (default 15) and batch_size (default 16) - chunking configuration. These matter primarily when form_length is set to long; in short-form mode there's no chunking happening, so they're largely inert. chunk_length_s trades memory-per-step against more stitch points between chunks; batch_size trades memory for throughput on how many chunks process in parallel.
    • model (output, KOTOBA_WHISPER) - feeds into SDT_KotobaWhisperTranscribe. Note this is a distinct type from KOTOBA_WHISPER_SHORT and KOTOBA_WHISPER_LONG that the dedicated loaders produce - they aren't interchangeable in the graph.

    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
    

    Model weights download from Hugging Face on first use - expect a real fetch the first time you run this, same as any pretrained checkpoint.

    Common issues & troubleshooting

    Wired this into a node expecting KOTOBA_WHISPER_SHORT or KOTOBA_WHISPER_LONG and got a type error. That's expected - this loader's output type is specifically KOTOBA_WHISPER, matched only by SDT_KotobaWhisperTranscribe. If you want the dedicated pipeline's richer output (segments included), use the matching dedicated loader instead of this one.

    Set chunk_length_s or batch_size and nothing changed. Check form_length - those two knobs only do anything meaningful in long mode. In short mode the clip runs as a single pass regardless of what they're set to.

    This is a low-traffic corner of a low-traffic pack - kotoba-whisper doesn't come up in general ComfyUI community discussion the way mainstream Whisper does, so if something behaves oddly here, the kotoba-whisper model card and this pack's source are your best references, not a forum thread.

    Not sure whether to use this or the dedicated Short/Long loaders. If you know your typical clip length in advance and want the richer output (SDT_KotobaWhisperTranscribeShort/Long both return segments alongside text), the dedicated pair is generally the better default. Reach for this generic loader when you specifically want to toggle short/long from one node, or when you only need flat transcript text and don't care about segment timing.

    Categoryspeech-dataset-toolkit/ai/kotoba-whisper

    Inputs (4)

    NameTypeDefaultDescription
    deviceCOMBO3 options: auto, cpu, cuda
    form_lengthCOMBO2 options: short, long
    chunk_length_sINT151–1024
    batch_sizeINT161–1024

    Outputs (1)

    NameTypeDescription
    modelKOTOBA_WHISPER