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

Implement Chromaprint wrapper algorithm #517

Closed
dbogdanov opened this issue Nov 24, 2016 · 7 comments
Closed

Implement Chromaprint wrapper algorithm #517

dbogdanov opened this issue Nov 24, 2016 · 7 comments
Assignees
Milestone

Comments

@dbogdanov
Copy link
Member

dbogdanov commented Nov 24, 2016

Follow Chromaprint API.

Algorithm inputs:

  • vector<StereoSample> audio
  • Real sampleRate

Algorithm output:

  • std::string fingerprint

Related to #474

Convert all values in input from Real to 16-bit int format to be able to use Chromaprint API.

@dbogdanov dbogdanov added this to the 2.1 milestone Nov 24, 2016
@dbogdanov
Copy link
Member Author

If possible, preferred input should be mono (vector<Real>) instead of stereo.

@palonso
Copy link
Contributor

palonso commented Apr 28, 2017

I have the wrapper working in Standard mode. There is a demostration retrieving the Acousticid id from the audio in this gist.
I have noticed that the algorithm is able to retrieve the id by just fingerprinting fragments instead of the full length of the track ( I used 30s segments in my example). So probably for the streaming mode it would be better to write an algorithm that retrieves a fingerprint each analysisSize seconds so it doesn't depend on previous knowledge about the input.

@dbogdanov
Copy link
Member Author

dbogdanov commented May 3, 2017

That looks good. Correct, for the streaming mode we want to analyze on segments, but it would be great to still have an option to analyze on a complete input (if the analysisSize is set to 0).

@dbogdanov
Copy link
Member Author

I guess the computed fingerprint should be concatenable, that is fingerprint(segment1+segment2) = fingerprint(segment1) + fingerprint(segment2). You can check if it is so in the gist.

@palonso
Copy link
Contributor

palonso commented May 4, 2017

There is a problem with that because in order to call the chromaprint api you have to specify the number of samples that it has to analyze. Standard mode is implemented as you say but I don't think it is possible in Streaming mode unless you specify the duration previously as an optional parameter.
I updated the gist with your proposed experiment.
Results suggest that it is possible to concatenate finguerprints and retrieve the AcouisticID key as far you include the proper song duration in the query.

@marv1nnnnn
Copy link

any update on this?

@dbogdanov
Copy link
Member Author

@marv1nnnnn It is implemented in #601. To be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants