This code is taken from a pitch detection algorithm. It is called before pitch detection to remove low-frequency noises.
def highpass_filter(y, sr): filter_stop_freq = 70 # Hz filter_pass_freq = 100 # Hz filter_order = 1001 # High-pass filter nyquist_rate = sr / 2. desired = (0, 0, 1, 1) bands = (0, filter_stop_freq, filter_pass_freq, nyquist_rate) filter_coefs = signal.firls(filter_order, bands, desired, nyq=nyquist_rate) # Apply high-pass filter filtered_audio = signal.filtfilt(filter_coefs, , y) return filtered_audio
I have trouble understanding what the parameters
filter_order mean. I have read this but it did not help me.