pub fn spectrogram(
signal: &[f32],
sample_rate: u32,
fft_size: usize,
hop: usize,
) -> SpectrogramExpand description
Compute the magnitude spectrogram of signal via a Hann-windowed STFT.
Magnitudes are returned in decibels (20·log10, amplitude-normalised by the
window and floored at −120 dB). hop is the step between frames in samples
(e.g. fft_size / 4 for 75 % overlap). A signal shorter than one frame yields
an empty spectrogram.