Skip to main content

Module griffin_lim

Module griffin_lim 

Source
Expand description

Griffin-Lim magnitude-only reconstruction.

Recovers a time-domain signal from an STFT magnitude target when the phase is unknown, by alternating projection (Griffin & Lim, 1984): invert the current complex estimate to the time domain (ISTFT), re-analyse it (STFT), then replace the magnitude with the target while keeping the freshly-estimated phase. Each round is non-increasing in the magnitude inconsistency.

Reuses crate::features::istft() for the inverse and crate::features::fft::fft_radix2 for the forward analysis. Zero-heap hot path: every buffer (including the evolving spectra) is caller-owned.

Functionsยง

griffin_lim
Run iterations Griffin-Lim rounds and write the reconstructed time signal.