Deep Long Audio Inpainting

Ya-Liang Chang, Kuan-Ying Lee, Po-Yu Wu, Hung-yi Lee, Winston H. HsuarXiv 2019

Abstract

Long (> 200 ms) audio inpainting, to recover a long missing part in an audio segment, could be widely applied to audio editing tasks and transmission loss recovery. It is a very challenging problem due to the high dimensional, complex and non-correlated audio features. While deep learning models have made tremendous progress in image and video inpainting, audio inpainting did not attract much attention. In this work, we take a pioneering step, exploring the possibility of adapting deep learning frameworks from various domains inclusive of audio synthesis and image inpainting for audio inpainting. Also, as the first to systematically analyze factors affecting audio inpainting performance, we explore how factors ranging from mask size, receptive field and audio representation could affect the performance. We also set up a benchmark for long audio inpainting.

Introduction

Traditional audio inpainting has primarily addressed "short-range" gaps, typically in the range of tens of milliseconds, which often occur due to packet loss in telecommunications. At this scale, audio signals are largely stationary, allowing simple interpolation or autoregressive models to suffice.

In contrast, "long-range" gaps (>200ms) present a significantly more complex challenge. These gaps are common in audio editing—such as removing a specific unwanted sound—where the signal is non-stationary and highly intricate. Existing heuristic methods like SimilarityGraph, which rely on copying and pasting similar segments, often fail when the audio lacks repetitive patterns, such as in human speech. This paper establishes a systematic research framework and benchmark for this "editing-scale" inpainting problem.

Methodology

The authors explore two distinct architectural paths for long audio inpainting, focusing on different representations of audio data:

  1. Waveform-based Model: This model operates directly on raw audio signals. Given the high sampling rate of audio (16kHz+), the network requires a massive receptive field to capture sufficient context. The authors employ Gated Convolutions to allow the model to learn dynamic feature selection and Dilated Convolutions to expand the receptive field without a proportional increase in parameter count.
  2. Spectrogram-based Model: This approach treats the audio's spectrogram as a 2D image. By adapting state-of-the-art image inpainting models (such as GMCNN), the system fills gaps in the time-frequency domain. Final audio is reconstructed using the Griffin-Lim algorithm to estimate missing phase information.

To enhance the quality of the results beyond standard $L_1$ loss, the researchers incorporate Perceptual Loss. They utilize pre-trained classifiers—SoundNet for waveforms and ResNet50 for spectrograms—to ensure that the inpainted content matches the ground truth at a high semantic and feature level.

Overall model architecture for waveform and spectrogram-based inpainting.

Experimental Setup

The models were evaluated on two datasets representing different audio characteristics:

  • SC09: A subset of the Speech Commands Dataset containing 1-second clips of spoken digits. This tests the ability to handle aperiodic, high-complexity human speech.
  • ESC-50: A dataset of environmental sounds (e.g., animals, rain). These 5-second clips often contain more repetitive or "texture-like" structures.

Performance was compared against several baselines, including WaveGlow (a flow-based vocoder), Deep Image Prior (DIP), and SimilarityGraph.

Key Insights and Results

  • Receptive Field Necessity: For waveform models, the receptive field must be larger than the mask size. Without sufficient context on both sides of the gap, the inpainted signal tends to fade into silence.
  • Robustness of Image Models: General-purpose image inpainting models like GMCNN proved remarkably robust when applied to spectrograms, effectively extrapolating local correlations despite the different physical meanings of the axes (time vs. frequency).
  • Inference Efficiency: While Deep Image Prior (DIP) can produce high-quality results, it is computationally prohibitive (0.002 samples/min). The proposed models offer significant speed improvements (up to ~106 samples/min), making them suitable for real-world applications.

Quantitatively, the proposed models consistently outperformed baselines. On the SC09 speech dataset, the waveform model with perceptual loss achieved the highest SSIM (0.775). Qualitatively, as shown in Figure 3, the models generate meaningful audio elements rather than the noise or silence typical of baseline methods.

Comparison of qualitative inpainting results across different models.

Conclusion

This work demonstrates that adapting deep learning frameworks from image inpainting and audio synthesis is a viable path for long audio inpainting. While the spectrogram approach is robust, it remains limited by the phase estimation accuracy of the Griffin-Lim algorithm. Future work may involve integrating neural vocoders for better phase recovery and exploring more diverse datasets, such as multi-speaker dialogue or music.

Summary updated

BibTeX
@misc{chang2019deep,
  author = {Ya-Liang Chang and Kuan-Ying Lee and Po-Yu Wu and Hung-yi Lee and Winston H. Hsu},
  title = {{Deep Long Audio Inpainting}},
  year = {2019},
  eprint = {1911.06476},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.06476},
}
Figure