Griffin-Lim Algorithm vs Neural Vocoders in TTS

This article explores how the Griffin-Lim algorithm reconstructs audio phase from magnitude-only spectrograms and details why this classical mathematical approach has been superseded by modern neural vocoders in Text-to-Speech (TTS) pipelines. It covers the iterative mechanics of phase retrieval, the resulting perceptual limitations, and how deep learning architectures overcome these issues to produce natural, human-like speech.

The Spectrogram and the Phase Problem

To synthesize speech, modern TTS pipelines typically operate in two stages: an acoustic model that converts text into an intermediate representation—usually a mel-spectrogram—and a vocoder that converts that representation into a playable time-domain audio waveform.

A Short-Time Fourier Transform (STFT) decomposes an audio signal into two components: magnitude and phase. The magnitude represents the frequency energy over time, while the phase represents the time alignment and wave shapes of those frequencies. Acoustic models generally predict only the magnitude (or mel-scaled magnitude) because phase is erratic, wraps around \([-\pi, \pi]\), and is historically difficult for statistical models to predict directly. However, an inverse STFT (iSTFT) requires both magnitude and phase to produce a valid time-domain signal.

How the Griffin-Lim Algorithm Reconstructs Phase

The Griffin-Lim Algorithm (GLA), introduced in 1984, solves this issue through an iterative projection heuristic based on the redundancy of overlapping STFT frames.

The algorithm operates through the following sequence:

  1. Initialization: The target magnitude spectrogram is paired with an initial phase estimate, often random noise or zeros.
  2. Time-Domain Projection: An inverse STFT is applied to the combined target magnitude and estimated phase to generate a temporary time-domain audio signal.
  3. Frequency-Domain Projection: An STFT is computed on this newly created time-domain signal, generating a new magnitude and a new phase.
  4. Magnitude Replacement: The newly calculated magnitude is discarded and replaced with the original target magnitude, while the newly calculated phase is retained.
  5. Iteration: Steps 2 through 4 are repeated for a fixed number of iterations (typically 30 to 100 times) until the phase converges to a consistent state.

Because consecutive STFT frames overlap (often by 50% to 75%), a mathematically valid audio signal must be consistent across these overlapping segments. Griffin-Lim exploits this mathematical constraint to push the estimated phase closer to a physically plausible waveform with each pass.

Why Griffin-Lim is Inferior in Modern TTS

Despite being deterministic, computationally lightweight, and requiring no training data, Griffin-Lim is rarely used in state-of-the-art TTS systems due to several critical limitations:

1. Perceptual Artifacts and "Phasiness"

Phase retrieval is a non-convex optimization problem, meaning Griffin-Lim frequently gets trapped in local minima rather than finding the true global phase. In practice, this manifests as metallic ringing, hollow robotic undertones, noticeable roughness, and temporal smearing known as "phasiness." The resulting audio sounds artificial and distinctly synthetic.

2. Information Loss in Mel-Spectrograms

Standard TTS models output mel-spectrograms rather than linear-frequency spectrograms to reduce dimensionality and align with human auditory perception. Griffin-Lim cannot directly invert a mel-spectrogram; the mel-scale must first be approximately inverted to a linear-frequency scale. This approximate inversion introduces severe spectral degradation and interpolation errors that Griffin-Lim cannot correct.

3. High Computational Overhead for Convergence

While a single iteration of GLA is simple, achieving intelligible audio requires dozens of STFT/iSTFT iterations. This sequential, iterative loop creates a processing bottleneck that is inefficient for real-time, low-latency streaming applications.

The Advantage of Neural Vocoders

Modern neural vocoders (such as HiFi-GAN, WaveGlow, BigVGAN, and Vocos) have largely replaced Griffin-Lim. Instead of relying on iterative mathematical approximations of phase consistency, neural vocoders are trained on vast datasets of human speech to model the direct mapping from mel-spectrograms to raw time-domain waveforms.

Neural vocoders offer several distinct advantages: