jhurliman / node-echoprint-server

A node.js implementation of the Echoprint music identification server
74 stars 37 forks source link

No partial matching? #13

Closed oleander closed 9 years ago

oleander commented 9 years ago

I took a look at the implementation and only saw full fingerprint matching against the database, no partial matching. That that would mean that the echoprint client have to generate an exact replica of the fingerprints already existing in the database, or I'm I wrong?

  var sql = 'SELECT track_id,COUNT(track_id) AS score ' +
    'FROM codes ' +
    'WHERE code IN (' + fpCodesStr + ') ' +
    'GROUP BY track_id ' +
    'ORDER BY score DESC ' +
    'LIMIT ' + rows;
jhurliman commented 9 years ago

Echoprint's audio fingerprints are composed of lots of small hashes ("codes") representing only a few hundred milliseconds of audio. That SQL query you pasted is counting the number of matching codes grouped by track, where the track with the most code matches would be considered the closest match.

oleander commented 9 years ago

Aha, I get it. Thanks for your respons.