MegaTTS3 is a high-quality zero-shot text-to-speech system developed by ByteDance, based on Sparse Alignment Enhanced Latent Diffusion Transformer technology. This project is primarily for academic research purposes, providing powerful text-to-speech (TTS) and voice cloning capabilities.
git clone https://github.com/bytedance/MegaTTS3
cd MegaTTS3
conda create -n megatts3-env python=3.10
conda activate megatts3-env
pip install -r requirements.txt
export PYTHONPATH="/path/to/MegaTTS3:$PYTHONPATH"
./checkpoints/xxx
directory.# Chinese speech synthesis
python tts/infer_cli.py --input_wav 'assets/Chinese_prompt.wav' --input_text "另一边的桌上,一位读书人嗤之以鼻道,'佛子三藏,神子燕小鱼是什么样的人物,李家的那个李子夜如何与他们相提并论?'" --output_dir ./gen
# English speech synthesis (high expressiveness)
python tts/infer_cli.py --input_wav 'assets/English_prompt.wav' --input_text 'As his long promised tariff threat turned into reality this week, top human advisers began fielding a wave of calls from business leaders.' --output_dir ./gen --p_w 2.0 --t_w 3.0
# Maintain original accent (p_w ≈ 1.0)
python tts/infer_cli.py --input_wav 'assets/English_prompt.wav' --input_text '这是一条有口音的音频。' --output_dir ./gen --p_w 1.0 --t_w 3.0
# Standard pronunciation (p_w > 2.0)
python tts/infer_cli.py --input_wav 'assets/English_prompt.wav' --input_text '这条音频的发音标准一些了吗?' --output_dir ./gen --p_w 2.5 --t_w 2.5
python tts/gradio_api.py