Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

~8 min readOpenAI · 2022

Whisper,
explained.

Speech recognition used to be a fragile thing: train it on clean, read-aloud audio and it stumbles the moment there's an accent, a fan humming, or a second language. Whisper made a bigger, blunter bet — skip the pristine datasets, scrape 680,000 hours of messy real audio off the web, and let sheer diversity teach robustness. The result transcribes and translates dozens of languages, out of the box, on recordings it has never heard.

The delta

What changes against wav2vec 2.0: give up clean labels and take 680,000 hours

This rung supersedes rung 4's strategy rather than its architecture, and the disagreement is about what is scarce. Rung 4 treats transcripts as the bottleneck and works around them with self-supervision. This rung observes that transcripts are not actually scarce if you accept imperfect ones: the web has an enormous quantity of audio paired with text of varying quality, and the change is to take 680,000 hours of it and train an ordinary supervised encoder-decoder transformer on the lot.

No self-supervision, no pre-train-then-fine-tune, nothing clever about the architecture. The one design idea is that the task is specified in the decoder's own output: special tokens say which language this is, whether to transcribe or translate, and whether to emit timestamps. So one model does several jobs, selected by tokens, and multilingual data trains one set of weights instead of many.

Stated in rung 4's units, the payoff is the absence of a step: no fine-tuning at all. The model is used zero-shot on datasets it has never seen, and — the finding that made the paper — it is more robust out of distribution than models fine-tuned on those datasets, on noisy, accented and spontaneous speech. The explanation is that a model fine-tuned on a clean benchmark has specialised to it, while one trained across a vast diverse mess never had the chance. Diversity of weak supervision beat quality of clean supervision, and that is a claim about data strategy far beyond speech.

01

The fragility problem

Before Whisper, the best speech recognizers were trained on carefully curated, hand-transcribed audio — sometimes with clever self-supervised pre-training on top. They scored beautifully on their own benchmarks. But move them to real life — a noisy café, a strong accent, a podcast, a different microphone — and accuracy fell off a cliff. They had learned the narrow world of their training set, not speech in general.

The catch was data. Clean, human-transcribed audio is scarce and expensive, so datasets stayed small and homogeneous, and models stayed brittle. To fine-tune one for your audio, you needed labeled examples of your audio. Whisper's whole premise was to escape that trap by trading label quality for label quantity.

02

The weak-supervision bet

The internet is full of audio that already comes with transcripts — videos with captions, talks with subtitles, podcasts with show notes. Individually these labels are imperfect; collectively they're a firehose. Whisper's team scraped this weakly supervised data at massive scale, then filtered aggressively: they removed machine-generated transcripts (learning from another ASR system's mistakes would just launder them), used language detection to align audio and text, and dropped low-quality pairs.

What survived was about 680,000 hours of audio — orders of magnitude more than typical supervised sets — spanning many languages, accents, topics, and recording conditions. The wager: a model trained on this vast, noisy, diverse pile would generalize far better than one trained on a small, spotless one. Diversity as the source of robustness.

The core trade

Clean supervision → high scores on a narrow benchmark. Weak supervision at scale → slightly noisier labels, but exposure to the messy real world, and dramatically better generalization to audio the model has never seen.

03

From audio to spectrogram

A neural network can't chew on a raw waveform easily, so Whisper first turns sound into a picture-like input: a log-mel spectrogram. Slice the audio into short overlapping windows, measure how much energy sits at each frequency in each window, and lay it out as a 2D grid — frequency up the side, time across the bottom. It's essentially a heatmap of the sound.

Audio is processed in 30-second chunks, each becoming one spectrogram. This fixed-size, image-like representation is exactly the sort of grid a Transformer handles well — and it's why the same attention machinery that reads text and image patches can read speech too.

Whisper pipeline — audio in, text out
Audio
30-sec chunk
→
Log-mel
spectrogram
→
Encoder
Transformer
→
Decoder
text tokens
04

A plain encoder-decoder Transformer

The architecture is deliberately unremarkable — a standard encoder-decoder Transformer, the same family as seq2seq and T5. The encoder reads the spectrogram and builds a rich representation of the audio; the decoder generates the transcript token by token, attending to the encoder's output — exactly like translating one sequence into another.

That plainness is the point. Whisper's authors intentionally avoided architectural novelty to isolate their real variable: the data. The message is that with enough diverse, weakly-labeled audio, a bog-standard Transformer becomes a robust, general speech recognizer. The breakthrough is the training recipe, not the network.

05

One model, many tasks

Whisper doesn't just transcribe. It folds several speech tasks into one model using special tokens in the decoder's input — a trick borrowed from the text-to-text playbook. A little sequence of control tokens tells the same model what to do:

Control tokens steer the one model
<|startoftranscript|> <|en|> <|transcribe|> thequickfox…

Swap <|transcribe|> for <|translate|> and it renders the speech as English text instead. Set the language token, or let the model detect the language itself. Timestamps are emitted by default unless the no-timestamps token is given. Multilingual transcription, speech-to-English translation, language ID, and timestamped output — all one model, selected by tokens.

The interface is just a template. The same audio, two different jobs, one token apart:

Task, language, and timestamps are all just tokens in the prompt — the model reads them and complies. The runnable version below builds and parses these sequences.

07

The limits

Weak supervision leaves fingerprints. Whisper sometimes hallucinates — inventing plausible words during silence or noise, since a generative decoder is always predicting some likely text. Its quality is uneven across languages, strongest for those (like English) with the most training audio and weaker for low-resource ones. And the 30-second window means long audio must be chunked, which can drop context at the seams.

It's also purely a recognizer: no speaker diarization ("who said what"), and being an autoregressive Transformer, real-time streaming isn't its native mode. These are real gaps — but they're the price of the design that made it so broadly robust in the first place.

08

Why it still matters

Whisper made robust, multilingual speech recognition a commodity. By open-sourcing a model that "just works" on real-world audio, it removed a huge barrier for anyone building voice products, and it became the default speech-to-text engine across a swathe of the industry.

Its deeper lesson echoes the rest of modern AI: scale and diversity of data can beat careful curation. Rather than engineer a cleverer model or a cleaner dataset, Whisper scaled up messy, weakly-labeled data and let a plain Transformer generalize. It's the same bet that powers large language models, applied to sound — and it's why speech joined text and images as a domain the Transformer conquered.

Read next

Whisper is the encoder-decoder idea from seq2seq applied to audio, using the Transformer as its backbone. See also the speech-to-text system design.

How it works

How Whisper is trained and how it decodes long audio

Whisper is trained like a captioning model: a 30-second log-mel spectrogram goes in and a sequence of tokens comes out. The paper's contributions are the data pipeline, a token format that encodes the task, and a set of decoding rules for audio longer than one window.

Audio window: t to t + 30 s Log-mel, 3,000 frames → encoder Decoder: previous text + task tokens beam of 5 at T = 0, else sampling Average log-prob ≥ −1 and gzip ratio ≤ 2.4? No: T + 0.2 up to T = 1.0 yes Keep text and timestamps becomes previous text if T under 0.5 Next t = end of last full segment repeat silent if no-speech p above 0.6 and log-prob below −1
Whisper's long-form loop, with the paper's thresholds. The predicted timestamps are what let the window slide forward without cutting a word in half.
  1. Collect the data. 680,000 hours of audio paired with transcripts found on the internet: 117,000 hours of speech in 96 languages other than English with same-language text, 125,000 hours of non-English speech with English text, used as translation data, and the remaining roughly 438,000 hours of English speech with English text.
  2. Filter it. Heuristics remove transcripts that look machine-generated, since training on another recognizer's output would teach its mistakes. An audio language detector checks the spoken language against the transcript's language: mismatched pairs are dropped, unless the transcript is English, in which case they become translation examples. Transcripts are fuzzily de-duplicated, and after a first model was trained, data sources with high error rates were inspected by hand and removed when they proved low quality.
  3. Cut 30-second segments. Each segment is paired with the part of the transcript that falls inside it. Segments without speech are kept, at a reduced rate, to train voice-activity detection.
  4. Featurize. Audio resampled to 16 kHz becomes an 80-channel log-mel spectrogram with 25 ms windows every 10 ms: 3,000 frames per segment, scaled to roughly −1 to 1.
  5. Encode and decode. Two convolutions (filter width 3, GELU, the second with stride 2) halve the frames to 1,500, one per 20 ms, and sinusoidal positions and pre-activation Transformer blocks follow. The decoder has learned positions and ties its input and output token embeddings, using GPT-2's byte-level tokenizer, refit at the same size for the multilingual models.
  6. Write targets in the task format. Optionally the previous segment's text behind its own special token, then <|startoftranscript|>, a language token (one of 99) or <|nospeech|>, then <|transcribe|> or <|translate|>, then either <|notimestamps|> or text interleaved with timestamp tokens quantized to 20 ms, and finally <|endoftranscript|>. The loss skips the previous-text context.
  7. Train five sizes. Tiny (39M; 4 layers, width 384), base (74M; 6, 512), small (244M; 12, 768), medium (769M; 24, 1,024) and large (1.55B; 32, 1,280), with encoder and decoder the same size. AdamW with gradient-norm clipping, batches of 256 segments, a 2,048-update warmup then linear decay, for 2^20 updates, two to three passes over the data. No augmentation or regularization; large-v2, released later, trained 2.5 times as many epochs with SpecAugment, stochastic depth and BPE dropout.

Decoding audio longer than 30 seconds

Long recordings are transcribed one 30-second window at a time, and the predicted timestamps decide where the next window starts: at the end of the last complete segment, so no word is cut in half. Around that loop the paper adds five rules. Decode with a beam of 5. If the result's average log-probability is below −1 or its gzip compression ratio is above 2.4, decode again at a temperature 0.2 higher, up to 1.0. Pass a window's text on as context only if it was decoded at a temperature below 0.5. Treat a window as silent when the no-speech probability is above 0.6 and the average log-probability is below −1. And force the first timestamp to fall within the first second, so the model cannot skip the opening words.

The math

Whisper's training loss and long-form acceptance rules

L = −Σi ∈ target log pθ(yi | y<i, prev, X)
accept at T ⇔ (1/n) Σi log p(yi) ≥ −1 and bytes(text) / bytes(gzip(text)) ≤ 2.4, T ∈ {0, 0.2, …, 1.0}
silent ⇔ p(<|nospeech|>) > 0.6 and (1/n) Σi log p(yi) < −1
  • X — the 80 × 3,000 log-mel spectrogram of one 30-second window
  • prev — the previous window's text, given as context and excluded from the loss
  • y — the target: special tokens, text and timestamps, where timestamps come in 20 ms steps, 1,501 values from 0.00 to 30.00
  • n — the number of generated tokens, so the average log-probability is the decoder's confidence per token
  • bytes(text) / bytes(gzip(text)) — how well the text compresses; repetitive text compresses far better than speech does
  • T — the sampling temperature; T = 0 means beam search

At the extremes: a loop that repeats one phrase across the window compresses many times over, so its ratio passes 2.4 even when every token is confident, and the window is decoded again with more randomness. Ordinary speech passes both tests at T = 0. A high no-speech probability alone never deletes a window; the decoder must also be unsure of what it wrote, because the paper found the no-speech probability by itself an unreliable sign of silence.

The evidence

Zero-shot Whisper against a fine-tuned model

Whisper was evaluated zero-shot, with no fine-tuning on any test set, across a dozen English speech-recognition sets (LibriSpeech, TED-LIUM 3, Common Voice, CHiME-6, AMI, Switchboard, CallHome and others), plus multilingual recognition, speech translation, language identification, added noise and long recordings. WER was computed after a text normalizer the authors built and released; they note it was developed alongside Whisper and so risks favoring its transcription style. The key comparison holds in-distribution accuracy fixed and asks how much each model degrades elsewhere, an effective-robustness measure.

ModelLibriSpeech test-clean WERAverage WER, other English sets
wav2vec 2.0 Large, fine-tuned on LibriSpeech, no LM2.729.3
Whisper large-v2, zero-shot2.712.8

At the same LibriSpeech score, Whisper made 55.2% fewer errors on average on the other sets. Even the 39M-parameter tiny model, at 6.7 WER on LibriSpeech test-clean, was roughly competitive out of distribution with the best supervised LibriSpeech model.

The scaling and transfer results are less flattering:

  • English WER fell quickly from 3,000 to 13,000 training hours, slowed noticeably by 54,000, and the full 680,000 hours bought only about one more point.
  • Across languages, log WER tracked log training hours closely (squared correlation 0.83); the authors estimate WER halves for every 16× more data, so low-resource languages lag badly.
  • For small models, training on many tasks and languages hurt English results compared with English-only training; the advantage reversed only at the largest scales.
  • The long-form heuristics lowered WER overall but not evenly across datasets.
  • The paper names its stubborn failure modes: repeat loops, skipping the first or last words of a segment, and complete hallucination of text unrelated to the audio.
Since then

What the authors admit, and what happened next

The paper is clear that it is not state of the art in-distribution: on a clean benchmark, a model fine-tuned on that benchmark wins. The claim is specifically about robustness and generality, which is the correct comparison for something intended to be used rather than scored, and it is honest about the trade.

The most consequential real-world failure is hallucinated transcripts, and it follows from the architecture: an autoregressive decoder trained on web text will, given silence, music or noise, sometimes generate fluent text that no one said — repeated loops, or phrases characteristic of its training data such as subtitle credits. This has been documented repeatedly since, including in settings where an invented sentence in a transcript is genuinely harmful, and it is a good example of a known, structural failure that aggregate accuracy metrics hide. Long audio also needs chunking with heuristics for stitching, which introduces its own errors at the seams.

How it held up: it became the default speech recogniser, open weights and widely deployed, and the weak-supervision-at-scale argument was influential well beyond audio. Read rungs 4 and 5 as a genuine unresolved disagreement rather than a progression: where audio is plentiful and transcripts are absent, rung 4's approach is the only one available; where a large diverse weakly-labelled corpus can be assembled, rung 5 says stop engineering and collect it.

SOLVE IT YOURSELF

Steer one model with tokens

Whisper's "one model, many tasks" isn't magic — it's a token protocol you can implement in a dozen lines. This builds the decoder's special-token prompt for any job (transcribe or translate, which language, timestamps or not) and parses a sequence back into its config. Run it and see the punchline: transcribe and translate on the same audio differ by exactly one token. The tokens are the task selector. Change the language, task, or timestamp flag.

YOUR TASK

Write the body of build_prompt. Everything else in the file is already written; this is the function the paper is about. Press ▶ Run to check it against the 5 assertions below — they start red.

WHAT IT HAS TO SATISFY — 5 ASSERTIONS
  1. An English transcribe prompt has the expected token order
  2. Transcribe and translate differ by exactly one token
  3. Turning timestamps on drops the notimestamps token
  4. Parsing a built prompt round-trips the config
  5. Every prompt begins with the start-of-transcript token
CPython · WebAssembly
Questions

Questions people ask about Whisper

Why does Whisper hallucinate on silence?

Whisper's decoder is a language model trained on internet transcripts, so given audio without speech it can still produce fluent, probable text: repeated phrases, or the kind of line common in its training transcripts, such as subtitle credits. The paper trains a no-speech token on silent segments but found its probability alone unreliable, so its long-form procedure skips a window only when the no-speech probability is above 0.6 and the average log-probability is below −1. A gzip compression ratio above 2.4 catches repetition loops and triggers re-decoding at a higher temperature. In practice, trimming silence with a separate voice-activity detector, or turning off previous-text conditioning so one invented line cannot seed the next window, also reduces the problem.

What are the Whisper model sizes?

The paper trained five: tiny with 39 million parameters (4 layers, width 384, 6 heads), base with 74 million (6 layers, width 512, 8 heads), small with 244 million (12, 768, 12), medium with 769 million (24, 1,024, 16) and large with 1.55 billion (32 layers, width 1,280, 20 heads). Encoder and decoder share the same depth and width. Large-v2, added in a later revision of the paper, keeps the large architecture but trains for 2.5 times as many epochs with SpecAugment, stochastic depth and BPE dropout. Even tiny, at 6.7 WER on LibriSpeech test-clean, holds up out of distribution about as well as the best supervised LibriSpeech model in the paper's comparison.

How does Whisper transcribe audio longer than 30 seconds?

It slides a 30-second window. Each window is transcribed with timestamps, and the next window starts at the end of the last complete segment the model timestamped, so words are not split across windows. The paper adds rules around that loop: beam search with five beams; re-decoding at a temperature 0.2 higher, up to 1.0, whenever the output's average log-probability is below −1 or its gzip compression ratio is above 2.4; passing the previous window's text as context only when it was decoded below temperature 0.5; skipping windows judged silent; and forcing the first timestamp into the first second. The authors report that these heuristics lowered WER on long recordings overall, though not evenly across datasets.

What do Whisper's special tokens and timestamp tokens do?

They tell one decoder which job to do. Every target starts with a start-of-transcript token, then a language token (one of 99) or a no-speech token, then a task token for transcribing in the spoken language or translating into English, then either a no-timestamps token or text interleaved with timestamp tokens that mark when each segment starts and ends, quantized to 20 milliseconds. An end-of-transcript token closes the sequence. Text from the previous window can come first, behind its own special token, as context the loss ignores. Because the language token is predicted rather than given, the same mechanism doubles as language identification.

Is Whisper more accurate than wav2vec 2.0?

It depends on where you measure. On LibriSpeech test-clean, zero-shot Whisper large-v2 and a wav2vec 2.0 Large fine-tuned on LibriSpeech, decoded without a language model, both score 2.7 WER. Across the other English test sets in the paper, the fine-tuned wav2vec 2.0 averages 29.3 WER and Whisper 12.8, a 55.2% average relative reduction in errors. The paper is explicit that a model fine-tuned on a benchmark can still beat Whisper on that benchmark; the claim is robustness, not in-distribution state of the art. wav2vec 2.0 also needs some transcribed audio for every new language or domain, while Whisper needs none for languages in its training data.

How was Whisper's training data filtered?

The authors started from audio paired with transcripts on the internet and removed what would teach the wrong thing. Transcripts that looked machine-generated were dropped, since learning from another speech recognizer's output would copy its errors. An audio language detector compared the spoken language with the transcript's language; pairs that disagreed were dropped, except when the transcript was English, in which case they became speech-translation examples. Transcripts were fuzzily de-duplicated. After a first model was trained, sources with high error rates were inspected by hand and removed when they proved low quality. The 680,000 hours that remained were cut into 30-second segments, with silent segments kept at a reduced rate to train voice-activity detection.

Check yourself

4 questions to test what you just read

Work each one out before you open it — a number, a prediction or a reason, not a definition. Producing the answer is what makes it stick. Your progress is kept on this device.

For one 30-second window, how many spectrogram frames, encoder positions and distinct timestamp tokens are there?

Show answer

A 10 ms stride gives 3,000 frames; the stride-2 convolution halves them to 1,500 encoder positions, one per 20 ms; timestamps every 20 ms from 0.00 to 30.00 give 1,501 tokens. Each timestamp step lines up with one encoder position.

At T = 0 a window comes back repeating one phrase, with average log-probability −0.3 and gzip ratio 4.1. What does the long-form procedure do next?

Show answer

The log-probability test passes (−0.3 ≥ −1) but the ratio test fails (4.1 > 2.4), so the window is decoded again at T = 0.2, then 0.4 and so on, until both tests pass or T reaches 1.0. If the accepted decode needed T ≥ 0.5, its text is not passed on as context, so a shaky window cannot seed a loop in the next one.

A window has no-speech probability 0.7 and average log-probability −0.4. Is it skipped as silence, and why does the rule need both numbers?

Show answer

No. Skipping needs no-speech above 0.6 and average log-probability below −1, and here the decoder is confident (−0.4). The paper found the no-speech probability alone unreliable; requiring low confidence as well keeps quiet but real speech that was transcribed with confidence.

Why is the first timestamp of each window forced to fall between 0.0 and 1.0 seconds?

Show answer

Each window begins where the last complete segment ended, so speech should start almost at once. Without the constraint, the decoder could open its first segment several seconds in and silently drop the opening words, a failure the paper names. Forcing the first timestamp into the first second makes the model account for the start of the window.

Where this sits

One model, many senses

Joining text to images, audio, video and finally to a robot arm. Starts with the contrastive objective the whole field standardised on.

  1. 1CLIP2021
  2. 2Flamingo2022
  3. 3LLaVA2023
  4. 4wav2vec 2.02020
  5. 5Whisper2022
  6. 6V-JEPA2024
  7. 7RT-22023
  8. 8Genie2024

All 110 papers, in 19 ladders →

Robust Speech Recognition via Large-Scale Weak Supervision · Radford, Kim, Xu, Brockman, McLeavey, Sutskever · OpenAI 2022 · read the original paper on arXiv → · Vibe Engines · 2026
Finished this one? 0 / 110 Paper Breakdowns done
NextV-JEPA Next on the “One model, many senses” ladder · rung 6 of 8

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns