1

I read the source codes of scipy.signal.stft and librosa.stft, and I noticed that the calculation of STFT of a signal in these two libraries are quite different: In scipy.signal.stft, the result is scaled by 1.0/win.sum(), where win.sum() represents the sum of window function used, while in librosa.stft, no scaling process is done. So my question is what is the difference between these two results? And why librosa.stft don't do the scaling procedure?

Xiong
  • 11
  • 1
  • 1
    A reason to scale by the sum of the window function is if you want the magnitudes to be exact for any reason, like analysis or ifft. A reason not to scale anything is for speed, when you don't care about the magnitudes, like when you are comparing relative magnitudes. – Mark Jeronimus Nov 18 '20 at 14:29

0 Answers0