test_gen_spec.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:DDAE 作者: jerrygood0703 项目源码 文件源码
def make_spectrum_phase(y, FRAMESIZE, OVERLAP, FFTSIZE):
    D=librosa.stft(y,n_fft=FRAMESIZE,hop_length=OVERLAP,win_length=FFTSIZE,window=scipy.signal.hamming)
    Sxx = np.log10(abs(D)**2) 
    phase = np.exp(1j * np.angle(D))
    mean = np.mean(Sxx, axis=1).reshape((257,1))
    std = np.std(Sxx, axis=1).reshape((257,1))+1e-12
    Sxx = (Sxx-mean)/std  
    return Sxx, phase, mean, std
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号