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

hop_length not working #55

Open
cparcerisas opened this issue Nov 3, 2021 · 2 comments
Open

hop_length not working #55

cparcerisas opened this issue Nov 3, 2021 · 2 comments

Comments

@cparcerisas
Copy link

If I add hop_length parameter to the noise_reduce function, it gives an error:

`
import numpy as np
import noisereduce as nr

This works

nfft = 512
fs = 8000
signal = np.loadtxt('signal.csv')
nr.reduce_noise(y=signal, sr=fs, n_fft=nfft, win_length=nfft)

This does not work

nfft = 512
fs = 8000
signal = np.loadtxt('signal.csv')
nr.reduce_noise(y=signal, sr=fs, n_fft=nfft, win_length=nfft, hop_length=100)
`
I tried with different values and it always gives the same error:

AttributeError: 'SpectralGateNonStationary' object has no attribute '_hop_length'

signal.csv

@skol101
Copy link

skol101 commented Feb 18, 2022

Same error here.

@timsainb
Copy link
Owner

I found the issue: https://github.com/timsainb/noisereduce/compare/master...fix-hop-length?quick_pull=1

I'll pull this into the python package asap

timsainb added a commit that referenced this issue Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants