Nodes/TTS Audio Suite/⚙️ Granite ASR Engine
ComfyUI Node

⚙️ Granite ASR Engine

IBM's speech-to-text with speaker diarization

By diodiogod·Created about a year ago·Updated 22 days ago· 1,098
⚙️ Granite ASR Engine
    • TTS_engine
    model_namegranite-speech-4.1-2b
    deviceauto
    max_new_tokens200
    dtypeauto
    attn_implementationauto
    asr_use_forced_alignertrue
    asr_translate_target_languageEnglish
    asr_translate_instruction_overridetranslate the speech from {source_language} into {target_language}. Return only the {target_language} translation, not the original {source_language} transcript.
    do_samplefalse
    num_beams1
    temperature1.00
    top_k50
    top_p1.00
    repetition_penalty1.00
    length_penalty1.00
    no_repeat_ngram_size0
    early_stoppingfalse

    Granite ASR is IBM's speech-to-text model, and in this suite it's the ASR engine you pick when you care about who is speaking, not just what's said. Its standout feature is native speaker diarization - labeling segments by speaker - plus native word-level timestamps, which is exactly what you want when you're building subtitles for a multi-person recording. It's the alternative to Qwen3-ASR in the suite's transcription path.

    Like the other engine nodes, this one is configuration only. It outputs a TTS_engine that you wire into the ✏️ ASR Transcribe node, which does the actual transcribing. Think of this node as "which ASR model, and how it decodes."

    How it works

    You pick a Granite model, and the transcription itself happens downstream in ASR Transcribe. The model choice carries a real trade-off worth understanding before you commit. granite-speech-4.1-2b keeps Japanese support. The granite-speech-4.1-2b-plus variant adds native diarization and native word timestamps - but drops Japanese. And when you ask the plus model for diarization and word timestamps together, the suite quietly reuses the Qwen forced aligner behind the scenes so you still get speaker-attributed word timings. So the decision is basically: do you need Japanese, or do you need built-in speaker labels?

    The inputs and outputs that matter

    • model_name - granite-speech-4.1-2b (keeps Japanese), granite-speech-4.1-2b-plus (adds diarization + word timestamps, no Japanese), or granite-4.0-1b-speech (the smaller/lighter option). This is the main decision.
    • max_new_tokens (default 200) - caps transcript length per chunk; fine as-is for most clips.

    The optional set is mostly decoding controls that matter only if you're fighting a specific transcription problem: num_beams (beam search - higher can improve accuracy at a speed cost), do_sample/temperature/top_k/top_p (leave sampling off for transcription - you want the most-likely words, not creative ones), repetition_penalty and no_repeat_ngram_size (stop it looping), and asr_translate_target_language for translation. device, dtype, and attn_implementation stay on auto unless you're tuning performance.

    Output: TTS_engine → into the ✏️ ASR Transcribe node.

    Installing it

    Ships with the pack. ComfyUI Manager → search "TTS Audio Suite" → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/diodiogod/TTS-Audio-Suite.git
    cd TTS-Audio-Suite
    python install.py
    

    The Granite models (~4.6GB) auto-download to ComfyUI/models/TTS/granite_asr/ on first use.

    Common issues & troubleshooting

    Japanese comes out wrong. You're probably on the plus model, which drops Japanese in exchange for diarization. Switch to granite-speech-4.1-2b, which keeps Japanese support.

    No speaker labels. Diarization is a feature of the 4.1-2b-plus model specifically - the base 2b model won't produce them. Pick the plus variant, and remember that if you want diarization and word timestamps at once, the suite leans on the Qwen forced aligner to deliver both, which may pull in that extra component.

    The transcript invents or repeats words. Turn do_sample off (it should be off by default) so decoding is deterministic, and if you see loops, nudge repetition_penalty up or set a small no_repeat_ngram_size. Sampling belongs in TTS, not transcription.

    Low punctuation / all-caps-ish output. Granite ASR can come out raw. That's expected - run it through the suite's ASR Punctuation / Truecase step before the Text to SRT Builder to clean it up.

    CategoryTTS Audio Suite/⚙️ Engines

    Inputs (17)

    NameTypeDefaultDescription
    model_nameCOMBOgranite-speech-4.1-2bGranite speech model: • granite-speech-4.1-2b: IBM 2B speech model (latest default, ASR/AST, supports Japanese) • granite-speech-4.1-2b-plus: IBM 2B speech model (ASR with speaker attribution and native timestamps, excludes Japanese) • granite-4.0-1b-speech: IBM 1B speech model This engine is ASR-only. It plugs into ✏️ ASR Transcribe like Qwen ASR does. The plus variant supports native word-level timestamps, while other models require the separate forced aligner.
    deviceCOMBOautoDevice to run Granite on: • auto: Best available device • cuda: NVIDIA GPU • cpu: CPU-only processing Recommended: auto unless you are debugging or intentionally forcing CPU.
    max_new_tokensINT20032–2048Maximum text tokens Granite may generate per ASR chunk. This is a hard cap, not a target: • Lower values: Safer against runaway output, but can cut off longer chunks • 200: Matches IBM's reference example for plain transcription • Native timestamp mode and speaker diarization auto-raise low budgets internally because those outputs are much longer • Higher values: Needed for longer spoken chunks, but can increase loop/repetition risk if the model goes off the rails
    dtypeoptCOMBOautoModel precision: • auto: Prefer bfloat16 on capable CUDA GPUs, otherwise fall back safely • bfloat16: Best stability on supported GPUs • float16: Lower VRAM, wider GPU compatibility • float32: CPU-safe, highest VRAM/RAM use If you hit strange numerical issues, try float32 on CPU or bfloat16 on newer GPUs.
    attn_implementationoptCOMBOautoAttention backend: • auto: Try the fastest sane option, then fall back to eager if Granite's BLIP2 Q-Former rejects it • flash_attention_2: Fastest if installed and supported • sdpa: PyTorch native attention • eager: Slowest, most compatible fallback If Granite fails to load with SDPA/Flash, eager is the compatibility escape hatch.
    asr_use_forced_aligneroptBOOLEANtrueUse Qwen's separate forced aligner after Granite transcription so ✏️ ASR Transcribe can build word timings and SRT. • True: Enable timestamps/SRT support for Granite • False: Granite returns text only Important: • Only the plus model variant has native timestamp output. Other variants do not, and require the Qwen forced aligner for word timings. • The reused Qwen forced aligner is automatically routed through the shared legacy Transformers 4 runtime • Translation mode still stays text-only • If ASR language is Auto, alignment uses a truthful heuristic: Japanese script -> Japanese mode, otherwise Qwen's generic space-delimited tokenizer path
    asr_translate_target_languageoptCOMBOEnglishExperimental ASR translation target for ✏️ ASR Transcribe when task=translate. Important: • This is Granite ASR-only and only applies when the unified ASR node is set to translate • Granite target selection here is prompt-driven, not a native target-language API • Some language pairs may work better than others, and some may just fall back to transcription • English is the safest default; treat other targets as experimental until you validate them on real audio
    asr_translate_instruction_overrideoptSTRINGtranslate the speech from {source_language} into {target_language}. Return only the {target_language} translation, not the original {source_language} transcript.Granite-only experimental translation instruction template for task=translate. This field shows the actual default instruction Granite uses here. Edit it if you want to experiment. Available placeholders: • {source_language}: Replaced with the unified ASR source language, or 'the spoken source language' when ASR language is Auto • {target_language}: Replaced with this engine node's ASR translation target Important: • This is NOT a raw chat template field. TTS Audio Suite still wraps it in Granite's chat format. • If you omit <|audio|>, TTS Audio Suite adds it for you. • Granite translation here is prompt-driven and can be inconsistent by language pair. • Weak or malformed instructions can be ignored and fall back to plain transcription.
    do_sampleoptBOOLEANfalseNative Hugging Face generation parameter. • False: Deterministic decoding, matches IBM's reference Granite example • True: Enable sampling-based decoding For ASR, sampling can increase variation but also instability.
    num_beamsoptINT11–16Native beam search width: • 1: Greedy decoding • 2-4: Beam search, slower but can change transcript choices • Higher values: More expensive, rarely worth it for ASR unless you are experimenting
    temperatureoptFLOAT1.000–5Native sampling temperature. Only really matters when do_sample is enabled: • Lower: More conservative token choices • Higher: More random output • 1.0: Neutral default
    top_koptINT500–200Native top-k sampling limit. • 0: Disable top-k filtering • Lower values: More constrained sampling • Higher values: Broader token pool Mainly relevant when do_sample is enabled.
    top_poptFLOAT1.000–1Native top-p / nucleus sampling. • Lower values: More conservative sampling • 1.0: No nucleus restriction Mainly relevant when do_sample is enabled.
    repetition_penaltyoptFLOAT1.000.1–5Native repetition penalty. • 1.0: Disabled • >1.0: Discourage repeated token loops • <1.0: Encourages repetition and is usually a bad idea Useful when Granite starts spiraling into repeated phrases.
    length_penaltyoptFLOAT1.00-5–5Native beam-search length penalty. • <1.0: Bias shorter outputs • 1.0: Neutral • >1.0: Bias longer outputs Mostly relevant with beam search, not plain greedy decoding.
    no_repeat_ngram_sizeoptINT00–12Native no-repeat n-gram guard. • 0: Disabled • 2-4: Blocks short repeated phrase patterns • Higher values: More aggressive repetition blocking, can overconstrain output
    early_stoppingoptBOOLEANfalseNative beam-search early stopping flag. • False: Let beam search continue normally • True: Stop once beams are considered complete Only meaningful with num_beams > 1.

    Outputs (1)

    NameTypeDescription
    TTS_engineTTS_ENGINE