Live data from Hacker News

Dejavu: Audio fingerprinting and recognition in Python

github.com

21–27 of 27 posts

Re: Dejavu: Audio fingerprinting and recognition in Python

#21

Hey! Creator here. Awesome to see this get posted and people excited about the project. I made a cool writeup about it here: http://willdrevo.com/fingerprinting-and-audio-recognition-wi... It's a great little library for doing audio recognition, stream radio advertisement verification, and all sorts of interesting people email about all the time that I never would have thought of. It's certainly not as speedy as Echo…

Great work! Thanks for open sourcing this - its very educational.

At the moment I'm using it to process a few hundred gigs of song files that I've collected as a big furry hairball of a mess over the years - something about having multiple iPods and MP3 players over the years, and not really doing very good house-keeping in the move from one to the other (and avoiding things like iTunes where possible) has meant that I have a lot of files that may have duplicate songs in them - but the filenames and organization doesn't necessarily reflect that fact.

So I'm using dejavu right now to clean this up .. I'm assuming you'd be happy to have a "find_duplicates.py" script added - if so, I'll let you know as soon as I have one working .. ;)

Thanks again!

Re: Dejavu: Audio fingerprinting and recognition in Python

#22
post #21

Hey! Creator here. Awesome to see this get posted and people excited about the project. I made a cool writeup about it here: http://willdrevo.com/fingerprinting-and-audio-recognition-wi... It's a great little library for doing audio recognition, stream radio advertisement verification, and all sorts of interesting people email about all the time that I never would have thought of. It's certainly not as speedy as Echo…

Great work! Thanks for open sourcing this - its very educational. At the moment I'm using it to process a few hundred gigs of song files that I've collected as a big furry hairball of a mess over the years - something about having multiple iPods and MP3 players over the years, and not really doing very good house-keeping in the move from one to the other (and avoiding things like iTunes where possible) has meant that…

Glad to see it's working well for you!

I'd be curious as well to see how the performance holds up getting into the terabytes as I haven't tested that. Remember too that there are a lot of parameters for the matching algorithm here (https://github.com/worldveil/dejavu/blob/master/dejavu/finge...) which allow you to trade off accuracy, speed, and storage in different ways. I've tried to document it throughly.

Finding duplicates is a great one! Actually generating a checksum for each audio file (minus the header and ID3 tags) and adding this as a column in the songs table for all the different filetypes Dejavu supports (mp3, wav, etc) would probably be the best way to do this.

I say this because so many songs today are built on sampling. Mashups and EDM music often samples from other work, and as such, the fingerprints and their alignment can be shared across different songs. Something more clever like seeing the percentage of hashes by song that are the same and comparing to a threshold might do the trick, though.

Happy hacking, and feel free to send in a PR! :)

Re: Dejavu: Audio fingerprinting and recognition in Python

#24
Surprised nobody has mentioned MusicBrainz, it's the free and open source music fingerprinting database which powers the Picard, Jaikoz, Beets, etc taggers. They have been doing audio fingerprinting for years, you can download the DB or access it via a web API. The author's solution may work quite well with small number of entries to match against, but I suspect the match rate goes down significantly when lookup is against hundreds of thousands or millions of other fingerprints.

https://wiki.musicbrainz.org/Fingerprinting

Re: Dejavu: Audio fingerprinting and recognition in Python

#25

Surprised nobody has mentioned MusicBrainz, it's the free and open source music fingerprinting database which powers the Picard, Jaikoz, Beets, etc taggers. They have been doing audio fingerprinting for years, you can download the DB or access it via a web API. The author's solution may work quite well with small number of entries to match against, but I suspect the match rate goes down significantly when lookup is a…

Audio fingerprinting as used by MusicBrainz is a little different concept. Because it doesn't have the need to match short phone-recorded samples, we can use more efficient algorithms for both the fingerprinting and their matching. It's usually not the match rate that goes down when dealing with a large database, but the false match rate that goes up. And of course performance. Those were my two main things to worry about when I was working on AcoustID (the current fingerprinting technology used by MusicBrainz).

Re: Dejavu: Audio fingerprinting and recognition in Python

#26

Fingerprinting is fine; but the actual value would come from a large database of all sorts of fingerprints, so it could be used to identify songs, snippets, movies, etc.

That's certainly useful, and what Echoprint and MusicBrainz have tried to do.

Unfortunately, many fingerprinting use cases require hashing at different granularities (ie, FFT windows), or need different collision guarantees to trade off space vs. accuracy and so on and so forth.

A perfect example is throwing away part of the SHA-1 hash of a fingerprint. You lose some entropy, but you become more space efficient.

Thus in many cases, while the core algorithm might be the same, the parameters and constraints of the individual use case often mean that the fingerprints themselves aren't universal in size or format.

Re: Dejavu: Audio fingerprinting and recognition in Python

#27

Rather then just fingerprinting recorded audio can this thing fingerprint words and passphrases that the user just says outloud?

You can use CMUSphinx http://cmusphinx.sourceforge.net for keyphrase verification. For example you can find Android demo for keyphrase spotting at http://cmusphinx.sourceforge.net/wiki/tutorialandroid
Post reply on HN