Speech and audio
TTS Acoustic Models, Alignment, Duration, and Prosody
Compare attention-based, duration-based, and latent acoustic models while handling alignment, prosody, expressiveness, and failure detection.
By the end you can
- Define tts acoustic models, alignment, duration, and prosody as an operational problem with explicit inputs, outputs, and boundaries
- Distinguish attention-based acoustic model, duration-based non-autoregressive model, and end-to-end latent model without treating them as interchangeable
- Trace the workflow from represent the linguistic sequence through validate content and control
- Evaluate tts acoustic models, alignment, duration, and prosody using text coverage and repetition error and evidence from difficult deployment slices
Example
Three attention mechanisms, one naturalness score, three different failures
Three attention mechanisms went into the same listening test and came out with the same score. Location-sensitive attention 4.31 ± 0.06. GMMv2b 4.32 ± 0.06. Dynamic convolution attention 4.31 ± 0.06, all on Lessac. About 4.3 for every one of them. Google Research published the comparison in 2020. On that evidence there is nothing to choose between the three.
Then the utterances got long. The same paper describes that test in one passage: “Now we evaluate our models on long utterances taken from two chapters of the Harry Potter novels. We use 1034 utterances that vary between 58 and 1648 characters (10 and 299 words). Google Cloud Speech-To-Text is used to produce transcripts of the resulting audio output, and we compute the character errors rate (CER) between the produced transcripts and the target transcripts.” The Tacotron 2 location-sensitive attention baseline's CER shot up at roughly 3× its maximum training length. The location-relative mechanisms held across the whole range, 58 characters to 1,648. Same voice. Same in-domain MOS of about 4.3. One of them stops delivering the text.
That is not a defect of one listening test. It is the shape of every headline naturalness number in this literature. Tacotron 2 reported a mean opinion score of 4.526 ± 0.066 in 2018, against 4.582 ± 0.053 for ground-truth recordings. Its abstract puts it this way: “Our model achieves a mean opinion score (MOS) of 4.53 comparable to a MOS of 4.58 for professionally recorded speech”. Now look at what produced that number. “We randomly selected 100 fixed examples from the test set of our internal dataset as the evaluation set.” One hundred short clips. They came from the test set of a 24.6-hour single-speaker internal US English corpus. Each was rated by at least 8 raters, on a 1-to-5 scale in 0.5-point increments.
One hundred short clips, rated one at a time, is the instrument. It cannot see a phrase dropped in the middle of a 1,648-character passage, because it was never shown one. Alignment — the running map from text to time — is what drifts there. Nothing in the audio betrays it. The wrong words are delivered as convincingly as the right ones.
- The choice underneath all of this is which acoustic model to build on: attention-based, duration-based, or latent. That one decision settles how alignment, prosody, expressiveness and failure detection will behave. Google's three mechanisms scored 4.31, 4.32 and 4.31, and did not behave alike.
- The failure that arrives first is skipped or repeated text hidden by prosody that sounds entirely natural. CER diverges by attention type while in-domain MOS sits at about 4.3 for all three.
- The evidence that catches it is text coverage and repetition error measured against the input text. Google got theirs by back-transcribing the synthesized audio with Google Cloud Speech-To-Text and scoring character error rate against the target transcripts.
- The practical response is to put the hard cases into the test set on purpose: long inputs out to 1,648 characters, and, as FastSpeech's authors did, single letters, spellings, repeated numbers and long sentences.
Case
The same fix, arrived at twice
That kind of drift is not a quirk of one release. Two groups reached the same conclusion about it from different directions. FastSpeech, published by Microsoft in 2019, threw out learned attention and put an explicit duration predictor in its place. The paper says the change “nearly eliminates the problem of word skipping and repeating in particularly hard cases”. The same design, it reports, “speeds up mel-spectrogram generation by 270x and the end-to-end speech synthesis by 38x”.
Those words are backed by a count, not by an impression. The test was 50 sentences selected to be particularly hard, scored per sentence, with each kind of word error “counted at most once per sentence”. Tacotron 2 produced 4 repeats and 11 skips across 12 error sentences — a 24% error rate. Transformer TTS produced 7 repeats and 15 skips across 17 error sentences, 34%. FastSpeech produced 0 repeats, 0 skips and 0 error sentences. Zero per cent. The duration predictor did not improve robustness at the margin. On that set it removed the failure mode.
Hard monotonic alignment was the other route to the same place. Glow-TTS enforced it a year later, out of Kakao, and measured where the trouble begins. Tracking Tacotron 2's character error rate on Harry Potter and the Philosopher’s Stone, its authors report that “the CER of Tacotron 2 starts to grow when the length of input characters exceeds about 260”. That figure explains the shape of the Google result. A 58-character utterance sits comfortably inside the safe range. A 1,648-character one does not. The aggregate MOS of 4.31 never distinguishes the two. Alignment, not vocoder quality, is what breaks first on long text.
Comparison
Where the timing comes from
FastSpeech and Glow-TTS are two answers to a single question — where does the timing come from — and there are three places to get it. An attention-based acoustic model learns a soft text–audio alignment while it generates acoustic frames. That is the arrangement whose CER shot up at roughly 3× its maximum training length in the Harry Potter chapters. A duration-based non-autoregressive model predicts token durations and generates frames in parallel. That is how FastSpeech reached 0 repeats and 0 skips on the 50 hard sentences. An end-to-end latent model jointly learns alignment, acoustic representation and waveform generation in one trained system.
The third family has its own numbers. VITS, published in 2021, scored MOS 4.43 ± 0.06 on LJ Speech against 4.46 ± 0.06 for ground truth. That put it above Glow-TTS + HiFi-GAN fine-tuned at 4.32 ± 0.07 and Tacotron 2 + HiFi-GAN at 3.77 ± 0.08. What makes it a third family rather than a tuning of the second is where its durations come from. The consequence is directly observable: “While Glow-TTS generates only fixed-length utterances due to the deterministic duration predictor, samples from our model follow a similar length distribution to that of Tacotron 2.” Swap the stochastic duration predictor for the deterministic one used in Glow-TTS and the score falls to 4.39 ± 0.06. A small MOS cost, for a system that can no longer say the same sentence two different lengths.
They are three families, not three settings of one dial, and that changes what a passing test result means. Evidence that clears one of them leaves the others untested. 0 word errors on 50 hard sentences is a FastSpeech result. 4.43 on LJ Speech is a VITS result. Neither transfers.
Attention-based acoustic model
Learns a soft text–audio alignment while generating acoustic frames.
- Decision focus: Represent the linguistic sequence
- Useful evidence: Text coverage and repetition error
- Watch for: Skipped or repeated text hidden by natural prosody
- Best used when its assumptions are documented for tts acoustic models, alignment, duration, and prosody
Duration-based non-autoregressive model
Predicts token durations and generates frames in parallel.
- Decision focus: Learn or supply alignment
- Useful evidence: Duration, pitch, and energy control accuracy
- Watch for: Style control changing pronunciation or content
- Best used when its assumptions are documented for tts acoustic models, alignment, duration, and prosody
End-to-end latent model
Jointly learns alignment, acoustic representation, and waveform generation.
- Decision focus: Predict prosodic structure
- Useful evidence: Naturalness, intelligibility, and style consistency
- Watch for: Training alignments biased by one speaking rate or language
- Best used when its assumptions are documented for tts acoustic models, alignment, duration, and prosody
Flexible alignment can skip a word, and firm timing can flatten a pitch curve
Underneath all three families the job is the same. An acoustic model transforms linguistic conditions into intermediate acoustic or latent structure, and two distinct things happen inside it. Alignment determines which text element corresponds to which time region. Duration, pitch, energy and style controls shape rhythm and prosody. The long-form baseline lost the first and kept the second. That is exactly why it kept sounding like a 4.31.
Neither of the main answers is free, and both halves of the trade have been measured. Attention learns flexible alignment and can skip or repeat text. Duration predictors provide more explicit timing but may produce flat or incorrect prosody. Flatness here is a statistic, not a complaint. FastSpeech 2, in 2021, compared the pitch of synthesized speech with the recordings. FastSpeech's synthesized pitch had a kurtosis of −0.041 where ground truth had 0.977. FastSpeech 2's own came out at 0.996. The repair was more predictors rather than fewer: “The variance adaptor aims to add variance information (e.g., duration, pitch, energy, etc.) to the phoneme hidden sequence, which can provide enough information to predict variant speech for the one-to-many mapping problem in TTS.” On LJSpeech that bought MOS 3.83 ± 0.08 against FastSpeech's 3.68 ± 0.09. Ground truth sat at 4.30 ± 0.07, and FastSpeech's CMOS was −0.885.
The other dependency is quieter and just as measurable. FastSpeech 2 takes its phoneme durations from the Montreal Forced Aligner, not from a teacher model's attention map. So the timing a duration predictor learns is only as good as that aligner. The aligner's own paper put numbers on it in 2017. On the Buckeye corpus its word boundaries differed from hand annotation by 24.1 ms on average, against 26 ms reported inter-transcriber reliability. Its phone boundaries differed by 17.0 ms — identical to the 17 ms reported for human agreement. The averages are the flattering part. “While phone and word-level alignment is comparable to human annotators on average, the force-aligned boundaries do contain more medium-to-large alignment errors (>25 msec).” Only 68% of its differences fell under 25 ms, against 90% inter-transcriber agreement at a 26 ms tolerance. And 2–5% of tokens were off by at least 100 ms. So weigh the three families — attention, duration prediction, end-to-end latent — against the timing the product needs. Do it before the architecture is fixed.
A skipped word and a flat rhythm are different failures — 0 repeats and 0 skips on the 50 hard sentences, bought at a pitch kurtosis of −0.041 against ground truth's 0.977 — and the architecture is where you decide which one you get.
Visual
Check the text came out whole
Whichever family you pick, the work runs in four stages. Only the last of them can tell you the first three were wrong. Representing the linguistic sequence comes first — encoding phones, text, language, speaker and style conditions. It fixes the assumptions everything downstream inherits. Learning or supplying alignment then works from those assumptions without questioning them, whether through attention, monotonic alignment, forced durations from the Montreal Forced Aligner, or latent variables. Predicting prosodic structure estimates duration, pitch, energy, rhythm and spectral representation on top of that. Validating content and control is the stage that finds out whether any of it held: coverage, repetitions, timing, style consistency, long-form behaviour.
That is the stage an in-domain listening panel never really runs. The three Google mechanisms passed the panel identically at about 4.3. They were told apart only when 1,034 book utterances were back-transcribed and scored. A naturalness score is not the fourth stage. Character error rate against the target transcript is.
Represent the linguistic sequence
Encode phones, text, language, speaker, and style conditions.
Learn or supply alignment
Use attention, monotonic alignment, forced durations, or latent variables.
Predict prosodic structure
Estimate duration, pitch, energy, rhythm, and spectral representation.
Validate content and control
Check coverage, repetitions, timing, style consistency, and long-form behavior.
Validation of content and control tests the speech against the linguistic representation you chose, not against the text you started from.
Example
Four words for placing speech in time
That argument has been carried by four terms, and in a review meeting they blur together. They are not interchangeable. Each implies a different measurement, and a different owner when the timing goes wrong.
- Alignment is the correspondence between linguistic tokens and acoustic time. It drifted in the location-sensitive attention baseline once the input passed roughly 3× its maximum training length. Glow-TTS pinned the onset to about 260 input characters for Tacotron 2.
- A duration predictor estimates how long each input token should last. FastSpeech put one in place of the learned attention map. FastSpeech 2 trains its own on phoneme durations from the Montreal Forced Aligner — whose word boundaries sit 24.1 ms from hand annotation on average, and off by at least 100 ms on 2–5% of tokens.
- Prosody is timing, pitch, energy, rhythm, phrasing and emphasis. It is measurable as pitch kurtosis: −0.041 for FastSpeech, 0.977 for ground truth, 0.996 for FastSpeech 2. It is measurable too as the 23 of 100 sentences Tacotron 2's own authors marked unnatural.
- An autoregressive acoustic model generates acoustic frames sequentially, each one conditioned on the outputs it has already produced. A duration-based non-autoregressive model abandons that and generates frames in parallel. That is how FastSpeech could report a 38x end-to-end speedup.
Analogy
A conductor assigning beats to a written score
The split between the words and their placement in time has an older form. A conductor decides how long each note and phrase occupies in a performance, which is the job alignment does in synthesis. A beautiful orchestra can still skip a bar if the timing map is wrong. That is the Harry Potter result precisely: the same voice, the same in-domain 4.31, and a character error rate that climbs once the passage runs past what the ensemble ever rehearsed.
The comparison breaks in one place worth naming. The conductor works from a score that fixes the notation. Speech duration and prosody are learned instead — from language and speaker data, and from a forced aligner whose own boundaries land 24.1 ms from a human annotator's. They can therefore go wrong in ways no score would permit.
Content coverage and prosody must be evaluated as separate dimensions.
Example
Each product wants different timing
Long-form narration is only one of the demands a synthesizer gets asked to meet. The other three want the timing to behave differently. What follows is narrow but firm. A coverage result earned on 1,034 book utterances is not a result for a conversational agent, and a latency result is not a result for a book. Each of the four wants its own units and its own demonstration. The studies this lesson is built on supply them.
- Long-form narration is where this lesson started. What matters there is stability and paragraph prosody across inputs of 58 to 1,648 characters — the two things 100 short clips rated at 4.526 ± 0.066 cannot show.
- Assistive speech leans on explicit duration and emphasis controls, because what is being sold is intelligibility. That is the case FastSpeech 2's variance adaptor was built for: duration, pitch and energy predictors rather than one timing model.
- Conversational agents run under low latency and get interrupted, which forces synthesis to work incrementally. That is the axis on which FastSpeech's parallel generation claimed 270x on mel-spectrograms and 38x end to end.
- Voice localization needs native evaluation, since rhythm and pronunciation are specific to the language being spoken. The alignment targets underneath were measured on one corpus in one language: 24.1 ms on Buckeye.
Example
One skipped word and twenty-three flat ones, under a single 4.354
Since those four products ask different questions, no single number closes a release. The number most releases lean on says as much in its own defining document. Mean opinion score is specified by ITU-T Recommendation P.800, approved in 1996 and still in force: “The quantity evaluated from the scores (mean listening-quality opinion score, or simply mean opinion score) is represented by the symbol MOS.” Its Absolute Category Rating listening-quality scale runs Excellent 5, Good 4, Fair 3, Poor 2, Bad 1. And the material it was written for is named exactly: “Category ratings are applied to short groups of unrelated sentences, each of which has been passed through a number of standard processes as well as the processes under test.” Short groups of unrelated sentences. Long-form content integrity is not something the instrument fails to detect by accident. It is outside what the instrument was ever built to measure.
The two dimensions come apart most clearly in a paper counting its own errors. On a separate 100-sentence custom test set, the Tacotron 2 authors went through the output by hand: “In a manual analysis of the error modes of our system, counting errors in each category independently, 0 sentences contained repeated words, 6 contained mispronunciations, 1 contained skipped words, and 23 were subjectively decided to contain unnatural prosody, such as emphasis on the wrong syllables or words, or unnatural pitch.” One skipped word. Twenty-three unnatural ones. The same system scored a MOS of 4.354 on that set. That single figure covers both columns without distinguishing them. The same section records where the remaining failure sat: “End-point prediction failed in a single case, on the input sentence containing the most characters.”
So text coverage and repetition error is the number that catches a dropped phrase. Duration, pitch and energy control accuracy is the number that catches a wooden reading. That is the failure FastSpeech traded for stable alignment, and the one FastSpeech 2 measured as a pitch kurtosis of −0.041 against 0.977. Two dimensions, not two views of one. Around them sit the difficult slices and long-form stability across languages and speakers. That is what turns a 4.31 shared by three mechanisms into a comparison that actually separates them.
- Begin with text coverage and repetition error: did every word arrive, and did any word arrive twice. Google measured it as CER against the target transcripts. FastSpeech's authors counted it per sentence, at most once per error kind, over 50 hard sentences.
- For system behaviour, measure duration, pitch and energy control accuracy — whether the controls you exposed do what they claim. FastSpeech 2 reported it as pitch statistics against the recordings (kurtosis 0.996 versus ground truth's 0.977) alongside MOS 3.83 ± 0.08.
- For the robustness slice, measure naturalness, intelligibility and style consistency on the awkward inputs rather than the flattering ones: 1,648-character passages, not the 100 short clips a P.800 listening test is specified to use.
- For lifecycle evidence, track long-form stability and controllability across languages and speakers. The Tacotron 2 hand count shows why: 1 skipped word and 23 unnatural-prosody sentences hiding inside one MOS of 4.354.
Report text coverage and repetition error together with long-form stability and controllability across languages and speakers.
Steps
Diagnose a TTS alignment failure
Diagnosis here means producing an account another team can check against the audio, phrase by phrase, for text that was skipped or said twice. The first step is not a matter of taste. It has a published protocol, with a size, a composition and results for three systems: “To evaluate the robustness of FastSpeech, we select 50 sentences which are particularly hard for TTS system.” All 50 are listed in an appendix, and a footnote says what they are: “These cases include single letters, spellings, repeated numbers, and long sentences.” Scored per sentence, with each kind of word error counted at most once, that set returned 12 error sentences for Tacotron 2 (24%), 17 for Transformer TTS (34%) and 0 for FastSpeech.
So build the stress set to that recipe: single letters, spellings, repeated numbers, long clauses, rare names, dense punctuation, code-switching. Then add the length axis from the Harry Potter test, out to 1,648 characters. Inspect alignment maps or predicted durations for stalls, jumps, excessive compression and repeated regions. Compare model families with voice data and vocoder held fixed where possible — an in-domain MOS of about 4.3 was identical across all three mechanisms and told you nothing. Then add content checks. Back-transcribe with an ASR system, as Google did with Google Cloud Speech-To-Text, and score coverage against the target text. Verify the critical tokens by hand. That is how Tacotron 2's authors arrived at 0 repeats, 1 skip, 6 mispronunciations and 23 prosody failures rather than at a single number.
1. Create stress sentences
Use repeated words, long clauses, rare names, punctuation, and code-switching.
2. Inspect alignment or durations
Look for stalls, jumps, excessive compression, and repeated regions.
3. Compare model families
Hold voice data and vocoder fixed where possible.
4. Add content checks
Use ASR back-transcription, text coverage, and critical-token verification cautiously.
Back-transcription and coverage checks show where words were skipped or doubled, but read them cautiously: a diagnosis only holds up if it names the critical tokens someone verified against the audio, the way a hand count of 100 sentences names 1 skipped word and 23 unnatural ones.
Key takeaways
- A high naturalness score is not evidence of long-form integrity. Three attention mechanisms scored an equivalent in-domain MOS of about 4.3 — 4.31 ± 0.06, 4.32 ± 0.06 and 4.31 ± 0.06 on Lessac. They diverged only when 1,034 book utterances of 58 to 1,648 characters were back-transcribed and scored for character error rate.
- Alignment, not vocoder quality, is what breaks first on long text. The Tacotron 2 location-sensitive baseline's CER shot up at roughly 3× its maximum training length, and Glow-TTS's authors report that “the CER of Tacotron 2 starts to grow when the length of input characters exceeds about 260”.
- Attention buys flexible alignment at the price of skipped and repeated words: 4 repeats, 11 skips and 12 error sentences on FastSpeech's 50 hard sentences, against 0/0/0 for FastSpeech itself. An explicit duration predictor buys firmer timing at the price of prosody that can come out flat, measured as a pitch kurtosis of −0.041 against ground truth's 0.977.
- Choosing among attention-based, duration-based and end-to-end latent acoustic models is a decision about which failure you will live with. Evidence that clears one family leaves the others untested. VITS scored 4.43 ± 0.06 on LJ Speech, and lost varied utterance lengths the moment its stochastic duration predictor was swapped for a deterministic one.
- Acoustic modelling runs from a linguistic sequence representation through alignment and prosody prediction to a check that every word arrived. That last stage is the only one that can tell you the first three were wrong. Its targets are themselves imperfect: the Montreal Forced Aligner's word boundaries sit 24.1 ms from hand annotation on average, with 2–5% of tokens off by at least 100 ms.
- MOS was specified by ITU-T P.800 for “short groups of unrelated sentences”, so report text coverage and repetition error together with long-form stability and controllability across languages and speakers: 1 skipped word and 23 unnatural-prosody sentences both hid inside a single MOS of 4.354.