Skip to content

Speech Recognition & Synthesis

The ASR Pipeline

9 min+80 XPStep 1/10

Audio in, tokens out

Automatic speech recognition (ASR) is sequence-to-sequence with a twist: the input isn't tokens — it's thousands of audio samples per second.

The pipeline:

  • Features — the waveform becomes a mel spectrogram
  • Encoder — reads the spectrogram and compresses it into audio embeddings
  • Decoder — emits text tokens one at a time, attending back over the audio

Thirty seconds of speech go in; 'the cat sat on the mat' comes out. The model never sees a waveform — it reads a picture of sound and writes words.

analogy

A court stenographer: listens in one language (sound), writes in another (text). The encoder is the listening part.