M5-TTS-50M-CustomVoice
English | 简体中文
GitHub · Demo · Space · Models
M5-TTS is a compact multilingual and multi-dialect text-to-speech system from ASLP@NPU and LycheeAI Lab. It combines a 30M temporal backbone with a 20M local multi-token prediction decoder, using 16 audio codebooks at 12.5 frames/s for 24 kHz speech generation. The speech codec is separate.
CustomVoice is the dedicated checkpoint for preset-speaker synthesis: provide text and a trained speaker ID, with no reference audio or reference transcript required. The example below uses speaker ID 1. Available IDs and voice capabilities depend on the checkpoint.
Quickstart
Use Python 3.10 on Linux with a BF16-capable NVIDIA GPU and a compatible CUDA driver. Install from the code repository:
git clone https://github.com/ASLP-lab/M5-TTS.git
cd M5-TTS
conda create -n m5tts python=3.10 -y
conda activate m5tts
pip install -r requirements.txt
pip install --no-build-isolation flash-attn==2.7.3
Run from the repository root:
python infer_speaker.py \
--model ASLP-lab/M5-TTS-50M-CustomVoice \
--text "你好,今天的天气很好,适合出去散散步。" \
--speaker-id 1 \
--output outputs/speaker.wav
The M5 checkpoint, text tokenizer and audio tokenizer are downloaded automatically. Use --lang Chinese, English, German, French, Japanese or Korean to set the target language.
This checkpoint is different from VoiceClone. Setting a speaker ID does not switch a loaded model's weights. See the project README for Python API usage and evaluation results.
License
Apache-2.0. The Qwen-derived audio codec retains its upstream attribution; see the third-party notice.
- Downloads last month
- 76