TLDR: A new method called AIDD uses a discrete diffusion model on tokenized audio to reconstruct missing segments in recordings. Unlike previous approaches that struggle with gaps over 100ms, AIDD effectively fills in gaps up to 500ms, offering superior and more coherent audio restoration by operating in a simplified, discrete latent space.
Audio inpainting is a fascinating field focused on restoring missing or damaged sections within audio recordings. Imagine an old, scratched vinyl record or a digital audio file with corrupted segments – audio inpainting aims to seamlessly fill in those gaps, making the sound whole again. This isn’t just about fixing errors; it has broad applications, from preserving historical recordings to enhancing modern audio production by removing unwanted noises or filling in data loss during transmission.
Historically, methods for audio inpainting relied on signal processing techniques, often assuming that the missing audio could be predicted from its immediate surroundings. While these approaches worked reasonably well for very short gaps, typically under 100 milliseconds, they struggled significantly with longer, more complex missing segments. The challenge lies in maintaining semantic coherence and natural flow when a substantial portion of the audio is absent.
In recent years, the advent of deep generative models, particularly diffusion models, has brought a new wave of advancements to audio processing. These models have shown remarkable ability to learn intricate patterns from large audio datasets and generate high-quality audio. However, even with these powerful tools, a common hurdle for audio inpainting has been the degradation of quality when gaps extend beyond 100 milliseconds, with some models struggling past 300 milliseconds.
A Novel Approach: Discrete Diffusion for Audio Inpainting
A new research paper introduces a groundbreaking method called Audio Inpainting using Discrete Diffusion Model (AIDD) that tackles this challenge head-on. Unlike previous diffusion models that operate on continuous audio waveforms or spectrograms, AIDD takes a different path: it works directly with tokenized audio representations. This means the audio is first converted into a sequence of discrete “tokens” – much like words in a sentence – and the inpainting process happens in this simplified, discrete space.
The core of this innovative approach involves three main components. First, a pre-trained audio tokenizer, specifically WavTokenizer, is used to transform high-dimensional raw audio into compact sequences of these discrete tokens. This tokenizer is designed to efficiently compress audio while retaining its rich semantic content. Second, a Discrete Diffusion Model (DDM) is employed. This model learns to predict and reconstruct the masked (missing) tokens through a reverse diffusion process, effectively “denoising” the corrupted token sequence back to its original form. Finally, the reconstructed token sequence is passed through the WavTokenizer’s decoder to synthesize the output audio waveform, seamlessly filling in the masked part.
Why Discrete Diffusion Makes a Difference
Operating in a discrete latent space offers several significant advantages. The token representation drastically reduces the amount of data the model needs to process compared to raw audio, and it inherently filters out low-level noise, simplifying the generative task. More importantly, discrete diffusion enables stable and coherent modeling over long ranges, making it exceptionally well-suited for reconstructing larger gaps. This approach also helps mitigate common artifacts seen in continuous-domain models, such as oversmoothing or spectral blurring, resulting in more natural-sounding reconstructions.
Also Read:
- FreeAudio: Crafting Precise and Extended Audio from Text Without Retraining
- Advancing Image Generation with Vision Foundation Models as Efficient Visual Tokenizers
Impressive Performance on Longer Gaps
The researchers rigorously evaluated AIDD on the MusicNet dataset, a collection of classical music recordings, and further tested it on the MTG dataset, extending gap durations up to 500 milliseconds. The results are highly promising. AIDD demonstrated competitive or even superior performance compared to existing state-of-the-art baselines, especially for longer gaps. For instance, for a 300ms gap, AIDD achieved a significantly lower Fréchet Audio Distance (FAD) score, indicating more realistic reconstructions compared to previous diffusion-based methods. This robust performance for extended gaps highlights AIDD’s potential for real-world applications where significant audio restoration is needed.
This work not only advances the field of audio inpainting but also lays a foundation for future generative audio capabilities, including unconditional music generation and music continuation. For more technical details, you can explore the full research paper available at this link.


