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

ValueError: zero-size array to reduction operation minimum which has no identity #319

Open
nsrao98 opened this issue Jul 10, 2023 · 3 comments

Comments

@nsrao98
Copy link

nsrao98 commented Jul 10, 2023

I get "ValueError: zero-size array to reduction operation minimum which has no identity" error when I try to calculate T60 for impulse response using pyroomacoustics.experimental.rt60.measure_rt60 . The issue arises while calculating i_decay from rt60.py in line 77 of measure_rt60 function .i.e. while executing this line "i_decay = np.min(np.where(-5 - decay_db - energy_db > 0)[0])" . It would be of great help if I get to know how to resolve this issue.

@fakufaku
Copy link
Collaborator

Hi @nsrao98 , I have seen this issue before. The RT60 computation has a parameter of how much decay to use to estimate the RT60. The default is decay_db=60, which requires a fairly long response.
You could try to set the value to 30 or 20 dB for example.
Ideally, the method should be more robust... 😓

@nsrao98
Copy link
Author

nsrao98 commented Jul 11, 2023

Hi @fakufaku, I want to calculate RT60. So, decay_db=60 is the value I need. Setting it to 30 or 20dB won't give me RT60 value, right?

@fakufaku
Copy link
Collaborator

It will, the routine just uses a interval with decay of decay_db to do the fit and extrapolates the time to a decay of 60 dB.

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

2 participants