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

Comparing short audio files #201

Open
galarlo opened this issue Jan 6, 2023 · 6 comments
Open

Comparing short audio files #201

galarlo opened this issue Jan 6, 2023 · 6 comments

Comments

@galarlo
Copy link

galarlo commented Jan 6, 2023

Hi,
I'm interested in finding near-duplicate audio files. My dataset is about 3000 thousands short audio files, between 0.5 seconds to 5 seconds. Unlike Shazam, both the "target" audio (i.e. the songs in Shazam's case) and the user input are short, and both might contain noise.

Can this library help?
If so, are there any recommendations for tuning parameters?

N.B - if a file is matched to multiple other files, it's fine - I have a less efficient algorithm that can verify which match is correct. In other words, I can handle some amount of false positives, but I don't want false negatives.

@timotech
Copy link

timotech commented Jan 8, 2023

Well, I'm not the creator of the library, but 0.5 seconds to 5 seconds is quite small, you will have to try it and check your results. But generally, I believe the library should be able to help resolve your issue.

@galarlo
Copy link
Author

galarlo commented Jan 9, 2023

@timotech thanks for the response.

Do you have any recommendations on configuration tuning?

@timotech
Copy link

Normally you specify the number of seconds in the line below:
config.ResultEntryFilter = new TrackMatchLengthEntryFilter(2d);

Where 2d is 2 seconds. Meaning, it should match any sound from when it sees a match around 2 seconds into the song or sound. You can read more here: https://github.com/AddictedCS/soundfingerprinting/wiki/Save-fingerprints-and-identify-tracks
and here: https://github.com/AddictedCS/soundfingerprinting/wiki/Realtime-Query-Command
I think you can try the 0.5 seconds in that configuration, but I've not tried it.

@jeffward01
Copy link

One idea is to find your smallest file, and then multiply it by the number of times to get to seconds. So if your file is (1) second, you'd need to duplicate the file so it is (2) seconds, the caveat is this must be applied to all tracks.

There are pitfalls to this solution of course, but it is a workaround and maybe it will work, or perhaps with your type of tracks it wornt work.

@AddictedCS - There has not been much activity on this, I think we can close it if @galarlo does not reply

@galarlo
Copy link
Author

galarlo commented May 20, 2023

@jeffward01 I assumed it doesn't work with short files because there isn't enough data for the algorithm to do it's magic.
If that's right, I don't see how repeating the data will help.
What am I missing?

@jeffward01
Copy link

jeffward01 commented May 20, 2023 via email

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