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

Never completes. #71

Open
cocode opened this issue Aug 21, 2022 · 5 comments
Open

Never completes. #71

cocode opened this issue Aug 21, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@cocode
Copy link

cocode commented Aug 21, 2022

Hi -

Even when using the "Simplest usage" code, it never returns, until it throws a signal 10+ minutes later, on a twenty-second wav file.

Does this require linux? (I'm on a mac), or some particular version of python? (I'm using 3.10).

Currently, it does not work for me, at all.

@cocode
Copy link
Author

cocode commented Aug 21, 2022

Hmm. I tried several files wav files, and found one that did complete. The others are valid, and play on multiple players. What are the requirements for a .wav file to work with noisereduce?

@timsainb
Copy link
Owner

timsainb commented Aug 25, 2022 via email

@ryanopily
Copy link

ryanopily commented Sep 29, 2022

Try this

`
from scipy.io import wavfile
import noisereduce as nr
import numpy as np

rate, data = wavfile.read("file.wav")
nframes, nchannels = data.shape
reduced_data = nr.reduce_noise(y=data.reshape(nchannels, nframes), sr=rate)
wavfile.write("file.wav", rate, reduced_data.reshape(nframes, nchannels))
`

Btw, I ran into this problem with WAV files with more than 1 channels (8 in my case)

@enn-nafnlaus
Copy link

Ryan: your solution works for me too.

@timsainb
Copy link
Owner

The channels and samples are just transposed in these cases, we could catch this by raising an error if there are more than say 1000 channels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants