netease-youdao/Confucius4-TTS
<div align="center"> <img src="https://2901733926.github.io/Confucius4-TTS/Confucius4-TTS.jpg" alt="Confucius4-TTS" width="35%"> <h1>Confucius4-TTS: a Multilingual and Cross-Lingual Zero-Shot TTS Engine</h1> <p><b>One voice. Any language.</b></p> </div>
<div align="center"> <a href="./README.zh.md"><img src="https://img.shields.io/badge/README-中文版本-red"></a> <a href="https://arxiv.org/abs/2608.11650"><img src="https://img.shields.io/badge/arXiv-2608.11650-b31b1b.svg"></a> <a href="./LICENSE"><img src="https://img.shields.io/badge/codelicense-Apache%202.0-blue"></a> <a href="https://confucius4-tts.youdao.com/gradio/"><img src="https://img.shields.io/badge/Demo-在线体验-orange"></a> <a href="https://2901733926.github.io/Confucius4-TTS/"><img src="https://img.shields.io/badge/GitHub.io-DemoPage-blue?logo=GitHub&style=flat-square"></a> <a href="https://github.com/netease-youdao/Confucius4-TTS"><img src="https://img.shields.io/badge/GitHub-Code-181717?logo=GitHub" alt="GitHub Code"></a> <a href="https://huggingface.co/netease-youdao/Confucius4-TTS"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Confucius4TTS-yellow"></a> <a href="https://modelscope.cn/models/netease-youdao/Confucius4-TTS"><img src="https://img.shields.io/badge/ModelScope-Confucius4TTS-purple"></a> </div> <br>
Confucius4-TTS is an advanced LLM-based text-to-speech (TTS) system designed for multilingual and cross-lingual speech synthesis. Built on a speech encoder + large language model (LLM) architecture, Confucius4-TTS enables high-quality speech generation while preserving speaker identity across languages. You can try our online demo at [https://confucius4-tts.youdao.com/gradio](https://confucius4-tts.youdao.com/gradio).
✨ Key Features
- 14 Languages Supported: Chinese, English, Japanese, Korean, German, French, Spanish, Indonesian, Italian, Thai, Portuguese, Russian, Malay and Vietnamese (more coming soon)
- Unconstrained Voice Cloning: No reference transcript required
- Cross-Lingual Voice Transfer: Unaccented speech synthesis across 14 languages
- Zero-Shot Voice Transfer: Clone voices without additional training
- Seamless Emotion Transfer: Clone the feeling, not just the voice
- Robust Generalization: Stable performance in real-world multilingual scenarios
With strong cross-lingual generalization, Confucius4-TTS allows users to seamlessly switch languages while keeping the same voice, delivering fluent, natural, and expressive speech.
Contents
🛠 Installation
Requirements
- Python 3.10
- CUDA 12.6
Setup
- Clone the repository:
git clone https://github.com/netease-youdao/Confucius4-TTS.git
cd Confucius4-TTS- Create and activate a conda environment:
conda create -n confuciustts python=3.10 -y
conda activate confuciustts- Install dependencies:
pip install -r requirements.txt🚀 Inference
Use the provided example.py script for zero-shot TTS synthesis:
python example.py \
--prompt_wav path/to/reference.wav \
--text "Your text to synthesize" \
--lang en \
--out output.wav \
--config config/inference_config.yamlYou can also use the Python API directly:
import torch
import torchaudio
from confuciustts.cli.inference import ConfuciusTTS
model = ConfuciusTTS(
config_path="config/inference_config.yaml",
device="cuda" if torch.cuda.is_available() else "cpu",
)
audio = model.generate(
text="Hello, welcome to Confucius4-TTS.",
lang="en",
prompt_wav="path/to/reference.wav",
verbose=True,
)
torchaudio.save("output.wav", audio.cpu(), model.sample_rate)🚀 Fine-Tuning
Confucius4-TTS follows a "speech encoder + LLM" architecture. The training pipeline covers two modules:
- Text2Semantic (T2S): generates semantic token sequences from text and speaker conditioning.
- Semantic2Acoustic (S2A): a flow-matching model that converts semantic tokens into mel spectrograms.
1. Prepare Pretrained Models
Download the two external models:
# Wav2Vec2-BERT (speaker conditioning & semantic feature extraction)
huggingface-cli download facebook/w2v-bert-2.0 \
--local-dir pretrained/w2v-bert-2.0
# Amphion MaskGCT (semantic codec implementation)
git clone https://github.com/open-mmlab/Amphion.git external/AmphionAfter downloading, your directory should look like:
checkpoints/
├── t2s_model.safetensors # pretrained T2S weights
├── s2a_model.pt # pretrained S2A weights
├── wav2vec2bert_stats.pt # semantic feature normalization statistics
├── special_tokens_map.json # tokenizer files
├── tokenizer.json
├── tokenizer.model
└── tokenizer_config.json
pretrained/
├── w2v-bert-2.0/ # Wav2Vec2-BERT model
└── campplus/
└── campplus_cn_common.bin # CAMPPlus speaker encoder checkpoint
external/
└── Amphion/ # MaskGCT semantic codec implementation2. Prepare Training Data
Training data is provided as TSV files (tab-separated, no header) with the following 5 columns:
Configure the train/validation paths in config/train_t2s.yaml:
data:
train_data_path:
- data/train.tsv
val_data_path:
- data/val.tsv3. Launch T2S Training
Set the pretrained T2S checkpoint path in config/train_t2s.yaml:
paths:
t2s_checkpoint: checkpoints/t2s_model.safetensorsSingle-node training:
python -m confuciustts.cli.train_t2s -c config/train_t2s.yaml4. Launch S2A Training
Set the checkpoint paths in config/train_s2a.yaml. t2s_checkpoint points to the frozen T2S backbone; s2a_checkpoint is optional and can be used to resume from a pretrained S2A model:
paths:
t2s_checkpoint: checkpoints/t2s_model.safetensors
s2a_checkpoint: checkpoints/s2a_model.pt # optional: resume from pretrained S2ASingle-node training:
python -m confuciustts.cli.train_s2a -c config/train_s2a.yamlDuring S2A training, the T2S model, speaker encoder (Wav2Vec2-BERT), and style encoder (CAMPPlus) are all frozen. Only the flow-matching S2A model is trained.
📊 Performance
Confucius4-TTS achieves competitive results on multilingual and cross-lingual zero-shot TTS benchmarks, with strong intelligibility and speaker similarity across multiple languages.
Lower is better for WER/CER (↓), and higher is better for SIM (↑).
CV3-eval Cross-lingual
<details> <summary><b>CV3-eval Cross-lingual Results (click to expand)</b></summary>
† Requires reference text.
</details>
X-Voice Benchmark
<details> <summary><b>X-Voice Cross-lingual Results (click to expand)</b></summary>
† Requires reference text.
</details>
Seed-TTS-eval
<details> <summary><b>Seed-TTS-eval English & Chinese Zero-shot Results (click to expand)</b></summary>
† Requires reference text.
</details>
MiniMax-MLS-Test
<details> <summary><b>MiniMax-MLS-Test Results (click to expand)</b></summary>
† Requires reference text.
</details>
Acknowledgements
Confucius4-TTS builds on the following open-source projects:
- [Qwen3-TTS](https://github.com/QwenLM/Qwen3-TTS) — Speaker encoder (ECAPA-TDNN) and text embedding projector architectures
- [CosyVoice](https://github.com/FunAudioLLM/CosyVoice) — Text normalization pipeline
- [Amphion / MaskGCT](https://github.com/open-mmlab/Amphion) — Semantic codec implementation
- [w2v-BERT 2.0](https://huggingface.co/facebook/w2v-bert-2.0) — Semantic feature extraction and speaker conditioning
- [Seed-VC](https://github.com/Plachtaa/seed-vc) — Flow matching architecture reference
- [BigVGAN](https://github.com/NVIDIA/BigVGAN) — High-fidelity neural vocoder for mel-spectrogram to waveform synthesis
Citation
If you find Confucius4-TTS useful in your research or project, please consider citing:
@misc{wang2026confucius4tts,
title = {Confucius4-TTS: Transcript-Free Cross-Lingual Zero-Shot TTS with a Learnable Speaker Encoder},
author = {Huaxuan Wang and Huimin Wang and Ruiyu Zhang and Yingjie Li and Yitao Duan},
year = {2026},
eprint = {2608.11650},
archivePrefix = {arXiv},
primaryClass = {cs.SD},
url = {https://arxiv.org/abs/2608.11650}
}