w7_bass_boost_bta.py 文件源码

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

项目:EC602 作者: gottben 项目源码 文件源码
def main():

    #Select filename
    filename = 'scary.wav'  

    #Test loudest_band with bach, send only one of the two channels 
    music, frame_rate, nframes, nchannels = read_wave(filename, False)

    #Plot FFT of input signal
    plot_fft(music[:,0], frame_rate, -5000, 5000)   

    (low, high, loudest) = loudest_band(music[:,0], frame_rate, 1000)

    print("low:  ", low,  " Hz")
    print("high: ", high, " Hz")    

    #Plot FFT of output signal
    plot_fft(loudest, frame_rate, -5000, 5000)

    #Write file
    loudest = loudest/np.max(loudest) #normalize to amplidue one
    loudest = loudest.astype(np.float32) #convert to 32-bit float
    wavfile.write(filename[0:-4]+'_filtered.wav', frame_rate, loudest)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号