Abstract
While modern neural Text-to-Speech (TTS) systems have achieved high levels of intelligibility, they often lack the prosodic variety found in natural human speech. This paper presents a hierarchical framework for Mandarin TTS designed to capture expressive speaking styles by looking beyond the boundaries of a single sentence. By integrating a hierarchical context encoder with a knowledge distillation training strategy, the proposed model learns to synthesize speech that reflects the structural relationships between phrases and sentences, resulting in significantly more natural and contextually appropriate prosody.
1. Introduction
Standard neural TTS models, such as FastSpeech 2, typically process sentences in isolation. This approach leads to "prosodic flatness," where the model generates the same speaking style for a sentence regardless of its position or function within a larger paragraph. In natural human communication, prosody—including pitch, tempo, and emphasis—is deeply contextual. How a speaker emphasizes a specific word often depends on the information presented in preceding sentences or the intent of upcoming ones.
To address this, we propose a model that incorporates hierarchical context information. By modeling the structural relationships between phrases within a sentence and between sentences within a paragraph, the system aims to bridge the gap between isolated sentence synthesis and natural, paragraph-level discourse.
2. Methodology
The system is built upon the FastSpeech 2 architecture, enhanced by three primary innovations designed to capture and utilize long-range context.
2.1 XLNet for Text Representation
Unlike many systems that rely on BERT, this framework employs XLNet to extract phrase-level embeddings. XLNet is particularly suited for this task because it is designed to handle longer text sequences without the rigid length constraints found in BERT-based models, making it ideal for paragraph-level analysis.
2.2 Hierarchical Context Encoder
The core of the innovation lies in the Hierarchical Context Encoder, which processes a sliding window of five sentences (the current sentence, two preceding sentences, and two succeeding sentences). The encoder operates at two distinct levels:
- Inter-phrase level: This level utilizes a Bidirectional GRU (BiGRU) combined with an attention mechanism to identify which phrases within a sentence contribute most significantly to the overall speaking style.
- Inter-sentence level: This level aggregates the sentence representations. By incorporating positional encodings, the model accounts for the relative order of sentences to predict a final "style embedding" that informs the acoustic generator.
2.3 Knowledge Distillation Training
Mapping raw text directly to expressive prosody is a complex task. To simplify the learning process, the authors utilize a three-step knowledge distillation strategy:
- Teacher Training: A Reference Encoder is first trained to extract "ground-truth" style embeddings directly from actual human audio recordings.
- Student Training: The Context Encoder (the "student") is then trained to predict these audio-derived embeddings using only the available text context.
- Fine-tuning: The entire system is fine-tuned end-to-end to ensure the predicted style embeddings integrate seamlessly with the FastSpeech 2 backbone.
3. Experimental Setup
The model was evaluated using an internal single-speaker Mandarin lecture dataset. This dataset consists of approximately 7 hours of speech (4,700 audio clips) from a native male speaker. Lecture data was specifically chosen because it contains more significant fluctuations in speed, pitch, and energy than standard news-reading datasets, providing a rigorous test for expressive style modeling.
4. Results and Analysis
The proposed model was compared against standard FastSpeech 2 and a non-hierarchical XLNet baseline using both subjective and objective metrics.
4.1 Subjective Evaluation
In Mean Opinion Score (MOS) testing, the proposed model achieved a score of 4.067, a marked improvement over standard FastSpeech 2 (3.679) and the non-hierarchical baseline (3.842). Furthermore, ABX preference tests indicated that listeners preferred the speech generated by the hierarchical model nearly 40% more often than the standard baseline.
4.2 Objective Metrics and Case Studies
Objective analysis confirmed these findings, with the proposed model showing lower Root Mean Square Error (RMSE) for pitch (F0) and energy, as well as lower Mel Cepstral Distortion (MCD). Visualizations of pitch contours revealed that the model correctly applied emphasis to specific words when the surrounding context implied importance—an effect that was lost when the context encoder was removed.
5. Conclusion
This research demonstrates that context in speech synthesis is inherently hierarchical. By modeling both inter-phrase and inter-sentence relationships, and by utilizing future context alongside past context, TTS systems can achieve a level of prosodic variety that mimics human planning in speech. The use of knowledge distillation proves to be an effective "bridge" for teaching text-based models to predict complex acoustic styles. Future work will focus on extending this hierarchical approach to multi-speaker datasets and exploring dynamic context window sizes.
Summary updated