EzAudio: Tencent and Johns Hopkins' Efficient Text-to-Audio Model
EzAudio is a diffusion-based text-to-audio model from Tencent AI Lab and Johns Hopkins University. It generates sound in a 1D waveform VAE latent space using an efficient diffusion transformer, and also supports inpainting and ControlNet guidance. This guide explains the architecture, staged training, CFG rescaling, released code, and honest limitations.
View 3 referencesAllow the functional cookie to save your likes. Privacy details
EzAudio is a diffusion-based text-to-audio model developed by Tencent AI Lab and Johns Hopkins University. Instead of generating spectrograms, it works in a 1D waveform VAE latent space and uses an efficient diffusion transformer. This guide explains its architecture, training strategy, editing capabilities, and how to run the released code.
What is EzAudio?
EzAudio is a text-to-audio generation model from Tencent AI Lab and Johns Hopkins University. It converts natural-language prompts into audio using a diffusion transformer, and also supports audio editing and inpainting. The work appeared as arXiv:2409.10819 in 2024 and was accepted for an oral presentation at Interspeech 2025.
The official repository lists authors Jiarui Hai, Yong Xu, Hao Zhang, Chenxing Li, Helin Wang, Mounya Elhilali, and Dong Yu. Checkpoints and interactive demos are hosted under the OpenSound organisation on Hugging Face.
Why use waveform latents instead of spectrograms?
Earlier systems treated 2D mel spectrograms as images and generated them with U-Nets, then needed a neural vocoder. EzAudio builds on a 1D waveform variational autoencoder, preserving high temporal resolution while avoiding that two-stage pipeline. The result is lower computational cost and a simpler training procedure.
The authors argue that spectrograms discard temporal detail and add a synthesis step that can degrade quality. Working directly in waveform latents keeps the model structure compact and the generation path short.
What is EzAudio-DiT?
EzAudio-DiT is the model's custom diffusion transformer for audio latents. It uses AdaLN-SOLA, long skip connections, and rotary position embeddings to improve parameter efficiency, convergence speed, and training stability. The authors report that these choices make the model easier to train than generic diffusion backbones.
AdaLN-SOLA modifies adaptive layer normalisation to use fewer parameters, while long skip connections preserve fine detail across diffusion steps. Together they target the usual DiT weakness in audio: high memory use for long sequences.
How does the training strategy handle scarce labels?
The team uses a staged, data-efficient recipe. Unlabeled audio teaches acoustic dependencies, captions produced by an audio-language model supply text-to-audio alignment, and a final stage fine-tunes on human-labeled data. This reduces reliance on expensive manual annotation while keeping prompt alignment accurate.
The masked-diffusion objective lets the model learn structure from raw audio first. Human-labelled fine-tuning then sharpens the connection between prompts and the sounds actually produced.
What does CFG rescaling change?
Classifier-free guidance usually forces a trade-off: stronger guidance improves prompt adherence but harms audio quality, so users hunt for an optimal scale. EzAudio's CFG rescaling method keeps strong alignment at larger guidance scores without that quality penalty, simplifying inference and making the model easier to use.
The practical benefit is a smaller search space at inference. You can push for tight prompt adherence without assuming a matching drop in naturalness.
Can EzAudio edit audio as well as generate it?
Yes. The released API exposes three tasks: text-to-audio generation, audio inpainting, and ControlNet-guided generation. Inpainting replaces a bounded segment of an existing recording with sound matching a new prompt, while the energy-conditioned ControlNet steers generation using a reference audio file's envelope.
from api.ezaudio import EzAudio
import soundfile as sf
ezaudio = EzAudio(model_name="s3_xl", device="cuda")
sr, audio = ezaudio.generate_audio("a dog barking in the distance")
sf.write("dog.wav", audio, sr)
sr, edited = ezaudio.editing_audio(
"A train passes by, blowing its horns",
boundary=2, gt_file="egs/edit_example.wav",
mask_start=1, mask_length=5,
)
sf.write("train_edit.wav", edited, sr)
The ControlNet variant uses EzAudio_ControlNet(model_name="energy") and a reference audio path.
How do I run EzAudio?
Clone the GitHub repository, install requirements, and optionally download checkpoints from the OpenSound Hugging Face organisation. The snippet below loads the s3_xl checkpoint and writes a WAV file. A CUDA GPU speeds things up, but the code falls back to CPU when torch.cuda.is_available() returns false.
git clone https://github.com/haidog-yaqub/EzAudio.git
cd EzAudio
pip install -r requirements.txt
The repository also ships t2a_demo.py and controlnet_demo.py as entry points, plus an egs folder with example audio for editing and ControlNet demos.
What are the limitations of EzAudio?
This is a research release from 2024, not a maintained commercial product. Quality claims come from the authors' own objective and subjective evaluations. The repository's TODO list still mentions improved APIs and automatic checkpoint downloads, so expect setup friction. Check the licence and intended-use terms before deploying.
The model targets general audio events rather than expressive speech or music production. If you need voice cloning or long-form music, a specialised model is a better fit.
Frequently asked questions about EzAudio
Frequently asked questions cover cost, voice generation, and model freshness. EzAudio is open code with downloadable checkpoints, it targets general audio events rather than speech cloning, and the paper dates to 2024. Confirm current hardware requirements in the repository before planning a deployment, and verify the licence for commercial use.
Is EzAudio free to use?
The code and checkpoints are publicly available on GitHub and Hugging Face. Read the LICENSE file in the repository before using the model commercially; open hosting does not automatically mean unrestricted commercial rights.
Does EzAudio generate speech?
It is a general text-to-audio model, demonstrated on events such as dog barks and train horns. The architecture is not a dedicated text-to-speech system, so it is not the right tool for narration or voice identity transfer.
How long is a generated clip?
Generation length depends on the checkpoint and inference settings rather than a fixed published duration. The repository examples write short WAV files, and the editing demo uses a segment boundary of two with a five-unit mask. Start with those defaults and measure on your hardware.