Cross-Utterance Conditioned VAE for Speech Generation

Yang Li, Cheng Yu, Guangzhi Sun, Weiqin Zu, Zheng Tian, Ying Wen, Wei Pan, Chao Zhang, Jun Wang, Yang Yang, Fanglei Sun

TL;DR

The CUC-VAE S2 framework significantly improves the naturalness and expressiveness of speech synthesis and text-based speech editing by leveraging the context of surrounding sentences. By combining pre-trained language models with a conditional variational autoencoder (CVAE), it successfully generates context-sensitive prosody and ensures seamless transitions during audio modifications.

What Problem Does This Paper Address?

Standard neural text-to-speech (TTS) and speech editing (SE) systems typically generate or modify audio one sentence at a time, completely ignoring the broader narrative context. However, human speech is inherently contextual—how we pronounce a word or vary our pitch (prosody) depends heavily on what we said before and what we plan to say next.

Without this context, traditional VAE-based TTS models suffer from uncontrolled or random prosody because they sample from a generic standard Gaussian prior during inference. Furthermore, when used for speech editing (such as inserting, deleting, or replacing words in an existing recording), traditional methods often create jarring audio discontinuities and robotic transitions at the boundaries where the edited audio meets the original recording.

Methods

The authors introduce the Cross-Utterance Conditioned Variational Autoencoder Speech Synthesis (CUC-VAE S2) framework to emulate human-like, context-aware prosody generation.

Overview of the CUC-VAE S2 Framework

The architecture relies on three core pillars:

  1. Cross-Utterance Embedding (CU-Embedding) Module: This module extracts semantic context from neighboring sentences using a pre-trained BERT model. It fuses these cross-utterance embeddings with the current sentence's phonemes and speaker identity using multi-head attention.
  2. Cross-Utterance Enhanced CVAE: Instead of a standard Gaussian prior, this conditional VAE learns an utterance-specific prior conditioned directly on the surrounding context. During inference, prosody features are sampled from this context-rich prior.
  3. Vocoder: A fine-tuned HiFi-GAN transforms the synthesized mel-spectrograms into audible waveforms.

The framework is adapted into two practical algorithms:

  • CUC-VAE TTS: Directly applies the framework to generate full text-to-speech audio with natural, context-derived prosody.
  • CUC-VAE SE: Tailored for speech editing. It utilizes a masked training strategy (masking 50% of words during training) and an entire-inference approach. Instead of awkwardly splicing new audio into old audio, it regenerates the entire sentence's spectrogram while conditioning on the unedited parts, ensuring perfectly smooth boundaries.

Datasets

The models were trained and evaluated on the LibriTTS dataset (specifically the train-clean-100 and train-clean-360 subsets), which contains approximately 245 hours of English audiobooks spoken by 1,151 speakers. Because the dataset is structured by audiobooks, it inherently contains adjacent sentences. The authors reprocessed the data using a sliding window to capture $l=5$ sentences before and after each target utterance.

Key Insights and Ideas

  • Context-Driven Priors Eliminate Randomness: Shifting from a standard Gaussian prior to an utterance-specific prior conditioned on BERT embeddings allows the model to capture genuine linguistic nuances. For example, the model can automatically deduce whether to emphasize a name based on whether the previous utterance was a question asking "who" performed an action.
  • Entire Inference Over Splicing: For speech editing, patching a newly generated word into an existing waveform ("partial inference") is fundamentally flawed because it ignores co-articulation and prosodic flow. Regenerating the entire spectrogram while masking the edited region allows the surrounding context to naturally smooth out the editing junctions.
  • Biased Training for Better Fidelity: The authors discovered that weighting the loss function more heavily on the masked (edited) regions during training (using a balanced 1:1.5 ratio for unmasked-to-masked parts) forces the model to accurately synthesize the new text without drifting away from the acoustic style of the original unedited audio.

Key Results

  • TTS Performance: CUC-VAE TTS achieved a superior Mean Opinion Score (MOS) for naturalness (3.63) compared to the FastSpeech 2 baseline (3.53). It also achieved the lowest Mel-cepstral distortion (6.04) and Word Error Rate (5.5%), proving that context improves both expressiveness and intelligibility.
  • Speech Editing Superiority: In subjective testing across deletion, insertion, and replacement operations, the entire-inference CUC-VAE SE consistently outperformed EditSpeech and partial-inference baselines. It showed a massive advantage in replacement tasks, where baseline models traditionally struggle with intonation conversion at boundaries.

Limitations and Future Work

The authors noted an intriguing trade-off regarding embedding foundation models: while BERT significantly reduced spectral distortion (yielding the best MCD scores), simpler word embedding models like Word2Vec or GloVe actually achieved slightly better F0 (pitch) track reconstruction accuracy and word accuracy. This suggests that future work could focus on optimizing language models to extract representations tailored specifically for acoustic and prosodic features rather than purely semantic ones.

Summary updated

BibTeX
@article{li2024cross,
  author = {Yang Li and Cheng Yu and Guangzhi Sun and Weiqin Zu and Zheng Tian and Ying Wen and Wei Pan and Chao Zhang and Jun Wang and Yang Yang and Fanglei Sun},
  title = {{Cross-Utterance Conditioned VAE for Speech Generation}},
  journal = {IEEE/ACM Transactions on Audio, Speech, and Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=FrkCdBc909},
}
Figure