Model reference · open weights
Confucius4-TTS is an open-weight audio or speech model from netease-youdao. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | netease-youdao |
|---|---|
| Type | Audio & music |
| Task | Text→speech |
| Released | 2026-06-02 |
| Popularity | 568 downloads / month |
| Licence | Open weights |
About
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.
✨ Key Features
With strong cross-lingual generalization, Confucius4-TTS allows users to seamlessly switch languages while keeping the same voice, delivering fluent, natural, and expressive speech.
git clone https://github.com/netease-youdao/Confucius4-TTS.git
cd Confucius4-TTS
conda create -n confuciustts python=3.10 -y
conda activate confuciustts
pip install -r requirements.txt
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.yaml
You 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)
Confucius4-TTS follows a "speech encoder + LLM" architecture. The training pipeline covers two modules:
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/Amphion
After 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 implementation
Training data is provided as TSV files (tab-separated, no header) with the following 5 columns:
| Column | Description |
|---|---|
lang | Language code (e.g. zh, en, ja) |
wav_path | Path to the target audio |
norm_text | Normalized text |
semantic_ids_path | Pre-extracted semantic tokens (.npy file path) |
ref_audio_paths | Reference audio path(s), comma-separated for multiple |
Configure the train/validation paths in config/train_t2s.yaml:
data:
train_data_path:
- data/train.tsv
val_data_path:
- data/val.tsv
Set the pretrained T2S checkpoint path in config/train_t2s.yaml:
paths:
t2s_checkpoint: checkpoints/t2s_model.safetensors
Single-node training:
python -m confuciustts.cli.train_t2s -c config/train_t2s.yaml
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 S2A
Single-node training:
python -m confuciustts.cli.train_s2a -c config/train_s2a.yaml
During S2A training, the T2S model, speaker encoder (Wav2Vec2-BERT), and style encoder (CAMPPlus) are all frozen. Only the flow-matching S2A model is trained.
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 (↑).
| Direction | Metric | Confucius4-TTS | CosyVoice2† | CosyVoice3-0.5B† | CosyVoice3-1.5B† | OmniVoice† | VoxCPM2 |
|---|
From the published model card. Full card on the HuggingFace links in the sidebar.
How it works
Using it via the API
Once AxForge deploys confucius4-tts for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (confucius4-tts below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $AXFORGE_API_KEY" \ -F model="confucius4-tts" -F file=@audio.mp3
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.