Parallel Neural Text-to-Speech

Kainan Peng, Wei Ping, Zhao Song, Kexin ZhaoarXiv 2019

Abstract

In this work, we propose ParaNet, a non-autoregressive seq2seq model that converts text to spectrogram. It is fully convolutional and brings 46.7 times speed-up over the lightweight Deep Voice 3 at synthesis, while obtaining reasonably good speech quality. ParaNet also produces stable alignment between text and speech on the challenging test sentences by iteratively improving the attention in a layer-by-layer manner. Furthermore, we build the parallel text-to-speech system and test various parallel neural vocoders, which can synthesize speech from text through a single feed-forward pass. We also explore a novel VAE-based approach to train the inverse autoregressive flow (IAF) based parallel vocoder from scratch, which avoids the need for distillation from a separately trained WaveNet as previous work.

Introduction

Most high-quality neural text-to-speech (TTS) systems, such as Tacotron 2 or Deep Voice 3, are autoregressive. These models generate speech frames sequentially, where each frame depends on the preceding ones. While effective for naturalness, this sequential nature poses two significant challenges: inference speed is limited by the inability to parallelize across time, and "exposure bias" during inference can lead to attention errors, such as skipping or repeating words.

To address these issues, we introduce ParaNet, a fully parallel pipeline designed to convert text to audio in a single feed-forward pass. By utilizing a non-autoregressive architecture, ParaNet achieves massive speedups while maintaining high robustness and speech quality.

The ParaNet Architecture

ParaNet is a non-autoregressive seq2seq model that relies on a fully convolutional architecture. Unlike autoregressive decoders, ParaNet’s decoder uses non-causal convolutions, allowing it to process the entire sequence simultaneously. This design enables the parallel generation of the complete mel-spectrogram.

The ParaNet architecture, featuring a fully convolutional encoder-decoder structure and detailed convolution block.

The architecture includes an encoder that processes text embeddings through a series of convolution blocks and a decoder that refines the output. Because non-autoregressive models lack an internal sense of time, strong positional encodings are integrated to provide the necessary monotonic bias for speech generation.

Attention Distillation and Iterative Refinement

Learning the alignment between text and audio from scratch is notoriously difficult for non-autoregressive models. ParaNet overcomes this by employing attention distillation. We use a pre-trained autoregressive teacher model (Deep Voice 3) to provide "gold standard" attention maps that the student ParaNet learns to emulate.

Attention distillation process where a student model learns alignment from an autoregressive teacher.

A key innovation in ParaNet is iterative refinement. The decoder refines the alignment layer-by-layer across 17 layers. Starting from a rough estimate based on positional encodings, subsequent layers progressively sharpen the attention into a precise mapping. This process makes ParaNet more stable than its teacher; by avoiding the exposure bias inherent in autoregressive models, it significantly reduces errors on challenging "stress test" sentences.

Parallel Vocoding with WaveVAE

To complete the end-to-end parallel pipeline, we explore parallel neural vocoders. We propose WaveVAE, a novel Variational Autoencoder framework that allows training an Inverse Autoregressive Flow (IAF) vocoder from scratch. This eliminates the need for the complex distillation from a pre-trained WaveNet required by previous methods, simplifying the training of the entire parallel TTS system.

Key Results

ParaNet demonstrates exceptional performance across several metrics:

  • Synthesis Speed: ParaNet is 46.7 times faster than Deep Voice 3. On an NVIDIA 1080 Ti, it synthesizes 1 second of speech in just 3.9ms (254.6x real-time).
  • Robustness: In a 100-sentence stress test involving complex acronyms and URLs, ParaNet (with masking) produced only 6 total errors, compared to 8 for the teacher model and 37 for the teacher without masking.
  • Speech Quality: Mean Opinion Score (MOS) evaluations show ParaNet achieving a score of 4.01, nearly matching the teacher's score of 4.09, proving that speed does not come at the cost of quality.

Conclusion

ParaNet represents a significant step toward real-time, robust neural TTS. By combining a fully convolutional non-autoregressive architecture with attention distillation and iterative refinement, it achieves state-of-the-art synthesis speeds and superior stability. Future work will focus on further optimizing the memory footprint and robustness of parallel vocoders to enable efficient deployment on mobile and edge devices.

Summary updated

BibTeX
@misc{peng2019parallel,
  author = {Kainan Peng and Wei Ping and Zhao Song and Kexin Zhao},
  title = {{Parallel Neural Text-to-Speech}},
  year = {2019},
  eprint = {1905.08459},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.08459},
}
Figure