This piece was created with AI assistance and may still contain mistakes or unclear bits. If you spot anything that should be corrected, please email ayushdeva97@gmail.com.
Audio Models · A Short History
The story of modern audio models
Modern audio modeling did not appear all at once. It emerged through a sequence of ideas: first engineered features, then learned representations from raw waveform, then large-scale speech models, and finally multimodal systems that can reason over audio as part of a broader context.
Earlier Systems
Before representations
We built features first, then trained models on top of them. A lot of intelligence lived in the pipeline, not the model.
Representation Learning
Learning from raw audio
BERT showed the power of self-supervision, but audio had no natural discrete tokens. Wav2Vec 2.0 and HuBERT changed that.
Multimodal Era
From speech to general audio
Whisper proved scale and weak supervision could make speech systems robust. Qwen pushes audio into the multimodal LLM era.
Big Picture
The central contrast is simple: text already comes in pieces, but audio arrives as a continuous wave. NLP had words, subwords, and tokens. Audio had pressure values changing every millisecond.
That difference matters. BERT-style learning depends on hiding some discrete symbols and asking the model to predict them from context. In audio, there is no obvious “wordpiece for sound” waiting for us. So the whole journey in speech representation learning is really a journey toward answering one question:
How do we turn continuous audio into something a model can predict, organize, and understand?
The Arc
1. The feature engineering era
Before 2020
Earlier speech systems usually did not learn directly from raw audio. We first converted the waveform into more digestible representations such as spectrograms, log-Mel features, MFCCs, pitch tracks, or other engineered descriptors. Then we trained CNNs, RNNs, or hybrid systems on top.
This worked, and it worked well enough to define the field for years. But there was a hidden limitation: a lot of domain knowledge had to be manually baked into the representation. The model was learning on processed views of sound rather than discovering its own representation from raw audio.
What worked
Spectrogram pipelines gave us a stable interface between signal processing and deep learning.
What hurt
Performance depended heavily on feature design, preprocessing choices, and task-specific tuning.
Intuition
We were teaching the model through our feature extractor first, and only then through data.
2. BERT changes the mood of the field
2018 onward
Then BERT happened. In language, a model could hide tokens, use context on both sides, and learn rich representations without explicit labels. That result was so powerful that naturally people asked: can we do the same thing for audio?
BERT figure from the referenced blog post.
Blog source
The obstacle was immediate. Text has discrete tokens. Audio is continuous. If you hide part of a waveform, what exactly should the model predict? The raw sample values? A spectrogram patch? Some latent symbol we do not yet know how to define?
At this point, the field no longer wanted only better handcrafted features. It wanted a way to learn the units of audio itself.
3. Wav2Vec 2.0: the first convincing answer
2020
Wav2Vec 2.0 is the first moment where the answer really clicks. Instead of forcing audio into fixed human-designed units up front, it learns continuous representations from raw waveform and then creates discrete targets through quantization. That gives the model something token-like to predict.
In the standard speech setup, that raw waveform is typically normalized to 16 kHz mono first. So when we talk about canonical Wav2Vec 2.0 or HuBERT checkpoints, we are usually talking about models trained around a 16 kHz speech pipeline rather than arbitrary sample rates.
Conceptually, the model says: first learn a dense, local encoding of sound; then convert those encodings into discrete codebook choices; then mask some positions and make a Transformer guess which discrete target belongs there from context.
Wav2Vec 2.0 architecture diagram from Anwar Vic’s explainer,
based on Baevski et al. (2020).
Blog source
·
Original paper
Wav2Vec 2.0 in one pass
1
Feature Extraction (CNN)
A 7-layer CNN encoder learns to map the raw waveform. For 1 second of audio, it outputs 50 continuous encodings in the Z space, each with a dimension of 512.
2
Codebook Initialization
The model maintains an embedding matrix consisting of two codebooks. Each codebook has 320 distinct options, totaling 640 options. Every option is represented by a 128-dimensional embedding.
3
Quantization (Z to Q)
The unmasked Z vectors undergo a linear transformation to produce logit scores across the 640 codebook options. A Gumbel-Softmax operation acts as a soft argmax to select the closest option from each of the two codebooks. The two resulting 128-dimensional embeddings are concatenated to construct the discrete Q vector, which natively has a dimension of 256.
4
Masking and Context (Z to C)
Spans of the Z sequence are intentionally masked out and replaced with a learned dummy vector. This partially masked sequence is passed through a Transformer, which outputs Context encodings in the C space, each with a dimension of 768.
5
Dimensionality Alignment
The contextual C vectors (768-dimensional) undergo a linear transformation to squash them down to 256 dimensions. This brings them into the exact same vector space as the Q targets.
6
Contrastive Loss
The model computes the dot product (cosine similarity) between the projected C vector (the Transformer's guess) and the correct Q vector for that masked time step. The contrastive loss function pushes these two together while actively pushing C away from roughly 100 random distractor Q vectors sampled from other time steps in the audio.
The intuitive win is simple: Wav2Vec 2.0 manufactures a prediction target for audio that plays the same role masked tokens play in NLP.
Solved
How to do BERT-like learning when audio does not start with tokens.
Key idea
Learn continuous representations, then discretize them just enough to make masked prediction possible.
Tradeoff
The model is learning representations and codebook assignments at the same time, which can make training fragile.
Issues with Wav2Vec 2.0
Training instability: the model is learning the continuous representation space and the discrete target system at the same time, which makes optimization more brittle than HuBERT's offline-target setup.
Codebook collapse risk: without explicit pressure to use the codebooks well, the quantizer can overuse a small subset of entries instead of spreading assignments across the vocabulary. This is why the method includes a diversity term.
Target quality shifts during training: because the quantized targets are learned online, the "thing to predict" is itself moving while the model trains.
False negatives in contrastive learning: some distractor Q vectors sampled from other time steps may actually be acoustically or linguistically similar to the correct target, which makes the objective noisier.
4. HuBERT: stabilize the target, simplify the learning problem
2021
HuBERT starts from a practical observation: in Wav2Vec 2.0, two hard things are happening at once. The model is trying to learn good speech representations while also learning the discrete target system that those representations should match.
HuBERT separates these concerns. Instead of learning the targets online through a jointly trained quantizer, it generates pseudo-labels offline using clustering. The model then predicts those cluster assignments for masked regions. In each round, k-means chooses k clusters, which means HuBERT is learning to classify each masked frame into one of k hidden-unit labels. Later rounds can recluster using better learned features, making the targets progressively stronger.
In the original recipe, the first round uses MFCC features with k = 100, giving a coarse 100-way pseudo-label vocabulary. A later round reclusters HuBERT's own learned representations with k = 500, creating a finer 500-way target space. These are frame-level acoustic units rather than text tokens, and that progressive refinement is what makes HuBERT's training unusually stable.
HuBERT's k = 500 should not be compared directly to Wav2Vec 2.0's two 320-entry codebooks. Wav2Vec 2.0 has a large combinatorial quantizer space, while HuBERT uses a single 500-way classification target per frame.
HuBERT visual explanation by Jonathan Boigne, illustrating offline clustering plus masked prediction,
based on Hsu et al. (2021).
Blog source
·
Original paper
What changed
The target units are produced externally instead of being jointly learned with the main objective.
Why it helps
Training becomes more stable because the prediction target is less slippery.
Bigger lesson
The model does not need perfect units at first; it just needs consistent ones that let context learning take off.
5. Whisper: scale, supervision, and robustness
2022
If Wav2Vec 2.0 and HuBERT are about unsupervised or self-supervised representation learning, Whisper is a different kind of breakthrough. It shows what happens when you train a large encoder-decoder Transformer on 680,000 hours of noisy, multilingual paired audio-text data — hundreds of times larger than the 960-hour LibriSpeech scale that defined many earlier speech benchmarks.
Whisper matters because it changes the field’s confidence in a practical way. It is not just a clever pretraining objective. It is a general speech model that works surprisingly well in the wild: accents, background noise, code-switching, translation, and messy internet audio.
The problem Whisper really tries to solve is not "how do we invent better speech units?" but "how do we build one speech system that is robust across the internet's actual mess?" Earlier systems were often strong only when the audio and labels looked like the benchmark. Whisper bets that if you train directly on enough real paired audio and text, robustness can emerge from scale and diversity rather than from a delicate self-supervised objective.
Whisper architecture chart from Graphcore’s Whisper write-up; the article notes the image and caption text are from the OpenAI Whisper paper.
Blog source
·
Original paper
Why Whisper feels different
1
Data preparation: normalize the world into one format
Audio is resampled to 16 kHz mono, converted into 80-channel log-Mel spectrograms, and packaged into uniform 30-second training examples. Long recordings are chopped into fixed windows so the model always sees the same input shape.
2
Architecture: classic seq2seq, but with task tokens
A small convolutional stem feeds a Transformer encoder over audio frames. A causal Transformer decoder then generates a unified token stream that can include language tags, task tags such as transcribe or translate, timestamp tokens, and the text itself.
3
Training: one next-token objective for many speech tasks
Whisper is not "SSL pretraining plus later ASR fine-tuning." It is trained end-to-end on weakly supervised audio→text pairs using one autoregressive next-token loss. That single format lets the same model handle multilingual ASR, X→English speech translation, language identification, and no-speech detection.
The training corpus is the other big story. Whisper was trained on about 680,000 hours of web-scale paired audio and text: English ASR pairs, non-English ASR pairs across 96 other languages, and X→English translation pairs. These labels were available, but they were noisy — subtitles can drift, paraphrase, or summarize — so the paper frames the setup as weakly supervised, not carefully hand-aligned supervised speech data.
That detail matters because it explains both Whisper's strength and its failure mode. The model becomes unusually robust to accents, microphones, and domain shift because it has seen a huge variety of imperfect real-world data. But the same noisy supervision also helps explain why Whisper can hallucinate on silence, music, or badly segmented input: it learned from a world where the text and the audio were often only approximately aligned.
How Whisper encodes time
One elegant consequence of the unified token stream is that Whisper can produce timestamps without any separate alignment module or timing head. Time is simply more tokens in the same vocabulary. The tokenizer reserves a contiguous block of special timestamp tokens, and the decoder emits them inline with the text exactly like any other token — so timing is learned as part of next-token prediction rather than bolted on afterwards.
Each 30-second window is divided into 0.02s (20 ms) bins, which gives 1,501 timestamp tokens running from <|0.00|> through <|30.00|>. A spoken segment is then bracketed by a start and an end timestamp token, with the text tokens sitting in between:
<|startoftranscript|><|en|><|transcribe|>
<|0.00|> Hello and welcome back <|2.40|>
<|2.40|> to the show <|3.88|>
<|endoftext|>
Because those timestamps are measured from the start of the current window, long-form audio has to add each window's offset back to recover absolute time — the same chunk-and-stitch logic that already drives Whisper's 30-second processing. This built-in timing is segment-level: it brackets phrases rather than individual words, and it can drift on long stitched recordings.
For word-level timestamps the inline tokens are too coarse, so the standard trick is cross-attention alignment — running dynamic time warping over the decoder-to-encoder attention weights of specific heads to line each word up with an audio frame. That is what tools like WhisperX, faster-whisper, and whisper.cpp do under the hood. In the Hugging Face transformers pipeline the whole choice collapses to one flag: return_timestamps=True for segment-level timing and return_timestamps="word" for per-word timing.
Shift
The center of gravity moves from “learn audio units” to “train broadly enough that robustness emerges.”
Why it landed
Large-scale weak supervision turned out to be incredibly effective for speech recognition and translation.
Broader shift
This is where the story broadens from representation learning to foundation-model behavior.
Wav2Vec 2.0 asks: how can audio learn internal units without labels?
HuBERT asks: how can we make that process more stable?
Whisper asks: what if we simply scale paired audio-text learning until it becomes broadly useful?
6. Qwen Audio and the multimodal turn
Recent
The newest part of the story is that audio is no longer treated only as a signal to transcribe. In multimodal systems like Qwen Audio, audio becomes another modality that can be fed into a general instruction-following model.
That means the goal is no longer just “what was said?” but also “what is happening?”, “what should I infer from this sound?”, or “how does this audio relate to the rest of the context?” Audio moves from a narrow speech pipeline into a broader reasoning stack.
This section is really about a change in problem definition. Whisper is still fundamentally a speech-to-text system, even if it is multilingual and robust. Qwen Audio asks for something broader: can one model answer questions about speech, music, environmental sound, and mixed acoustic scenes in natural language, while also behaving like an instruction-following assistant?
Architecture: audio encoder → projector → language model
Instead of decoding text directly from audio as Whisper does, Qwen Audio first turns audio into learned features, projects those features into the token embedding space of a large language model, and then lets the LLM generate the response. Audio becomes part of the prompt, not just the source of a transcript.
2
Training: align audio features with the LLM, then instruction-tune
The family uses a staged recipe. First, audio representations are aligned to the LLM's token space. Then the system is jointly trained across many audio-text tasks, and finally instruction tuning teaches the model to answer in a conversational, assistant-like way.
3
Scope: not just speech
The important departure is data diversity. These models are trained across speech, environmental sound, and music datasets rather than only transcription corpora. That is what allows questions like "what instruments are playing?" or "describe this acoustic scene," which are outside Whisper's design center.
There is also an architectural evolution inside the family. The earlier Qwen-Audio recipe uses a Whisper-large-v2 encoder plus a projection layer into Qwen-7B. Qwen2-Audio still initializes its audio encoder from Whisper (the newer large-v3), but trains it more broadly for general audio understanding rather than leaving a speech-first encoder untouched. That shift is important because speech encoders are excellent at transcription, but they are not automatically ideal for music, sound events, or open-ended audio reasoning.
The paper-level contribution here is not one isolated trick. It is the combination: a multimodal architecture, a broad multi-dataset training mixture, and instruction tuning that teaches the model to respond in natural language. The result is that audio stops being a narrow pipeline and becomes another input channel for a general-purpose assistant.
The story begins with engineered signal features and ends with models that treat audio as part of general intelligence.
What This History Shows
Each model solves a different bottleneck in the same longer story.
Feature engineering gave us useful views of audio. Wav2Vec 2.0 gave us a way to create prediction targets from raw sound. HuBERT made that learning recipe steadier. Whisper showed that scale and broad supervision can produce robust real-world speech systems. Qwen represents the next step, where audio is part of a multimodal reasoning model rather than a standalone ASR stack.
Read this sequence as a progression in what the field learned to do: represent sound, discretize sound, predict hidden structure, scale to messy real-world speech, and finally combine audio with general language reasoning.