Skip to content

Instantly share code, notes, and snippets.

@AIAnytime
Created July 17, 2022 04:25
Show Gist options
  • Save AIAnytime/d06094c58be5ae75755cbcaa6263071f to your computer and use it in GitHub Desktop.
Save AIAnytime/d06094c58be5ae75755cbcaa6263071f to your computer and use it in GitHub Desktop.
Noise is inevitably present in almost all acoustic environments. Even when recorded with a microphone, a speech signal will contain lots of noise, such as white noise or background sounds. Excessive noise can distort or mask the characteristics of s
import noisereduce as nr
from scipy.io import wavfile
# load data
rate, data = wavfile.read("voice_with_noise.wav")
# perform noise reduction
reduced_noise = nr.reduce_noise(y=data, sr=rate) It was originally published on https://www.apriorit.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment