I am a new to audio processing . I want to develop an application that reduces audio noise using a Butterworth filter. I found some existing code doing this, but I still do not understand the use of 2 filters (low and high pass filter) in a reversed order. What I know from my experience, the high pass filter will eliminates the low frequency samples, so there is no need to apply the low pass filter.

The code begins with :

b,a = scipy.signal.butter(5, 1100/(Frequency/2), btype='highpass') # ButterWorth filter highpass
filteredSignal = scipy.signal.lfilter(b,a,NewSound) # Applying the filter to the signal

and ends with:

c,d = scipy.signal.butter(5, 100/(Frequency/2), btype='lowpass') # ButterWorth low-filter
newFilteredSignal = scipy.signal.lfilter(c,d,filteredSignal) # Applying the filter to the signal

You probably meant to reverse them: The LPF should be at 1100 Hz, and the HPF should be at 100 Hz. Then you're keeping everything between 100 Hz and 1100 Hz, and throwing away lower and higher frequencies.

will eliminates the low frequency samples

Also remember filters don't eliminate everything in the stopband, they drop off with frequency, so some of the content outside the bands will still exist.

It will eliminate 0 Hz, but other frequencies will only be attenuated, not eliminated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.