MelGAN: Generative Adversarial Networks for Conditional Waveform Synthesis

Kundan Kumar, Rithesh Kumar, Thibault de Boissiere, Lucas Gestin, Wei Zhen Teoh, Jose Sotelo, Alexandre de Brébisson, Yoshua Bengio, Aaron C. Courville

TL;DR

MelGAN introduces a fully convolutional, non-autoregressive Generative Adversarial Network (GAN) architecture that synthesizes high-quality raw audio from mel-spectrograms. It achieves state-of-the-art results while running over 100x faster than real-time on a GPU and 2x faster than real-time on a CPU, significantly outperforming previous models like WaveNet and WaveGlow in computational efficiency.

What Problem Does This Paper Address?

In the world of speech synthesis (Text-to-Speech or TTS), the generation process is typically split into two distinct steps:

  1. Converting text into a lower-resolution intermediate representation, such as a mel-spectrogram.
  2. Converting that intermediate representation back into a raw audio waveform—a process known as vocoding.
Text-to-Speech Pipeline

The second step is notoriously difficult. Raw audio has an incredibly high temporal resolution (at least 16,000 samples per second) with complex structures spanning different timescales. Previous solutions faced a frustrating "trilemma":

  • Autoregressive models (e.g., WaveNet): These produce high-quality audio but are painfully slow because they generate audio sequentially, one sample at a time.
  • Flow-based models (e.g., WaveGlow): These are fast on GPUs but require massive parameter counts and memory, making them impractical for many edge devices or real-world applications.
  • GANs: Historically, GANs have struggled to generate coherent audio waveforms without introducing metallic artifacts or high-frequency "hissing" noise.

MelGAN aims to break this trilemma, proving that GANs can produce high-fidelity audio while remaining lightweight and incredibly fast.

Methods

To make GANs viable for high-quality audio synthesis, the authors propose a specific set of architectural choices:

MelGAN Architecture

The Generator

The generator is a fully convolutional feed-forward network. It takes a mel-spectrogram as input and uses a stack of transposed convolutional layers to upsample it back to the original audio frequency.

  • Dilated Convolutions: After each upsampling step, the architecture employs residual blocks with dilated convolutions. This significantly increases the "induced receptive field," allowing the model to capture long-range correlations in the audio without a massive increase in parameters.
  • No Noise Vector: Interestingly, the authors found that adding a traditional GAN noise vector didn't help. Because the mel-spectrogram is such a strong conditioning signal, the model simply ignores the noise.

The Multi-Scale Discriminator

To ensure the audio sounds natural at both high and low frequencies, MelGAN uses three discriminators operating at different scales:

  1. The raw audio.
  2. Audio downsampled by a factor of 2.
  3. Audio downsampled by a factor of 4. This "multi-scale" approach forces the generator to produce consistency across different frequency bands, reducing artifacts.

The Training Objective

Instead of relying solely on a standard GAN loss, the researchers utilize a Feature Matching Loss. This minimizes the L1 distance between the feature maps of the discriminator for real versus synthetic audio. It acts as a learned similarity metric, helping the generator learn the underlying distribution of speech more effectively than a simple pixel-wise (or sample-wise) loss.

Datasets

The researchers evaluated MelGAN across several domains to test its robustness:

  • LJ Speech: A standard single-speaker dataset containing 24 hours of speech.
  • VCTK: A multi-speaker dataset used to test how well the model generalizes to voices it hasn't heard during training.
  • MusicNet: Used for unconditional music synthesis and music domain translation.
  • Internal 6-speaker dataset: Used for more robust generalization tests.

Key Insights and Ideas

  • Normalization Matters: The authors discovered that Weight Normalization is the "secret sauce" for audio GANs. Popular techniques like Instance Normalization or Spectral Normalization actually hurt audio quality, often making the output sound metallic.
  • Checkerboard Artifacts: By carefully choosing the kernel size (specifically, making it twice the stride) for transposed convolutions, they successfully eliminated the "checkerboard" patterns that often plague deconvolutional generators.
  • Efficiency is King: MelGAN has only 4.26 million parameters. Compare that to WaveGlow’s 87.9 million. This remarkably small footprint is what allows it to run so fast on standard hardware.

Key Results

  • Speed: MelGAN is a speed demon. It runs at 2,500 kHz on a GTX 1080Ti (over 100x faster than real-time) and 51.9 kHz on a CPU (more than 2x faster than real-time).
  • Quality: In Mean Opinion Score (MOS) tests, MelGAN performed comparably to much larger, slower models. On the VCTK dataset, it achieved a MOS of 3.49, significantly outperforming traditional signal processing methods like Griffin-Lim (1.72).
  • Generalization: The model successfully inverted mel-spectrograms for speakers it was never trained on, proving it learns a general mapping of speech rather than just memorizing specific voices.

Limitations and Future Work

While MelGAN is a breakthrough in efficiency, it does have constraints:

  • Time-Alignment: The model requires the conditioning information (the mel-spectrogram) to be perfectly time-aligned with the output. It cannot currently handle sequences where the input and output lengths vary unpredictably.
  • Paired Data: The feature matching loss requires paired ground-truth data, which limits its use in purely unsupervised settings.
  • Unconditional Synthesis: For unconditional synthesis (generating music from scratch without a spectrogram), the authors suggest MelGAN needs to be paired with other models (like VQ-VAE) to handle high-level structure.

Overall, MelGAN shifted the conversation in the audio community, proving that GANs are not just for images—they are a viable, high-speed path forward for the future of speech and music synthesis.

Summary updated

BibTeX
@inproceedings{kumar2019melgan,
  author = {Kundan Kumar and Rithesh Kumar and Thibault de Boissiere and Lucas Gestin and Wei Zhen Teoh and Jose Sotelo and Alexandre de Brébisson and Yoshua Bengio and Aaron C. Courville},
  title = {{MelGAN: Generative Adversarial Networks for Conditional Waveform Synthesis}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=HffM_zJLBgq},
}
Figure