How Text-to-Speech Works: A Pipeline View for Engineers and Musicians
A precise walkthrough of TTS frontend and backend stages—normalization, prosody, mel-spectrograms, vocoders—and how speech synthesis differs from singing generation.

Text-to-speech (TTS) looks simple from the outside: paste a sentence, hear a voice. Inside, the system is a staged pipeline that turns orthography into timing, pitch, and a waveform. If you write lyrics, ship voice features, or evaluate “AI vocal” tools, knowing those stages helps you diagnose bad takes and avoid comparing products that solve different problems.
A pipeline view helps separate errors in reading the text from errors in generating sound. The stages below are conceptual: some systems expose separate components; others learn several stages together. Song generators that sing share some signal-processing vocabulary with TTS, but they optimize for different targets—more on that near the end.
The two halves of a TTS system
Frontend and backend describe two useful responsibilities here, rather than browser and server code. Their boundaries vary by architecture:
- Frontend (text → linguistic representation). Normalize text, select pronunciations, and represent linguistic context. Some systems also assign explicit phrasing or stress cues.
- Backend (representation → audio). Generate speech acoustics and waveform samples. Duration, pitch, and energy may be predicted here; some systems use a mel-spectrogram and separate vocoder, while others learn these steps jointly.
Errors early in the frontend—misread dates, wrong homograph, flat phrasing—survive every later stage. When a take sounds “almost right,” ask whether the bug is linguistic or acoustic before you swap models.
Frontend: making text speakable
Normalization
Raw text is not what people say out loud. A normalizer expands:
- abbreviations (
Dr.→DoctororDrive, depending on context), - currency and units (
$11→eleven dollars), - dates and times (locale decides whether
10/06is October 6 or 6 October), - ordinals, phone numbers, and URLs.
Check normalization before changing voices. A SKU may need character-by-character reading, while a chemical name may need a pronunciation entry. Decide what should be spoken before deciding how it should sound.
Tokenization and context
Depending on the system, the model receives characters, subwords, phonemes, or a mixture. A pronunciation lexicon or grapheme-to-phoneme component may resolve words before acoustic generation. Context can help distinguish record the noun from record the verb, but supplying a sentence does not guarantee the intended pronunciation or emphasis. Treat context as a first-class input, not a post-process you can ignore.
Prosody
Prosody is pitch, timing, loudness, and phrasing—the part musicians already hear as “delivery.” A TTS frontend either predicts a prosody plan explicitly (duration, F0 contour, energy) or lets an end-to-end model absorb it. Either way, the musical intuitions transfer:
- questions often rise where statements fall,
- lists want boundary tones between items,
- long clauses need breath-shaped pauses or they fatigue listeners,
- emphasis belongs on new information, not on every adjective.
When a voice sounds monotone over a ten-minute script, the usual culprits are repetitive sentence shapes in the source text and a prosody model that settles into one comfortable contour. Vary clause length in the script before you blame the vocoder.
Homographs and pronunciation control
English is full of spelling collisions: desert / desert, bass / bass, lead / lead. The frontend must pick a pronunciation from context. For names, coined terms, and loanwords, check whether the selected model and language support either of these controls:
- a pronunciation dictionary (often a PLS lexicon mapping graphemes to phonemes), or
- inline phonetic tags (IPA or a vendor-specific phoneme string) for one-off fixes.
Use a dictionary for recurring terms and a supported inline override for an isolated correction. Test both with the intended voice and language; neither PLS files nor IPA tags are universal inputs. Musicians who already respell lyrics phonetically for song models are solving a related alignment problem—aimed at sung timing rather than spoken phoneme graphs.
Backend: acoustics and waveform
Acoustic model
The acoustic model turns the linguistic plan into a time-frequency picture of speech. For years the workhorse target has been the mel-spectrogram: energy across mel-scaled frequency bands over time. It is compact enough to predict, and rich enough that a good vocoder can reconstruct intelligible, natural speech. Newer systems may predict latents instead of mel bins, but the role is the same—bridge language and waveform.
Vocoder / waveform model
A vocoder (or a neural waveform model) converts that acoustic plan into samples you can play. Older pipelines used signal-processing vocoders; modern stacks use neural vocoders trained against recorded speech. Direct text-to-waveform models collapse acoustic model and vocoder into one network; they can be simpler to serve, but you still debug them with the same ears: pronunciation, pacing, sibilance, and breath.
A worked sentence
Take: Mr. Ríos paid $11 on 10/06.
- Normalize: expand
Mr., speak$11as currency, choose a locale for the date. - Resolve pronunciation: check how the selected voice reads “Ríos”; add a supported override if needed.
- Generate phrasing: listen for emphasis on the amount and a plausible sentence ending. The written sentence alone does not specify either exactly.
- Predict acoustics: in a mel-based system, generate spectral frames containing vowel resonances, harmonics, and consonant noise.
- Vocode: waveform out.
If step 1 picks the wrong date locale, steps 2–5 will carefully render the wrong words. Fix upstream.
Why neural TTS replaced earlier generations
Rough history, useful when a vendor brochure says “studio quality” without saying which era they left:
- Formant synthesis (1970s–80s). Rule-driven resonances. Intelligible, often robotic, tiny footprint.
- Concatenative synthesis (1990s–2010s). Stitch recorded units from a huge corpus. More natural in short phrases; joins and sparse coverage still show.
- Statistical parametric, then neural. Learn a mapping from linguistic features (or raw text) to acoustics from paired speech+transcript data. Better coarticulation, better prosody range, new failure modes around rare words and long-form drift.
Neural TTS learns patterns from training data; that does not guarantee correct pronunciation or stable delivery on unfamiliar material. Out-of-domain jargon, mismatched recording conditions, and scripts longer than the training clips still need human oversight.
TTS is not singing generation
This distinction matters if you evaluate music tools.
| Speech TTS | Singing voice synthesis | Full-song generation | |
|---|---|---|---|
| Primary target | Intelligible, natural speech | Sung vocal performance | Melody, groove, arrangement, often lyrics-as-song |
| Timing driver | Linguistic duration + prosody | Musical meter and note durations | Musical structure across sections |
| Pitch | Speech F0 contours | Melodic pitch from a score or melody model | Melodic pitch tied to harmony and style |
| Typical input | Script or SSML-like text | Score + lyrics (inputs vary by system) | Prompts or lyrics; other inputs depend on the system |
| Failure mode | Misread text, flat prosody | Off-pitch notes, lyric misalignment | Wrong melody, chewed lyrics, style drift |
Singing voice synthesis is a separate case: lyrics and a musical score can specify a vocal performance without generating an accompaniment. Full-song generation also involves musical structure and arrangement. These are different output targets, even when systems share modeling techniques. Consumer “AI song” products are usually closer to music generation than to classical TTS.
EasyMusic generates songs from prompts or lyrics in the browser. That is a different task from generating spoken narration.
Controls that still matter in 2026
Even strong neural voices need operator tools:
- Lexicons / IPA for names and jargon, when the engine supports them.
- Style or emotion tags when the model supports them—use sparingly; stacking every adjective often reduces contrast instead of adding it.
- Stability vs expressiveness tradeoffs in sampling: higher variance sounds lively in a demo and inconsistent across a course module.
- Streaming vs batch. Measure request-to-first-audio separately from request-to-audible-playback, which includes decoding and buffering. Smaller text chunks can start playback sooner but provide less context for phrasing. Track gaps between chunks and whether generation keeps ahead of playback. For offline narration, compare pronunciation, artifacts, and chapter-level consistency alongside render time.
- Loudness and true peak. Downstream players punish overs; normalize intentionally.
Practical listening tests
When you compare engines, lock the script and change one variable:
- A paragraph with dates, currency, and abbreviations.
- A paragraph packed with homographs.
- A proper-noun stress test from your domain.
- A three-minute stretch of similar sentence length (fatigue test).
- The same paragraph in a second language you actually ship.
Score intelligibility first, then naturalness, then whether emphasis lands on the information you care about. Pretty demos on cherry-picked lines are not a pipeline review.
Closing
TTS is a handoff: text becomes a linguistic plan, the plan becomes an acoustic picture, the picture becomes pressure in air. Neural models blurred the stage boundaries without removing the failure modes. Keep normalization and pronunciation under your control, listen for prosody on long form, and do not confuse a speech engine with a song model that happens to output vocals.
If your next problem is musical—hooks, sections, sung lyrics rather than narrated prose—use a music-native workflow instead of forcing a TTS mental model onto a chorus.


