\ \NoIze/ / Filtering Tool

Last updated: September 11th, 20192019-09-11Project preview

Imgur

Welcome to a NoIze interactive notebook on sound filtering. Here you can access the project's documentation or code repository.

To follow along this demo, headphones are recommended to notice small changes in the signals. (Don't forget to turn down the volume first as you can always turn it back up.)

If you just want to read along and hear some audio, ignore the snippets of code, like the one below. However, I encourage you to fork this notebook so that you can experiment with the examples. You don't have to download or install anything onto your computer. If you don't have an account with 'notebooks.ai', you can create a free one here.

In [ ]:
# install what is required to use NoIze:
!pip install -r requirements.txt
import noize

# what is necessary to play audio files in this notebook:
import IPython.display as ipd
from scipy.io.wavfile import read

Set directories for different audio data

In [2]:
audiodir = './audiodata/'
path2noisy_wavfiles = '{}noisywavs/'.format(audiodir)
path2filtered_wavfiles = '{}filteredwavs/'.format(audiodir)
path2noise_wavfiles = '{}noise/'.format(audiodir)

Wavfile for filtering

In [3]:
noisy_wavfile = '{}can_you_hear_the_rain.wav'.format(path2noisy_wavfiles)
sr, samps_unfiltered = read(noisy_wavfile)
ipd.Audio(samps_unfiltered,rate=sr)
Out[3]:

noize.filtersignal

Use the background noise in signal (default settings)

In [4]:
output_filename1 = '{}filtered_can_you_hear_the_rain.wav'.format(path2filtered_wavfiles)
noize.filtersignal(output_filename1,
                   noisy_wavfile)
sr, samps_filtered = read(output_filename1)
ipd.Audio(samps_filtered,rate=sr)
volume adjusted from 1.25 to 0.33
Wavfile saved under: audiodata/filteredwavs/filtered_can_you_hear_the_rain.wav
Out[4]: