MegaTTS 3 Voice Cloning: Setup, Parameters and Practical Limits
MegaTTS 3 Voice Cloning is ByteDance's lightweight zero-shot TTS release with a 0.45B-parameter diffusion transformer. This guide covers the required WAV plus NPY voice latents, the CLI and Gradio setup, what p_w and t_w change, accent control, the 24-second voice request queue, installation caveats and the Apache-2.0 licence.
View 2 referencesAllow the functional cookie to save your likes. Privacy details
MegaTTS 3 voice cloning is ByteDance's official PyTorch implementation of a compact zero-shot speech synthesis model. This guide follows the repository README, read on 2 December 2026, and keeps the project's own restrictions in view.
What is MegaTTS 3 voice cloning?
MegaTTS 3 is ByteDance's official PyTorch implementation of a lightweight zero-shot speech synthesis model. Its TTS diffusion transformer backbone has only 0.45 billion parameters, yet it claims high-quality voice cloning in Chinese and English, including code-switched speech. The code, weights and a Hugging Face demo are public.
The repository was released on 22 March 2025. It is a forced-alignment version of the paper Sparse Alignment Enhanced Latent Diffusion Transformer for Zero-Shot Speech Synthesis, arXiv:2502.18924.
What does the MegaTTS 3 release actually include?
The repository provides inference code, a command-line tool, a Gradio web UI, checkpoint links and a Hugging Face demo. It is a forced-alignment version of the paper's model and adds extra models for stability and cloning. A speech-text aligner is also exposed for data preparation and phoneme recognition.
The aligner is trained on pseudo-labels from many MFA expert models. The README lists four uses for it: preparing fine-tuning data, filtering noisy speech, phoneme recognition and speech segmentation.
The aligner is a separate submodule rather than part of the inference command, so you only need it if you are building or cleaning a training set. The README points to tts/frontend_fuction.py and tts/infer_cli.py as example code for reusing submodules elsewhere. That is useful if you already have a pipeline and want to borrow one component without running the whole model.
What files do you need to clone a voice?
To synthesise a given speaker you need two files in the same directory: A.wav and A.npy. The .npy file holds pre-extracted voice latents. ByteDance did not publish the WaveVAE encoder weights, so you cannot generate those latents locally from arbitrary audio using the released code.
This is the single most important practical constraint. It means a folder of reference audio alone is not enough, and it explains why the project runs a voice request queue.
How do you run MegaTTS 3 inference?
Set PYTHONPATH to the repository root, then call tts/infer_cli.py with a prompt WAV, target text and output directory. The example below uses the bundled English prompt. A GPU is optional; the Gradio UI takes roughly 30 seconds for ten steps on CPU.
export PYTHONPATH="/path/to/MegaTTS3:$PYTHONPATH"
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.' --output_dir ./gen --p_w 2.0 --t_w 3.0
What do p_w and t_w control?
p_w is the intelligibility weight and t_w the similarity weight. Noisier prompts generally need higher values. The README suggests raising t_w within roughly 2.0 to 5.0 to improve expressiveness and similarity, especially for emotional speech, while watching for artefacts in the output.
Treat these as starting ranges, not guarantees. A noisy reference can force a trade-off between sounding like the speaker and being easy to understand.
How do you control accent in MegaTTS 3?
Accent control is tied to p_w. Near 1.0, generated audio keeps the speaker's original accent; as p_w rises, pronunciation moves toward the standard form. The advice is to set t_w about zero to three points above p_w, which is also useful for cross-lingual accent problems.
| Setting | Effect |
|---|---|
| p_w near 1.0 | Retains the speaker's original accent |
| Higher p_w | Shifts toward standard pronunciation |
| t_w about 0–3 above p_w | Common starting point for similarity |
Can you clone your own voice with MegaTTS 3?
Not directly through the public release. The project asks you to submit a clean WAV clip under 24 seconds with no spaces in the filename to its voice request queue. After a safety check, the team uploads the corresponding latent file. The project says this is mainly for academic use.
The same queue is offered for academic datasets that need evaluation, with each clip limited to 24 seconds. There is no published service-level guarantee on turnaround.
Is MegaTTS 3 free to use commercially?
The repository is Apache-2.0 licensed, which is permissive. However, the README calls the project primarily academic, withholds the WaveVAE encoder, and gates voice latents behind a request queue. Check current terms before building a commercial product on it, and plan for the possibility that voice submission is limited.
For a different open TTS path with a clear non-commercial licence, see /articles/massivelymultilingualtts-mms-tts-guide.
What are the setup caveats?
Python 3.10 is the documented environment. Windows and Docker support are marked as under testing, with extra pynini and WeTextProcessing steps on Windows. The code expects ffmpeg or ffprobe in some paths, and remote Gradio exposure requires explicit authentication. Check both before your first run.
The README also notes that pydantic and gradio versions should match, and that a no_proxy pattern containing :: can cause httpx errors. These are small details, but they account for many first-run failures.
The documented Docker command binds Gradio to 127.0.0.1 by default. Exposing it remotely requires both a non-local bind address and explicit username and password settings, which is worth doing only on a trusted network.
Bottom line on MegaTTS 3 voice cloning
For researchers who want compact, controllable Chinese-English cloning, MegaTTS 3 is a credible open implementation with unusually clear parameter guidance. For product teams, the missing encoder and latent request process are real constraints. Verify licensing and availability before building on it.