pub fn inverse_stft(
spec: &[Vec<[f32; 2]>],
frame_size: usize,
hop: usize,
) -> Result<Vec<f32>, StftBakeError>Expand description
Inverse STFT of the two-sided complex frames from
crate::audio::stft::forward_stft back into a single time-domain signal.
spec:num_framesframes, each a length-frame_sizetwo-sided spectrum of [re, im] bins (exactly thecrate::audio::stft::forward_stftoutput).frame_size:N, a power of two; the analysis/synthesis frame length.hop: sample advance between frames (> 0). A COLA Hann athop = N/2gives exact interior reconstruction.
The frames are flattened into a num_frames × 2·N interleaved-complex buffer
([re, im, …]), a length-N Hann window is built for both the analysis and
synthesis arguments, and the WOLA resynthesiser
[etalon_signal::audio::istft_overlap_add_into] is invoked with caller-owned
norm/out buffers (out_len = (num_frames − 1)·hop + N).
Returns the reconstructed samples (length out_len), or an empty Vec when
spec is empty.