Speech and audio
Neural Vocoders and End-to-End Speech Synthesis
Explain autoregressive, adversarial, flow, and diffusion vocoders plus joint end-to-end synthesis and deployment tradeoffs.
By the end you can
- Define neural vocoders and end-to-end speech synthesis as an operational problem with explicit inputs, outputs, and boundaries
- Distinguish autoregressive vocoder, adversarial parallel vocoder, and flow or diffusion vocoder without treating them as interchangeable
- Trace the workflow from define the conditioning interface through evaluate the waveform
- Evaluate neural vocoders and end-to-end speech synthesis using naturalness and artifact-specific listening tests and evidence from difficult deployment slices
A vocoder cannot repair the alignment
A neural vocoder turns acoustic or latent conditioning into a waveform. Mel spectrograms are one such conditioning. The architectures on offer trade against each other in familiar ways: autoregressive fidelity, parallel speed, adversarial sharpness, invertibility, diffusion quality, hardware efficiency. Choosing between them is a real decision. It is not the decision that determines whether the audio is any good.
No vocoder repairs missing linguistic content or an incorrect alignment. Both arrive broken and leave broken. What a vocoder does add, on its own account, is periodic noise, buzzy harmonics, phase artifacts, speaker changes, and outright failure on conditioning outside its training range. So the constraint is not how sophisticated the vocoder is. It is whether the conditioning interface preserves what the waveform stage will be judged on. A listening test can only report what that interface allowed through.
That constraint is not a metaphor. It has a price, and the paper that defined the modern mel-conditioned pipeline paid it in public. In 2018 Tacotron 2 took a WaveNet vocoder trained on ground-truth mel spectrograms and made it synthesize from predicted ones. It scored 4.362 MOS. The same vocoder, trained on the features it would actually receive, scored 4.526. The number is in the paper. Where the number came from is what a naturalness test would never have told you.
Trading one vocoder design for another changes which artifacts you inherit, but never buys back content the conditioning failed to carry.
Visual
Train on what the acoustic model produces
A single naturalness score is a poor instrument for diagnosis. It reports what got through and nothing about what did not. Fidelity, speed and hardware efficiency are not traded once and for all. They are traded inside four choices: measurement, modeling, decision, verification. One number folds all four into a verdict, with no way of saying which of them went wrong. The path below separates them. Define the conditioning interface: feature scale, frame rate, normalization, speaker and style signals. Select a generator family: autoregressive, GAN, flow, diffusion, integrated latent synthesis. Train with matched data. Then evaluate the waveform for fidelity, naturalness, artifacts, latency, robustness and downstream intelligibility.
The choice that decides the rest is the first one, and the first one is what the vocoder is trained on. Three rows of one table make the whole argument. A WaveNet vocoder trained on ground-truth mel spectrograms and made to synthesize from predicted ones scored MOS 4.362 +/- 0.066. Trained on the predicted features it would actually receive, it scored 4.526 +/- 0.066. Fully matched on ground truth, 4.522 +/- 0.055. The two matched conditions sit together. The mismatched one is the outlier. That is what step three means in practice. Align acoustic-model outputs and natural conditioning, so that the other three choices are at least being made about the system you intend to ship.
1. Define the conditioning interface
Specify feature scale, frame rate, normalization, speaker and style signals.
2. Select a generator family
Compare autoregressive, GAN, flow, diffusion, and integrated latent synthesis.
3. Train with matched data
Align acoustic-model outputs and natural conditioning to reduce mismatch.
4. Evaluate the waveform
Test fidelity, naturalness, artifacts, latency, robustness, and downstream intelligibility.
Waveform evaluation happens downstream of the conditioning interface, so a mismatched interface shows up as poor audio with nothing pointing at the cause.
Example
37 news headlines and a virtual tie
Failure on conditioning outside the training range sounds like a footnote until you meet one in print. Tacotron 2 was evaluated on 37 news headlines drawn from outside the training domain. It scored MOS 4.148 +/- 0.124. A WaveNet conditioned on linguistic features scored 4.137 +/- 0.128. A virtual tie. In the main evaluation of the same paper that comparison had not been close at all: 4.526 +/- 0.066 against 4.341 +/- 0.051. The margin did not shrink because the vocoder got worse. It shrank because the material moved outside what the system had been trained to cover. Rater comments said where. Although the neural system sounded more natural, it ran into pronunciation difficulties on names.
The authors drew the conclusion themselves rather than leaving it to a reader: “This result points to a challenge for end-to-end approaches – they require training on data that cover intended usage.”
Nothing in a headline MOS of 4.148 says so on its own. A listening test run on material inside the training range cannot show a reviewer that the range was ever the question. Every sentence played was inside it. The rest of this lesson is about that gap: between a system that scores well on everything anyone thought to play it, and a system that works.
- The ground here is the whole span of waveform generation: autoregressive, adversarial, flow and diffusion vocoders, joint end-to-end synthesis, and the deployment tradeoffs that decide between them.
- The failure running underneath all of it is training only on ground-truth features and then deploying on predicted ones. It is the same shape of mismatch as a system evaluated on 37 out-of-domain headlines it was never trained to cover.
- The evidence normally asked for is naturalness and artifact-specific listening tests. On the out-of-domain set those returned 4.148 +/- 0.124: a high score, and silent about names.
- The practical response is to train on natural features and acoustic-model predictions together. Where the deployment range genuinely cannot be enumerated, build for that instead of hoping. BigVGAN did, in 2023: 112M parameters, anti-aliased periodic activations, trained only on clean speech (LibriTTS), and evaluated zero-shot on unseen speakers, unseen languages, unseen recording environments, singing voices, music and instrumental audio.
Case
One sample at a time, then 20 times real time, then 167.9
The menu of architectures in the first section exists for a reason, and the reason is arithmetic before it is engineering. WaveNet, in 2016, modelled raw waveforms one sample at a time. Wideband audio runs at least 16,000 samples a second. Every sample waits for the one before it.
The middle of that story is usually skipped. It is the part where the bottleneck was actually broken. Parallel WaveNet, in 2018, used Probability Density Distillation to train a parallel feed-forward network. Its abstract: “The resulting system is capable of generating high-fidelity speech samples at more than 20 times faster than real-time, a 1000x speed up relative to the original WaveNet, and capable of serving multiple English and Japanese voices in a production setting.” HiFi-GAN followed in 2020, reporting 22.05 kHz audio 167.9 times faster than real time on a single V100 GPU. One sample at a time, then more than 20 times real time, then 167.9. That distance is why adversarial and parallel vocoders exist at all.
It is also a distance measured along exactly one axis. Four years separate the first and last of those results. No figure among them says anything about what a vocoder does with conditioning it never heard in training. Nor, as the next sections show, does any of them mean much until you know which machine it was measured on.
Example
Three conversations arriving in one sentence
Setting 167.9 times real time beside a virtual tie on 37 news headlines, as the last two sections just did, is ordinary practice and slightly dishonest. Those numbers come from different conversations. Vocoder, conditioning mismatch, adversarial loss and real-time factor belong to modelling, training and operations. They still end up in one sentence. Each carries its own evidence, its own unit, and its own owner. A claim settled in one of these conversations is not settled in the other two.
- A vocoder is the model or algorithm that synthesizes waveform audio from acoustic parameters or latent features — the stage everything else in this lesson sits upstream of.
- A conditioning mismatch is the difference between the conditioning a model saw in training and the predictions it is handed in deployment. Ground-truth mel spectrograms in training, predicted ones at synthesis: that is the version Tacotron 2 measured, at 4.362 MOS against 4.526.
- An adversarial loss is an objective built on discriminators that try to tell real audio from generated audio. It is where the adversarial sharpness listed at the start comes from. In BigVGAN it is also where anti-aliased periodic activations were added, against periodic and buzzy artifacts.
- A real-time factor is generation time divided by output audio duration. That unit is what makes 167.9 times faster than real time a claim about operations, on one named machine, and about nothing else.
Example
What constrains the waveform generator
Owners change with deployment too. Cloud TTS, on-device synthesis, voice conversion, and singing constrain the waveform generator in four incompatible ways. A generator that satisfies one of them can be the wrong choice for the next. Each is scored in units the out-of-domain headline test never touched, and what would prove any of them is not what would have caught that failure.
- In cloud TTS, parallel vocoders are what make high throughput possible while quality controls stay in place. Parallel WaveNet ran there. Its preprint states that the system “is deployed online by Google Assistant, including serving multiple English and Japanese voices”.
- On a device, compute, memory and energy settle the architecture before anything about audio quality gets a vote. LPCNet named the budget in 2019: total complexity around 2.8 GFLOPS for 16 kHz wideband synthesis, against roughly 16 GFLOPS for FFTNet and about 10 GFLOPS for the sparse mobile WaveRNN by the authors' own estimate. That buys ordinary hardware: “Real-time synthesis can be achieved on a single core of an Apple A8 (iPhone 6) or with 20% of a 2.4 GHz Intel Broadwell core.”
- Inside a voice conversion system, the vocoder has to preserve the converted speaker and the content conditions it was handed. That is a different requirement from sounding natural.
- Music and singing bring wider pitch and dynamic ranges. They stress speech-trained generators with conditioning the model was never built for. That is why BigVGAN made the list its evaluation protocol: “Our BigVGAN, trained only on clean speech (LibriTTS), achieves the state-of-the-art performance for various zero-shot (out-of-distribution) conditions, including unseen speakers, languages, recording environments, singing voices, music, and instrumental audio.”
Steps
Run a vocoder mismatch test
Whichever of those four settings you are in, one test applies. It exists so that another team can check whether the vocoder was only ever trained on features it will not receive in production. Prepare two conditioning sets, natural features and acoustic-model predictions, and run them side by side. That pairing is the mismatch table from the second section, turned into a procedure. Then test the difficult regimes. BigVGAN's out-of-distribution list is a ready-made one: unseen speakers, unseen languages, unseen recording environments, singing voices, music and instrumental audio. Names inside ordinary sentences belong on it too. Names are what the 37 headlines broke on. Then profile hardware, batch and streaming, on the target device, because 167.9 and 1.43 are the same model. Then catalogue artifacts: named examples of buzzing, dropouts, metallic tones, and instability.
Record three things as you go. What defining the conditioning interface assumes — which features, from which model, in which regimes. One counterexample. And what evaluating the waveform triggers once that counterexample has been played. The three notes matter more than the score attached to them. The score is the thing that failed to notice last time.
1. Prepare two conditioning sets
Use natural features and acoustic-model predictions.
2. Test difficult regimes
Include whisper, singing, emotion, low pitch, high pitch, and long silence.
3. Profile hardware
Measure batch and streaming behavior on target devices.
4. Catalogue artifacts
Create named examples of buzzing, dropouts, metallic tones, and instability.
Until you can point to a named example of buzzing, a dropout, a metallic tone, or instability, the mismatch test has told you nothing.
Example
Eight listeners, 0.50 agreement, and a machine you have to name
That is the honest reading of a naturalness score. Naturalness and artifact-specific listening tests will not, on their own, reveal that a vocoder was trained on one kind of feature and deployed on another. On 37 out-of-domain headlines the score stayed at 4.148 +/- 0.124 while the pronunciation of names fell apart. They belong in the report. They cannot be the whole of it.
So report the unit of each score and who listened. The BVCC listening-test dataset, reported in 2021, shows what that looks like when it is done properly: 187 systems including natural speech, 38 samples per system, a 5-grade MOS scale, and a stated listener design. “Each set was rated by eight different listeners, and overall, 304 different listeners participated in our test.” The agreement among those listeners was only moderate. Krippendorff's alpha and intra-class correlation both came to 0.50. That is how much weight one naturalness number can carry.
The operational side has the same discipline. HiFi-GAN's own abstract demonstrates it by quoting two speeds at once: “A subjective human evaluation (mean opinion score, MOS) of a single speaker dataset indicates that our proposed method demonstrates similarity to human quality while generating 22.05 kHz high-fidelity audio 167.9 times faster than real-time on a single V100 GPU. We further show the generality of HiFi-GAN to the mel-spectrogram inversion of unseen speakers and end-to-end speech synthesis. Finally, a small footprint version of HiFi-GAN generates samples 13.4 times faster than real-time on CPU with comparable quality to an autoregressive counterpart.” The paper's own table separates what the abstract merges. HiFi-GAN V1 runs at x167.86 on a V100 GPU. The same model runs at x1.43 on CPU, a MacBook Pro with an Intel i7 at 2.6 GHz. The small V3 runs at x13.44 on that CPU and x1,186.80 on the same GPU. For one fixed model, the machine alone moves the real-time factor by roughly a factor of 117.
- For the core task, the evidence is naturalness and artifact-specific listening tests — reported the way BVCC reports them, with the scale, the samples per system, the listeners per set, and the agreement among them.
- For how the system behaves in service, it is real-time factor, first-audio latency, throughput, and energy, each with its machine named. x167.86 and x1.43 are the same model, and a real-time factor with no hardware beside it is not yet a measurement.
- The robustness slice is spectral, pitch, and phase diagnostics. That is where conditioning the model never trained on leaves a mark, before any listener calls the audio unnatural.
- Over the system's working life, the evidence is content intelligibility and speaker-preservation tests — the pair that asks whether the words and the voice survived the waveform stage, and the pair that would have caught names before the headline set did.
Report naturalness and artifact-specific listening tests together with content intelligibility and speaker-preservation tests.
Key idea
Ground-truth features in training, predictions in production
Four shortcuts produce most of this, and every one of them is standard practice somewhere in vocoder and synthesis pipelines. That is exactly why they are expensive. Training only on ground-truth features and deploying on predicted features. Adversarial artifacts that average listeners never notice. Benchmarking throughput without end-to-end streaming latency. A shared vocoder shifting voice identity or accent unevenly.
The first one is the only one in this lesson with both a measured price and a printed explanation of the mechanism, and they come from the same section of the same paper: “However, when trained on ground truth features and made to synthesize from predicted features, the result is worse than the opposite. This is due to the tendency of the predicted spectrograms to be oversmoothed and less detailed than the ground truth – a consequence of the squared error loss optimized by the feature prediction network. When trained on ground truth spectrograms, the network does not learn to generate high quality speech waveforms from oversmoothed features.” The price is 4.362 +/- 0.066 against 4.526 +/- 0.066 in the same table, paid for training on data that was cleaner than production.
Each of the other three quietly assumes the waveform stage will absorb damage it has no access to. The middle two are the speed record read carelessly. One is an adversarial generator judged by average listeners, whose agreement ran to 0.50 on the one large test where it was measured. The other is a throughput figure quoted with no streaming latency and no machine around it, the difference between x167.86 and x1.43. The fourth is the speaker change from the opening list of artifacts, arriving as somebody's accent. And the artifacts a vocoder contributes on its own account, the ones named at the start, are precisely what ground-truth-only training and average-listener testing are worst at surfacing.
A vocoder that has only ever seen ground-truth features will meet every quality target in the lab and then meet predicted features for the first time in production.
Key takeaways
- Tacotron 2 measured the mismatch instead of asserting it. A WaveNet vocoder trained on ground-truth mel spectrograms and made to synthesize from predicted ones scored MOS 4.362 +/- 0.066. Trained on the predicted features it would actually receive: 4.526 +/- 0.066. Fully matched on ground truth: 4.522 +/- 0.055. The gap is what training on data cleaner than production costs.
- A vocoder can only be as good as what reaches it. Fix what the conditioning interface has to carry first, then judge the waveform it allowed through, because missing linguistic content and incorrect alignment arrive broken and leave broken.
- On 37 out-of-domain news headlines Tacotron 2 scored 4.148 +/- 0.124. A linguistic-feature WaveNet scored 4.137 +/- 0.128. A virtual tie, where the main evaluation had given 4.526 +/- 0.066 against 4.341 +/- 0.051. Rater comments pointed at pronunciation difficulties on names. The authors' own conclusion was that “they require training on data that cover intended usage”.
- Autoregressive, adversarial parallel, and flow or diffusion vocoders answer related but different questions, so a result from one of them settles nothing about the other two.
- WaveNet modelled raw waveforms one sample at a time in 2016. Parallel WaveNet reported more than 20 times faster than real time in 2018, a 1000x speed up, serving multiple English and Japanese voices in production. HiFi-GAN reported 22.05 kHz audio 167.9 times faster than real time on a single V100 in 2020. Four years of progress along one axis, none of it about conditioning the model never heard.
- State the machine and the listeners, or the number means nothing. HiFi-GAN V1 runs at x167.86 on a V100 GPU and x1.43 on a MacBook Pro CPU, roughly a factor of 117 for one fixed model. BVCC's 304 listeners, eight per set, agreed only to Krippendorff's alpha and intra-class correlation of 0.50.