# Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions

Tacotron 2 synthesizes natural speech by conditioning WaveNet on mel spectrograms

Jonathan Shen, Ruoming Pang, Ron J. Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang and 7 more · arXiv · 2017-12-16

- **Problem** Neural speech synthesis still needed hand-built linguistic and duration features to drive WaveNet. Tacotron's Griffin-Lim vocoder also produced lower audio quality than WaveNet.
- **Method** Tacotron 2 maps characters to mel spectrograms with a sequence-to-sequence network. A WaveNet vocoder then turns those spectrograms into waveforms, so both stages are learned from text and audio.
- **Results** Tacotron 2 reached a MOS of 4.526 ± 0.066, close to 4.582 ± 0.053 for ground truth audio.

## Why the linguistic front end is the bottleneck

Text-to-speech has long been built from a chain of separately engineered stages, and the work asks how far that chain can be replaced by learned components. Concatenative synthesis stitches pre-recorded units together and led for years, while statistical parametric synthesis generates smooth feature trajectories for a vocoder, yet its output often sounds muffled.

WaveNet produces audio close to human speech, but it is fed linguistic features, predicted log F0 and phoneme durations, which require a text-analysis system and a pronunciation lexicon.

Tacotron removes that front end by mapping characters to spectrograms with one network trained from data, but it turns those spectrograms into audio with Griffin-Lim phase estimation followed by an inverse STFT. The authors present Griffin-Lim as a stand-in for a future neural vocoder, since it introduces characteristic artifacts and lower quality than WaveNet.

The present system keeps the character-to-spectrogram idea and swaps in a WaveNet vocoder, so both stages are neural and the whole chain is trained from characters and waveforms.

## Mel spectrograms as the intermediate representation

The two networks meet at a mel-frequency spectrogram, which is a short-time Fourier transform magnitude whose frequency axis is warped nonlinearly to follow auditory response. Because it is computed directly from the waveform, the two networks can be trained separately, and because it ignores phase within each frame it is smoother than raw samples and suits a squared-error loss.

The warping gives finer resolution to low frequencies, which carry most of the intelligibility, and compresses high frequencies dominated by fricatives and noise bursts. A mel spectrogram discards more information than a linear one, so inverting it is a harder problem, but the authors argue that it is a simpler, lower-level representation than linguistic features, so a WaveNet conditioned on it should act as a neural vocoder.

The STFT uses a 50 ms frame, a 12.5 ms hop and a Hann window, and the magnitude is mapped to 80 mel channels spanning 125 Hz to 7.6 kHz before log compression. Magnitudes are clipped to a minimum of 0.01 before log compression, which limits the dynamic range in the log domain. A 5 ms hop matched the conditioning rate of the original WaveNet, but the finer temporal resolution caused noticeably more pronunciation issues in the authors' experiments.

## How the spectrogram prediction network decodes characters

Characters are embedded as learned 512-dimensional vectors and pass through three convolution layers of 512 filters with shape 5 × 1, each followed by batch normalization and ReLU, so each filter spans five characters. A single bidirectional LSTM with 512 units, 256 in each direction, produces the encoded features.

An attention network condenses the encoded sequence into one context vector per decoder step, using location-sensitive attention, which adds the cumulative attention weights from earlier decoder steps as an extra feature. That extra feature pushes the alignment to move forward through the input, which the authors present as a way to avoid repeated or skipped subsequences.

Attention probabilities are computed after projecting inputs and location features to 128 dimensions, and the location features come from 32 one-dimensional convolution filters of length 31.

The decoder is autoregressive and predicts one mel frame per step, passing its previous frame through a pre-net of two fully connected layers with 256 ReLU units. The authors found the pre-net, acting as an information bottleneck, essential for learning attention. Pre-net output and the context vector go through two unidirectional LSTM layers with 1024 units and a linear projection to the frame, and a five-layer post-net then predicts a residual that is added to the frame.

The post-net layers each have 512 filters with shape 5 × 1 and batch normalization, with tanh activations on all but the final layer. The summed mean squared error is taken before and after the post-net to aid convergence, and a mixture density network with log-likelihood loss was harder to train and did not produce better sounding samples in the authors' experiments.

A separate sigmoid output predicts the probability that the sequence has ended, and inference stops at the first frame where that probability exceeds 0.5.

Convolutional layers use dropout with probability 0.5 and LSTM layers use zoneout with probability 0.1, and dropout at inference is restricted to the decoder pre-net to vary the output. Compared with the original Tacotron, the design uses vanilla LSTM and convolutional layers instead of CBHG stacks and GRU layers, and each decoder step produces a single frame with no reduction factor.

## WaveNet vocoder conditioned on mel frames

The vocoder keeps the original WaveNet stack of 30 dilated convolution layers grouped into 3 dilation cycles. Because the spectrogram frames are spaced 12.5 ms apart, the conditioning stack uses 2 upsampling layers instead of 3.

Instead of a softmax over discrete buckets, the output is a mixture of 10 logistic distributions that generates 16-bit samples at 24 kHz.

Waveform targets are multiplied by 127.5, which brings the initial mixture outputs closer to the eventual distributions and speeds up convergence.

## Two-stage training and inference

The feature prediction network is trained first, on its own, by maximum likelihood with teacher forcing, so the decoder receives the correct previous output rather than its own prediction. That stage uses a batch size of 64 on a single GPU, Adam with β1 = 0.9, β2 = 0.999 and ϵ = 10−6, a learning rate of 10−3 that decays exponentially to 10−5 after 50,000 iterations, and L2 regularization with weight 10−6.

That stage uses a batch size of 128 across 32 GPUs with synchronous updates, Adam with ϵ = 10−8, a fixed learning rate of 10−4, and an exponentially weighted moving average of the parameters with decay 0.9999 that is used for inference.

At inference the ground truth is unavailable, so the decoder consumes its own previous predictions, which differs from the teacher-forced training setup. All models are trained on an internal US English dataset of 24.6 hours from one professional female speaker, with all text spelled out so that training uses normalized text.

## MOS against the baseline systems

The evaluation uses 100 randomly selected examples from the test set of the internal dataset, and each sample is judged by at least 8 raters on a 1 to 5 scale in 0.5 point steps. Outputs of different systems are rated independently, so the scores are not direct pairwise judgments.

Tacotron 2 reached 4.526 ± 0.066, close to the 4.582 ± 0.053 of ground truth audio. The linguistic-feature WaveNet scored 4.341 ± 0.051, the concatenative system 4.166 ± 0.091, Tacotron with Griffin-Lim 4.001 ± 0.087 and the parametric system 3.492 ± 0.096. The intervals are 95% confidence intervals computed from the t-distribution.

The linguistic-feature WaveNet baseline uses similar modifications to the WaveNet architecture, so the comparison isolates the effect of mel conditioning. The evaluation examples share recurring patterns and common words with the training set, which the authors note could inflate MOS, though all compared systems were trained on the same data and the relative comparisons are kept.

## The remaining gap to ground truth

In the side-by-side evaluation, raters scored each pair on a scale from -3 (much worse than ground truth) to 3 (much better), using 800 ratings on 100 items. The mean score is −0.270 ± 0.155, a small but statistically significant preference for ground truth.

Rater comments name occasional mispronunciation as the main reason for the preference. On a custom 100-sentence test set from Appendix E of \[11\], the system obtained a MOS of 4.354. In a manual error analysis each category was counted separately: 0 sentences had repeated words, 6 had mispronunciations, 1 had skipped words and 23 had unnatural prosody, such as wrong emphasis or unnatural pitch.

End-point prediction failed in one case, on the input with the most characters.

The authors read the error counts as evidence that the system attends reliably to the whole input, while prosody modeling still has room to improve.

## Generalization to news headlines

In a side-by-side comparison the preference toward the neural system was 0.142 ± 0.338, which the authors describe as a virtual tie, since it is statistically insignificant.

The authors conclude that end-to-end approaches need training data that cover the intended usage.

## Training WaveNet on predicted or ground truth features

The table crosses the mel source used to train WaveNet with the source used at synthesis. Training and synthesizing on predicted features gives 4.526 ± 0.066, and training on ground truth with predicted synthesis gives 4.362 ± 0.066.

Matching the training and synthesis features gives the best result, but training on ground truth and synthesizing from predicted features is worse than the reverse pairing. The authors attribute this to predicted spectrograms being oversmoothed and less detailed than ground truth, a consequence of the squared error loss in the feature prediction network.

A WaveNet trained only on ground truth spectrograms does not learn to produce high quality waveforms from such oversmoothed features.

## Linear versus mel conditioning

Three systems are compared: Tacotron 2 with linear spectrograms and Griffin-Lim scored 3.944 ± 0.091, linear spectrograms with WaveNet scored 4.510 ± 0.054, and mel spectrograms with WaveNet scored 4.526 ± 0.066. The linear variant uses 1,025-dimensional spectrograms and the mel variant uses 80-dimensional spectrograms as conditioning input.

Replacing Griffin-Lim with WaveNet accounts for most of the quality gain, and the authors find little difference between linear and mel conditioning. The authors choose mel spectrograms because they are a more compact representation, and they leave the trade-off between the number of mel bins and audio quality for future work.

## Whether the post-net is still needed

The decoder cannot use future frames before they are decoded, so a convolutional post-net is applied after decoding to use past and future frames when refining the predictions. Because WaveNet already has convolutional layers, the authors compared the model with and without the post-net.

Without the post-net the MOS is 4.429 ± 0.071, against 4.526 ± 0.066 with it. The authors conclude that the post-net remains an important part of the design.

## How small the WaveNet can be

Dilated convolutions enlarge the receptive field exponentially with depth, but the authors test whether a shallow stack with a small receptive field is enough, since mel spectrograms already carry the longer-term structure across frames. The baseline has 30 layers in 3 cycles and a receptive field of 6,139 samples, or 255.8 ms.

A 12-layer model in 2 cycles, with a receptive field of 253 samples, or 10.5 ms, reaches 4.481 ± 0.059. A 24-layer model in 4 cycles with a receptive field of 505 samples, or 21.0 ms, reaches 4.547 ± 0.056, slightly above the baseline's 4.526 ± 0.066.

Removing dilated convolutions leaves a 30-layer stack with a receptive field of 61 samples, or 2.5 ms, which drops to 3.930 ± 0.076 despite the same depth as the baseline. The authors conclude that the model needs enough context at the scale of waveform samples to produce high quality sound.

The authors hypothesize that conditioning on mel spectrograms, rather than the depth of the stack, allows this reduction in complexity. Every variant in this table is conditioned on mel spectrograms, so the table does not include a linguistic-feature WaveNet of the same reduced size.

## Limitations

All training and evaluation use one internal US English dataset of 24.6 hours from a single professional female speaker.

Tacotron 2 scores 4.526 ± 0.066 against 4.582 ± 0.053 for ground truth, and raters still prefer ground truth with a mean side-by-side score of −0.270 ± 0.155. Mispronunciation and unnatural prosody remain in the error analysis, with 6 and 23 sentences counted in those categories.

On news headlines the system ran into pronunciation difficulties with names. Predicted spectrograms are oversmoothed, and a WaveNet trained only on ground truth features does not handle them well.

The trade-off between the number of mel bins and audio quality was not explored. In the authors' experiments a 5 ms frame hop caused more pronunciation issues, and the mixture density network variant was harder to train. The explanation that mel conditioning, rather than depth, enables the smaller WaveNet remains a hypothesis in the paper.

## Paper info

- **Authors**: Jonathan Shen, Ruoming Pang, Ron J. Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang, Zhifeng Chen, Yu Zhang, Yuxuan Wang, RJ Skerry-Ryan, Rif A. Saurous, Yannis Agiomyrgiannakis, Yonghui Wu
- **Venue**: arXiv · Preprint
- **First published**: 2017-12-16
- **Added**: 2026-11-6
- **Updated**: 2018-2-16
- **Version**: v2
- **arXiv**: 1712.05884
- **Category**: cs.CL
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1712.05884v2) · [PDF ↗](https://arxiv.org/pdf/1712.05884v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Jonathan Shen, Ruoming Pang, Ron J. Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang, Zhifeng Chen, Yu Zhang, Yuxuan Wang, RJ Skerry-Ryan, Rif A. Saurous, Yannis Agiomyrgiannakis, Yonghui Wu (2017). Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions. arXiv:1712.05884v2. https://arxiv.org/abs/1712.05884v2

**BibTeX**

```
@misc{shen2017natural,
  title = {{Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions}},
  author = {Jonathan Shen and Ruoming Pang and Ron J. Weiss and Mike Schuster and Navdeep Jaitly and Zongheng Yang and Zhifeng Chen and Yu Zhang and Yuxuan Wang and RJ Skerry-Ryan and Rif A. Saurous and Yannis Agiomyrgiannakis and Yonghui Wu},
  year = {2017},
  eprint = {1712.05884},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.05884v2}
}
```

## Other paper commentary

- [Universal Language Model Fine-tuning for Text Classification](https://refivu.com/en/papers/f2470a4a-1c9b-423c-8757-ba73cfe37b54-universal-language-model-fine-tuning-for-text-classification.md)
- [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://refivu.com/en/papers/13b055d5-7dcd-422f-b6d8-3704e3d48533-bart-denoising-sequence-to-sequence-pre-training-for.md)
- [Prefix-Tuning: Optimizing Continuous Prompts for Generation](https://refivu.com/en/papers/01cf041e-b71c-444b-8b44-e94ac976a9db-prefix-tuning-optimizing-continuous-prompts-for-generation.md)
- [Neural Machine Translation of Rare Words with Subword Units](https://refivu.com/en/papers/0950e659-f6cc-4852-b244-bbb2742bf059-neural-machine-translation-of-rare-words-with-subword.md)
- [SQuAD: 100,000+ Questions for Machine Comprehension of Text](https://refivu.com/en/papers/b88d7f5b-b008-4a74-a452-4513427bbf9f-squad-100-000-questions-for-machine-comprehension-of.md)
- [Measuring Massive Multitask Language Understanding](https://refivu.com/en/papers/c93df260-9bcd-49a6-95e1-3da2df6130ee-measuring-massive-multitask-language-understanding.md)
- [SSD: Single Shot MultiBox Detector](https://refivu.com/en/papers/1889995f-3f80-4a7d-b734-c549e845a707-ssd-single-shot-multibox-detector.md)
- [Two-Stream Convolutional Networks for Action Recognition in Videos](https://refivu.com/en/papers/d621dee0-0b2a-45a8-b152-6260b98f0db4-two-stream-convolutional-networks-for-action-recognition-in.md)
- [Prompting Is Programming: A Query Language for Large Language Models](https://refivu.com/en/papers/688fcde1-89d3-44fe-b9ec-673455f09c78-prompting-is-programming-a-query-language-for-large.md)
- [Multimodal Machine Learning-based Knee Osteoarthritis Progression Prediction from Plain Radiographs and Clinical Data](https://refivu.com/en/papers/2b4e96e0-64f3-4752-8b7e-3e4c0c68dc86-multimodal-machine-learning-based-knee-osteoarthritis.md)
- [Collaborative Federated Learning For Healthcare: Multi-Modal COVID-19 Diagnosis at the Edge](https://refivu.com/en/papers/716b1271-0a25-4e75-a046-8918241dcd06-collaborative-federated-learning-for-healthcare-multi-modal.md)
- [Federated Learning for Malware Detection in IoT Devices](https://refivu.com/en/papers/95bd62ab-6913-4636-86fb-d82f1fc8a32c-federated-learning-for-malware-detection-in-iot-devices.md)

## Terms in this paper

- [Receptive Field](https://refivu.com/en/terms/4d2bf4d526a5-receptive-field)
- [dilated convolution](https://refivu.com/en/terms/7c0300102517-dilated-convolution)
- [mean squared error (MSE)](https://refivu.com/en/terms/285676885a86-mean-squared-error-mse)
- [WaveNet](https://refivu.com/en/terms/97a38e34ad76-wavenet)
- [teacher forcing](https://refivu.com/en/terms/5af8c5103329-teacher-forcing)
- [mean opinion score (MOS)](https://refivu.com/en/terms/aaddd5d9a33b-mean-opinion-score-mos)
- [Tacotron](https://refivu.com/en/terms/f04aaa50bb3b-tacotron)
- [teacher-forcing](https://refivu.com/en/terms/601f2add55da-teacher-forcing)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/596b5353-6c04-4ada-a92e-25d0fee13147-natural-tts-synthesis-by-conditioning-wavenet-on-mel)
