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

[line 253:] segment returns a empty list when a sound file has too short attack time. #2

Open
albincorreya opened this issue May 19, 2017 · 3 comments

Comments

@albincorreya
Copy link

albincorreya commented May 19, 2017

Got the following error when I tried to compute timbral_hardness for the following sound. I suspect it's because the sound has too short attack time.

http://freesound.org/people/ShawnyBoy/sounds/165394/

ERROR :
line 253, in timbral_hardness
segment /= float(max(segment))
ValueError: max() arg is an empty sequence

To confirm I tried to print the values of segment and found out one of the segments is an empty list for this sound. I tried to add a condition to ignore the block if there is an empty sequence but couldn't solve it and not quite sure how to optimise the code for this use case

@AndyP103
Copy link
Collaborator

Thanks for pointing this out, I'll patch this when I do the next update in a few weeks.

@AndyP103
Copy link
Collaborator

I've recently updated the hardness model, fixing a few of the bugs that may have been causing this behaviour.

@albincorreya
Copy link
Author

Nice ! By the way @AndyP103 , I had used this model to create a demo prototype. You can find at https://github.com/albincorreya/PerceptualSoundBrowser in case interested.

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