title: How to apply low-pass filter to a sound record on python?
body: <p>I have to reduce white noise from a sound record.Because of that i used fourier transform.But i dont know how to use the fft function's return values which is in frequincy domain.How can i use the fft data to reduce noise?</p>
  
  <p>Here is my code</p>
  
  <pre><code>from scipy.io import wavfile
  import matplotlib.pyplot as plt
  import simpleaudio as sa
  from numpy.fft import fft,fftfreq,ifft
  
  #reading wav file
  
  fs,data=wavfile.read("a.wav","wb")
  
  n=len(data)
  
  freqs=fftfreq(n)
  
  mask=freqs&gt;0
  
  #calculating raw fft values
  fft_vals=fft(data)
  
  #calculating theorical fft values
  
  fft_theo=2*np.abs(fft_vals/n)
  
  #ploting
  
  plt.plot(freqs[mask],fft_theo[mask])
  plt.show()```
  </code></pre>