Skip to content

Speech Recognition & Synthesis

Text-to-Speech

8 min+80 XPStep 1/10

ASR, run in reverse

Text-to-speech mirrors recognition: text in, sound out. It splits into two stages:

  • Acoustic model — predicts a mel spectrogram from the text: which frequencies, when, and how they slide
  • Vocoder — inverts the spectrogram back into a raw waveform you can play

Why two stages? Modeling 16–24 thousand samples per second directly is brutal; the spectrogram is a compressed, friendlier target. Siri, Alexa, and every AI audiobook narrator run this two-step.

analogy

The acoustic model writes the sheet music; the vocoder performs it. A spectrogram says which frequencies play when — the vocoder has to figure out the actual air-pressure line.