AutoStyle-TTS: Retrieval-Augmented Generation based Automatic Style Matching Text-to-Speech Synthesis

Dan Luo, Chengyuan Ma, Weiqin Li, Jun Wang, Wei Chen, Zhiyong Wu · DOI

Introduction

Modern Large Language Model (LLM)-based Text-to-Speech (TTS) systems, such as CosyVoice and MaskGCT, have achieved remarkable success in generating realistic speech and cloning voices using short audio prompts. However, a significant usability bottleneck remains: the quality and appropriateness of the generated speech are heavily dependent on the manual selection of these style prompts.

In long-form content like podcasts or audiobooks, the emotional tone and speaking style must shift dynamically with the narrative. Manually selecting a new prompt for every sentence is a tedious process, and failing to do so leads to "content and style disharmony"—for instance, a somber sentence might be delivered with the upbeat cadence of a cheerful prompt. AutoStyle-TTS addresses this by introducing a Retrieval-Augmented Generation (RAG) framework that automates style prompt selection, bridging the gap between text semantics and audio expressiveness.

Methodology

AutoStyle-TTS utilizes a three-part architecture designed to automate and execute style matching without sacrificing speaker identity.

1. Speech Style Knowledge Database

The system relies on a curated vector database of expressive speech segments, typically 5-10 seconds in length. These segments are indexed using Milvus, providing a rich library of potential styles for the TTS system to draw upon.

2. RAG Style Selection Module

The core innovation of AutoStyle-TTS is its composite style embedding strategy. Rather than relying on simple semantic text embeddings, the system constructs a multi-faceted embedding ($E_{style}$) composed of three elements:

  • $E_{profile}$ (Global Character Profiling): Extracted by Llama 3.2 to capture the overarching persona of the speaker.
  • $E_{emotion}$ (Situational Emotions): Extracted by a custom "PER-LLM-Embedder" (a fine-tuned Llama 3.2 model) to capture the immediate emotional context of the text.
  • $E_{user}$ (User Preferences): Encodes specific user requirements such as age, gender, and region using Moka.

The system employs Max Inner Product Search (MIPS) to retrieve the top-K audio prompts from the database that most closely match this composite embedding.

3. Style and Timbre Decoupled TTS

To effectively use retrieved prompts, the authors modified the CosyVoice backbone to decouple timbre from style. Timbre is handled by a CAM++ speaker encoder, while style is managed through speech tokens. This separation allows the system to inject the emotion and pacing of a retrieved prompt without overwriting the unique identity of the target voice.

Experimental Setup

The Knowledge Database was constructed using the Microsoft EXPRESSO dataset and proprietary high-quality Chinese speech, totaling over 2,000 segments across 30 speakers. The PER-LLM-Embedder was fine-tuned on the IEMOCAP and M3ED datasets to ensure robust emotional extraction across both English and Chinese. Evaluation was conducted using the Common Voice and DiDiSpeech-2 datasets.

Key Results and Discussion

Performance and Decoupling

The modified TTS architecture successfully maintained speaker similarity (SIM: 0.750 vs. 0.753) and speech quality (VISQOL: 4.075 vs. 4.083) compared to the baseline CosyVoice. Crucially, it achieved a significantly higher Inception Score (1.325 vs. 1.007), indicating a much greater capacity for diverse and flexible style generation.

Subjective Evaluation

In subjective testing, AutoStyle-TTS outperformed baselines in both Style Matching and Style Coherence.

  • Style Matching MOS: 3.85 (English), 3.90 (Chinese).
  • Style Coherence MOS: 3.81 (English), 3.83 (Chinese).

In blind AB preference tests, listeners found the RAG-selected prompts highly competitive with manual selection. The automated system was preferred 47% of the time for dialogue and 48% of the time for storytelling, suggesting that context-aware retrieval can effectively replace manual curation.

The Impact of Top-K Retrieval

Ablation studies revealed that the number of retrieved prompts ($K$) significantly impacts performance. Using $K=3$ yielded the best results for style matching and coherence. While increasing $K$ can provide more stylistic context, the authors found that $K=5$ actually degraded performance, as too many prompts introduced conflicting style cues that confused the synthesis process.

Conclusion

AutoStyle-TTS demonstrates that decoupling timbre and style is essential for effective RAG-based TTS. By combining global character profiles with local situational emotions, the system prevents jarring transitions and ensures narrative coherence. While the current system rivals human performance, future work will focus on more advanced prompt-fusion mechanisms to better handle multiple retrieved style cues without introducing inconsistencies.

Summary updated

BibTeX
@inproceedings{luo2025autostyle,
  author = {Dan Luo and Chengyuan Ma and Weiqin Li and Jun Wang and Wei Chen and Zhiyong Wu},
  title = {{AutoStyle-TTS: Retrieval-Augmented Generation based Automatic Style Matching Text-to-Speech Synthesis}},
  booktitle = {ICME},
  year = {2025},
  doi = {10.1109/icme59968.2025.11208937},
}
Figure