worldveil / dejavu

Audio fingerprinting and recognition in Python
MIT License
6.41k stars 1.43k forks source link

dejavu to find position in the song #43

Closed isdito closed 10 years ago

isdito commented 10 years ago

Hello.

If I not need to find the song, but I need to find the point in miliseconds with a offset of a song. It is posible with our library?

You know the music that are playing and you like continue in your mobile in the point.

Thank you. Sorry my bad english

worldveil commented 10 years ago

Sure. Just fingerprint the audio file, and then match it. You'll get back the offset into the song as an integer. This offset is a mutliplier of

1.0 / DEFAULT_FS * DEFAULT_WINDOW_SIZE * DEFAULT_OVERLAP_RATIO 

in seconds. You can set these settings to be whatever you like in fingerprint.py, though be aware that will change your accuracy assumptions. From this calculation, you gain granularity dependent on these variables for the offset at which you matched.

Be aware as you are matching the audio of course is still continuing to play, presumably. You'll have to account for that as well.

isdito commented 10 years ago

Thank you . I will check that you said me.