title: Apply a high-pass filter to a WAV file with scipy.signal.firwin
body: <p>I'm trying to apply a high-pass filter (cutoff: 1000 Hz) to a mono 16-bit 44.1 Khz WAV file with <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.firwin.html" rel="nofollow noreferrer"><code>scipy.signal.firwin</code></a>:</p>
  
  <pre><code>from scipy.io import wavfile
  from scipy import signal
  import numpy as np
  
  sr, x = wavfile.read('test.wav')      # 16-bit mono 44.1 khz
  
  b = signal.firwin(5, cutoff=1000, fs=sr, pass_zero=False)
  
  x = signal.lfilter(b, [1.0], x)
  
  wavfile.write('test2.wav', sr, x.astype(np.int16))
  </code></pre>
  
  <p>The result is totally similar to the input (but not exactly equal), i.e. no high-pass has been applied. </p>
  
  <p><strong>What should I modify to make this high-pass with <code>firwin</code> work?</strong></p>