TL;DR
When reconstructing audio from magnitude-only spectrograms, the choice of Short-Time Fourier Transform (STFT) parameters can make or break your signal quality. This paper presents the first systematic evaluation of how transform parameters—like redundancy, window type, and time-frequency ratio—affect phase retrieval algorithms. The core takeaway? There is no "one-size-fits-all" configuration; each algorithm requires a uniquely optimized STFT setup to perform its best.
What Problem Does This Paper Address?
In many audio processing pipelines (like source separation or text-to-speech), algorithms discard phase information and operate solely on the magnitude of the STFT coefficients. To convert these modified spectrograms back into listenable time-domain audio, we must estimate the missing phase using a Phase Retrieval (PR) algorithm.
However, an arbitrary matrix of magnitudes doesn't automatically correspond to a valid time-domain signal. It must be consistent, meaning it obeys the underlying mathematical constraints of the STFT.
While researchers knew that STFT parameters influenced PR performance, the field lacked a systematic study. Most benchmarks compared PR algorithms using a single, fixed STFT configuration, which inadvertently favored certain methods over others and led to unfair conclusions.
Methods
The authors systematically evaluated three prominent PR algorithms representing different core strategies:
- Phase-Gradient Heap-Integration (PGHI): A fast, non-iterative method that exploits the mathematical relationships between phase gradients and log-magnitude derivatives in a continuous Gaussian STFT.
- Fast Griffin-Lim Algorithm (FGLA): A widely used iterative method based on alternating projections between the time domain and the STFT domain to minimize projection error.
- Single-Pass Spectrogram Inversion (SPSI): A highly efficient, non-iterative method that assumes the audio is a mixture of slowly varying sinusoids.
They tested these algorithms across a massive grid of STFT parameter variations:
- Redundancy ($D = M/a$): Ranging from 2 to 32 (where $M$ is channels and $a$ is time step).
- Time-Frequency Ratio ($\lambda$): Ranging from $10^{-3}$ to $10^4$, controlling the trade-off between temporal and spectral resolution.
- Window Functions: Gaussian, Blackman, Hann, and Bartlett.
Performance was measured using both a signal-based metric (Spectrogram SNR, $SNR_{MS}$) and a perceptual metric (Objective Difference Grade, ODG, from the PEAQ standard).
Datasets
The evaluation used three distinct audio datasets to capture different signal characteristics:
- Speech: A subset of the LJ Speech dataset (English speech from a single speaker, resampled to 22,050 Hz).
- Synthesized Music: Piano tracks generated from the Lakh MIDI dataset using FluidSynth, representing clean, polyphonic, noise-free sinusoids.
- Real Music: Electronic music tracks from the Free Music Archive (FMA), introducing complex textures and wider bandwidths.
Key Insights and Ideas
- The "Fair Comparison" Fallacy: Each algorithm peaks at completely different parameter sets. For example, PGHI performs best at very high redundancies ($D \ge 16$) and a low TF ratio ($\lambda \approx 3$). FGLA peaks at a higher TF ratio ($\lambda \approx 8$) and its performance saturates early, showing no benefit from increasing redundancy beyond $D = 8$.
- The Gaussian Trap for PGHI: Window selection is critical for PGHI but irrelevant for FGLA and SPSI. Because PGHI's phase-magnitude relationships are mathematically derived assuming a Gaussian window, using non-Gaussian windows degrades its performance significantly.
- Signal Content Shifts the Optimal Window Length: Audio with heavy low-frequency energy (like the MIDI piano dataset) requires a higher optimal $\lambda$ (longer time windows) to accurately resolve and reconstruct phase information compared to speech.
Key Results
- Overall Winner: PGHI generally achieved the highest reconstruction quality, while SPSI performed the worst due to its strict sinusoidal assumptions failing on complex speech and music.
- Window Sensitivity: For PGHI at a high redundancy ($D=32$), switching from a Gaussian window to a Bartlett window dropped the reconstruction quality by up to 20 dB SNR. For FGLA, changing the window type had virtually no statistical impact.
- Inconsistent Spectrograms: When performing PR on modified (inconsistent) spectrograms—such as after applying a frequency filter—the optimal $\lambda$ shifted drastically, increasing by a factor of ten every time the redundancy was doubled.
Limitations and Future Work
While this paper provides an excellent blueprint for optimizing classical PR algorithms, it focuses entirely on signal-processing-based methods. Modern deep-learning-based phase retrieval techniques were not included in this parameter sweep.
Additionally, the authors note that in many real-world applications, engineers are handed a spectrogram computed with suboptimal parameters that they cannot change. Future work will focus on developing front-end systems capable of transforming a suboptimal STFT magnitude representation into an optimized one before running phase retrieval.
Summary updated