Python中的可逆STFT和ISTFT
SciPy或NumPy或其他内置的逆傅立叶变换是否有通用形式的短时傅立叶变换?
specgram
matplotlib中有pyplot函数,该函数调用ax.specgram()
,后者调用mlab.specgram()
,后者调用_spectral_helper()
:
#The checks for if y is x are so that we can use the same function to #implement the core of psd(), csd(), and spectrogram() without doing #extra calculations. We return the unaveraged Pxy, freqs, and t.
但
这是一个辅助功能,可实现204#psd,csd和频谱图之间的通用性。它 不 打算在mlab之外使用
我不确定这是否可以用于STFT和ISTFT。还有什么,还是我应该翻译像这些MATLAB函数一样的东西?
我知道如何编写自己的临时实现;我只是在寻找功能全面的东西,它可以处理不同的开窗功能(但默认设置是健全的),并且可以通过COLA窗口(istft(stft(x))==x
)完全反转,由多人测试,没有一一错误,可以解决问题零填充,快速RFFT实现实际输入等。