python - How to remove the noise from wave file -


i have sound file, apply high frequency filter

   import wave     import scipy.io.wavfile wav    import numpy np    import scipy sp    origaudio = wave.open('3734.wav','r')    framerate = origaudio.getframerate()    nchannels = origaudio.getnchannels()    sampwidth = origaudio.getsampwidth()    nbframe=origaudio.getnframes()    da = np.fromstring(origaudio.readframes(framerate), dtype=np.int16)    left, right = da[0::2], da[1::2]    b, = signal.butter(2, 0.03,btype='highpass', analog=false)    left = signal.filtfilt(b, a, left)    hann = np.hanning(len(left))    l,f=np.fft.rfft(left*hann), np.fft.rfft(right)    plt.xscale('log')    plt.xlabel('frequency [hz]')    plt.ylabel('|magnitude|')    plt.plot(np.abs(l)) 

i obtain

enter image description here

however want remove noise signal , abtain peaks.thanks


Comments