Whisper hallucination: what you can fix in a browser, and what you cannot
The standard advice is four decoder settings, and in a browser build 0 of the 4 reach the decoder. What 36 runs on silence actually returned, and the 3 things that do work, are below.
The advice paraphrases OpenAI's own transcribe.pysignature.
def transcribe(
model, audio, *,
compression_ratio_threshold: float = 2.4, # gzip ratio above this = failed decode
logprob_threshold: float = -1.0, # avg logprob below this = failed decode
no_speech_threshold: float = 0.6, # <|nospeech|> above this = silence
condition_on_previous_text: bool = True, # previous output becomes the next prompt
...):Do those settings exist in a browser build?
4 steps in the call chain, and the last one keeps only the names it already knows. A parameter reaches the model only if a property with that name exists on the generation config, and 0 of these 4 do.
4 settings the advice names
- no_speech_threshold
- compression_ratio_threshold
- logprob_threshold
- condition_on_previous_text
4 dropped before the decoder
- dropped · src/models.js:1503
- dropped · src/models.js:1503
- dropped · src/models.js:1503
- dropped · src/models.js:1503
The failure is silent: an unknown key is never rejected, logged or warned.
- 1pipeline(audio, kwargs)
1804
- 2generation_config = { ...kwargs }
1810
- 3model.generate({ inputs, ...generation_config })
1883
- 4pick(kwargs, Object.getOwnPropertyNames(gen_config))
1503
2 near-misses explain why the advice survives a skim: suppress_tokens is real but its processor is commented out, and prompt_ids exists with nothing reading it.
Whisper hallucination on silence: the 36-run answer
6 files whose correct transcript is nothing — silence, 3 room-tone levels, 1 click, one that stops talking 26 s before it ends — through 3 models on 2 weight sets: 36 runs.
| Input | tiny | base | small |
|---|---|---|---|
| Silence, 30 s | [BLANK_AUDIO] | [BLANK_AUDIO] | [BLANK_AUDIO] |
| Room tone, −60 dB | [silence] → [BLANK_AUDIO] | [ Silence ] | [ Silence ] |
| Room tone, −40 dB | [silence] → [Music] | (water flowing) → [Pause] | [BREAKING] |
| Room tone, −20 dB | (birds chirping) → [BLANK_AUDIO] | (clippers buzzing) → [Music] | [ ] [ ] |
| Silence + one click | [BEEP] → [BLANK_AUDIO] | [BEEP] → [BLANK_AUDIO] | [BLANK_AUDIO] |
| Speech, then 26 s silence | Welcome back to the show, today we are talking with the researcher who studies attention at work. Thanks for having me, the first thing I tell people is that interactions aren't really the problem. Really, then what is? Getting back, after a short break, most of us need a few minutes to find out place again. So what actually helps? Before you start, write down the very next step. One sentence is enough. When you return, you start from that note instead of from memory. One sentence, that's simple enough to try this week. [BLANK_AUDIO] → Welcome back to the show, today we are talking with the researcher who studies attention at work. Thanks for having me, the first thing I tell people is that interactions aren't really the problem. Really, then what is? Getting back, after a short break, most of us need a few minutes to find out place again. So what actually helps? Before you stop, write down the very next step. One sentence is enough. When you return, you start from that note instead of from memory. One sentence, that's simple enough to try this week. [BLANK_AUDIO] | Welcome back to the show, today we're talking with the researcher who studies attention at work. Thanks for having me, the first thing I tell people is that interruptions aren't really the problem. Really? Then what is? Getting back, after a short break, most of us need a few minutes to find our place again. So what actually helps? Before you start, write down the very next step. One sentence is enough, when you return, you start from that note instead of from memory. One sentence, that simple enough to try this week. [BLANK_AUDIO] → Welcome back to the show. Today we're talking with the researcher who studies attention at work. Thanks for having me. The first thing I tell people is that interruptions aren't really the problem. Really? Then what is? Getting back, after a short break, most of us need a few minutes to find our place again. So what actually helps? Before you stop, write down the very next step. One sentence is enough, when you return, you start from that note instead of from memory. One sentence, that simple enough to try this week. [BLANK_AUDIO] | Welcome back to the show. Today we're talking with a researcher who studies attention at work. Thanks for having me. The first thing I tell people is that interruptions aren't really the problem. Really? Then what is? Getting back. After a short break, most of us need a few minutes to find our place again. So what actually helps? Before you stop, write down the very next step. One sentence is enough. When you return, you start from that note instead of from memory. One sentence. That's simple enough to try this week. [BLANK_AUDIO] |
The famous failure — a subtitle filled with “Thank you.” — never appeared: on digital silence all 6 combinations answered [BLANK_AUDIO]. At −40 dB the largest model returned [BREAKING].
![EarScribe transcript of a silent 30-second file showing a single [BLANK_AUDIO] annotation and an empty word count](/screenshots/guides/silence-result.webp)
6 characters for [BEEP], 13 for [BLANK_AUDIO], 18 for (clippers buzzing) — all 36 runs:
| Input | tiny q8 | tiny fp32 | base q8 | base fp32 | small q8 | small fp32 | Answers | Repeat |
|---|---|---|---|---|---|---|---|---|
| Silence, 30 s | 13 | 13 | 13 | 13 | 13 | 13 | 1 | 0 |
| Room tone, −60 dB | 9 | 13 | 11 | 11 | 11 | 11 | 3 | 0 |
| Room tone, −40 dB | 9 | 7 | 15 | 7 | 10 | 10 | 5 | 0 |
| Room tone, −20 dB | 16 | 13 | 18 | 7 | 7 | 7 | 5 | 0 |
| Silence + one click | 6 | 13 | 6 | 13 | 13 | 13 | 2 | 0 |
| Speech, then 26 s silence | 539 | 538 | 537 | 536 | 536 | 536 | 5 | 0 |
Good news: this stack does not ramble — 0 characters of repeat across 36 runs. Bad news: an annotation is indistinguishable from speech in a transcript, and [BEEP] or[BLANK_AUDIO] for the same click depends on which weights loaded.
Whisper keeps repeating a sentence. Is that the same problem?
0 repeats in 36 runs, longest tandem repeat 0 characters. The four settings were written for this: the prompt is the model's own last line, so condition_on_previous_text feeds a loop — and it is 1 of the 4 missing here. The answer is 30 s windows with a 5 s stride.
Evidence about these 6 files, not a promise about yours: the 2-hour meeting people report most is the one we did not run.
So what can a browser actually do?
3 steps reduce whisper hallucination with no decoder parameter, all inside the local transcriber.
- 1Detect the language first
One decoder token on the first 30 s window; a wrong language is the usual cause of nonsense.
- 2Re-run instead of patching
If the pass returns only [Music], run it once more with the detected language.
- 3Keep the window short
30 s windows, 5 s stride. A repetition loop cannot span a boundary it never sees.
- 4Let a person see the token
The annotation is visible, so it can be deleted. Nothing else removes it.
The last step is the honest one: nothing removes [BLANK_AUDIO] from a finished transcript, which is why the music-only check exists.
When is there nothing left to fix?
2 hours of a lecture hall with the microphone at the back gives a plausible transcript of the room. The other 2: music under speech, and a phone call where the first window picks the wrong language. In all 3 the whisper hallucination is upstream of the tool.
What this page does not measure
- — 1 34-second English recording and 6 synthetic files: a loop needs a longer file, so “no repeats” is about this material.
- — 1 runtime, no manual listening, English only. Which model drops which word is the model comparison.
Written by Rocnubee. Method: probe-asr-params.mjs, whisper-text-bench.mjs.