Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed README demo to read wav properly #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ See example notebook: [![Open In Colab](https://colab.research.google.com/assets
import noisereduce as nr
# load data
rate, data = wavfile.read("mywav.wav")
data /= 32768
# select section of data that is noise
noisy_part = data[10000:15000]
# perform noise reduction
reduced_noise = nr.reduce_noise(audio_clip=data, noise_clip=noisy_part, verbose=True)
reduced_noise = nr.reduce_noise(audio_clip=data.flatten(), noise_clip=noisy_part.flatten(), verbose=True)

# To store this as a wav again, reshape reduced_noise into the same as data had.
```

### Arguments to `noise_reduce`
Expand Down