Concept · Chapter 5: Vision, Speech & Reinforcement Learning
Speech Recognition and Synthesis
Speech recognition maps a sequence of audio frames to a sequence of words; the field moved from hand-built pipelines to CTC-trained networks to large encoder–decoder Transformers such as Whisper.
The problem
Audio frames and output characters have different lengths and no given alignment: nobody labels which 10 ms slice belongs to which letter.
The solution
Either sum over all alignments with CTC, or treat the task as sequence-to-sequence translation from audio frames to text tokens with attention.
The consequence
End-to-end models trained on vast amounts of loosely labelled audio became robust general-purpose transcribers.
You should understand first
- Vectors
- Audio and Spectrograms
- Speech Recognition and Synthesis
The alignment problem
A 3-second clip at 10 ms per frame is 300 frames; its transcript "hello world" is 11 characters. Which frames are the "h"? A frame-by-frame classifier would need that answer for every training example.
Three generations
Pipelines
For decades, recognisers combined an acoustic model (Gaussian mixtures over spectral features), a pronunciation dictionary and an n-gram language model, stitched together with hidden Markov models. Around 2012, four research groups reported that deep neural networks beat the Gaussian-mixture acoustic models Established.CTC
Connectionist temporal classification lets the network output a character or a special blank at every frame. To read the output, merge repeats and delete blanks:hh_e_ll_llo→hello(the blank between the two l-runs keeps the double l). Training sums the probability of every frame sequence that collapses to the true transcript, computed efficiently by dynamic programming. No alignment labels needed.Encoder–decoder
Treat recognition as sequence-to-sequence translation: an encoder reads spectrogram frames and a decoder writes text tokens, using attention to decide which frames to look at. Whisper trained such a Transformer on 680,000 hours of multilingual audio paired with transcripts from the internet, and transcribes, translates and identifies languages without task-specific fine-tuning Established.
The arc mirrors the rest of this site: hand-built components replaced by one learned model, then one bigger model trained on much more (and messier) data.
The reverse direction
Text-to-speech typically predicts a spectrogram-like representation from text, then a vocoder turns it into a waveform. WaveNet (2016) showed that generating raw audio sample by sample with dilated causal convolutions sounds far more natural than earlier synthesis Established. Many recent systems instead predict discrete audio tokens with a language-model-style Transformer (Chapter 15).
What to remember
- Classic ASR: acoustic model + pronunciation lexicon + language model, trained separately.
- CTC (2006): add a blank symbol, sum the probability of every frame alignment that collapses to the transcript.
- Whisper (2022): an encoder–decoder Transformer trained on 680,000 hours of web audio with transcripts.
- Text-to-speech runs the other way: text → spectrogram-like features → waveform.
Key papers
Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks
Alex Graves, Santiago Fernández et al. · 2006 · ICML 2006
Let a network learn speech-to-text from audio paired with transcripts only, without anyone marking where each sound starts and ends.
Deep Neural Networks for Acoustic Modeling in Speech Recognition: The Shared Views of Four Research Groups
Geoffrey Hinton, Li Deng et al. · 2012 · IEEE Signal Processing Magazine
Four research groups reported that deep networks beat the Gaussian mixture models that had powered speech recognisers for decades. Speech fell to deep learning in the same years as vision.
WaveNet: A Generative Model for Raw Audio
Aaron van den Oord, Sander Dieleman et al. · 2016
Generated audio one sample at a time with a stack of dilated causal convolutions, and produced much more natural-sounding synthetic speech.
Robust Speech Recognition via Large-Scale Weak Supervision
Alec Radford, Jong Wook Kim et al. · 2022
Whisper: an encoder–decoder Transformer trained on 680,000 hours of audio paired with transcripts gathered from the internet. Speech recognition became one more sequence-to-sequence problem solved by scale.