mlx-bun library API
    Preparing search index...
    interface WhisperTranscribeOptions {
        audioCtx?: number | null;
        beamSize?: number | null;
        bestOf?: number | null;
        clipTimestamps?: number[];
        compressionRatioThreshold?: number | null;
        conditionOnPreviousText?: boolean;
        fast?: boolean;
        hallucinationSilenceThreshold?: number | null;
        initialPrompt?: string | null;
        language?: string | null;
        lengthPenalty?: number | null;
        logprobThreshold?: number | null;
        maxInitialTimestamp?: number | null;
        noSpeechThreshold?: number | null;
        observer?: WhisperDecodeObserver;
        onProgress?: (done: number, total: number) => void;
        onSegment?: (segment: WhisperSegment) => void;
        patience?: number | null;
        prefix?: string | number[] | null;
        prompt?: string | number[] | null;
        sampleLen?: number | null;
        signal?: AbortSignal;
        suppressBlank?: boolean;
        suppressTokens?: number[] | "-1" | null;
        task?: WhisperTask;
        temperature?: number;
        temperatures?: number[];
        withoutTimestamps?: boolean;
        wordTimestamps?: boolean;
    }

    Hierarchy (View Summary)

    Index
    audioCtx?: number | null

    Lab (whisper.cpp -ac): encode only the first audioCtx of the 1500 encoder positions (2·audioCtx mel frames). Cheaper for short clips but NOT the trained context — measured hallucinated repeats below ~1024 on the fixture clips. null = full context. Fast path only.

    beamSize?: number | null
    bestOf?: number | null
    clipTimestamps?: number[]

    [start, end, start, end, …] seconds; last end defaults to the clip end. Batch only: a run with clips never transcribes eagerly.

    compressionRatioThreshold?: number | null
    conditionOnPreviousText?: boolean
    fast?: boolean

    Execution path: true (default) runs the optimized graphs (the graph's fast path) for temperature-0 decoding; false forces the faithful oracle graph. Sampling (temperature > 0) always uses the faithful path.

    hallucinationSilenceThreshold?: number | null

    With wordTimestamps: skip silent gaps longer than this many seconds around a likely hallucination (transcribe.py hallucination_silence_threshold).

    initialPrompt?: string | null
    language?: string | null

    null → detect.

    lengthPenalty?: number | null
    logprobThreshold?: number | null
    maxInitialTimestamp?: number | null
    noSpeechThreshold?: number | null

    Parity instrumentation: the decode window's encoder output and each step's PRE-filter last-position logits [n_group, V] f32 (borrowed — valid only during the callback).

    onProgress?: (done: number, total: number) => void

    Progress callback: seeked frames out of content frames.

    onSegment?: (segment: WhisperSegment) => void

    Called with each finalized segment as the loop emits it.

    patience?: number | null
    prefix?: string | number[] | null
    prompt?: string | number[] | null
    sampleLen?: number | null
    signal?: AbortSignal

    Checked between windows; an aborted signal throws "transcription cancelled".

    suppressBlank?: boolean
    suppressTokens?: number[] | "-1" | null

    Token ids to suppress; "-1" = the tokenizer's non-speech set (default).

    temperature?: number
    temperatures?: number[]

    Single temperature or the fallback ladder (oracle default: 0, .2 … 1).

    withoutTimestamps?: boolean
    wordTimestamps?: boolean

    Word-level timestamps via cross-attention DTW (packages/inference/src/transcription/whisper/timing.ts); one extra faithful decoder pass per window.