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

How do I iterate over an audio file to not miss a part that fits a class? #47

Open
ErfolgreichCharismatisch opened this issue May 13, 2019 · 2 comments

Comments

@ErfolgreichCharismatisch

I have an audio file that contains a part that matches a class I trained, for instance the letter R in a speech.

I would set an arbitrary length, like 20ms. Then I would split the audio file in 20ms intervals, send each to predict_class and take the part where the probability for my class is the highest. Yet with this method I could be exactly at the corner of the wanted area, it could be stretched(longer than the original file) etc..

How do I iterate over the audio file to not miss it?

@drscotthawley
Copy link
Owner

Hi. That's not a use case that I considered, so there's nothing in the code to support that sort of thing. You'd have to write some more custom code, and I'm not sure what the best approach for that would be.

You might want to pre-process the data with an onset detector / segmentation tool. ('Course if you do that, then it might already do the classification for you.)

@ErfolgreichCharismatisch
Copy link
Author

ErfolgreichCharismatisch commented May 13, 2019

Great idea. I am using https://aubio.org/download for this, they created a tool called aubioonset, which does this fairly precisely. Now I need an "offset" algorithm to stop at silence. But this approach might be the most precise one....

Course if you do that, then it might already do the classification for you

aubio does not do classification in a way that lets you get raw data, unfortunately.

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