Course contentsShow
← Machine Learning and Deep Learning
Lesson 2469 of 3,53853. Speech and Audio ProcessingFree lesson

Fast Neural Vocoders: WaveGlow and HiFi-GAN

Explore flow-based and GAN-based vocoders that enable real-time speech synthesis.

Fast Neural Vocoders: WaveGlow and HiFi-GAN

What you'll learn: How flow-based and GAN-based vocoders achieve real-time, high-quality speech synthesis by dramatically improving on WaveNet's speed.

The Speed Problem

You've learned that WaveNet produces excellent audio quality but is painfully slow—it generates samples one at a time autoregressively. For real-time speech synthesis (like voice assistants), this is impractical. WaveGlow and HiFi-GAN solve this by enabling parallel generation.

WaveGlow: Flow-Based Vocoder

WaveGlow uses normalizing flows to model the distribution of audio waveforms. Think of it as a reversible pipeline: during training, it transforms real audio into simple noise; during inference, it reverses the process, converting random noise into speech all at once rather than sample-by-sample.

Key advantages:

  • Parallel generation: produces thousands of samples simultaneously
  • Exact likelihood training: learns the true distribution of audio
  • No quality loss: matches WaveNet quality at 1000× speed

HiFi-GAN: GAN-Based Vocoder

HiFi-GAN takes a different approach using Generative Adversarial Networks. It learns to upsample mel-spectrograms directly into waveforms through adversarial training, with discriminators ensuring both audio quality and perceptual realism.

Key features:

  • Multi-scale discriminators: evaluate audio at different resolutions
  • Even faster than WaveGlow: achieves real-time synthesis on CPUs
  • Lightweight: smaller models, faster inference

Think of HiFi-GAN as a skilled artist who learns shortcuts—it doesn't model every detail explicitly but generates perceptually convincing audio through learned patterns.

Which to Choose?

WaveGlow guarantees exact likelihood modeling (more principled), while HiFi-GAN prioritizes speed and efficiency (more practical for production).

Key Takeaway: WaveGlow and HiFi-GAN enable real-time speech synthesis by replacing WaveNet's autoregressive generation with parallel approaches—flows for exact modeling or GANs for ultra-fast generation.