Acoustid fingerprinter 0.5.1 released

A new version of the Acoustid fingerprinter has been released. It’s contains just one small bug fix regarding compatibility with Qt 4.8. The official binaries for version 0.5 are not affected by this bug, so this is a source-only release.

Download:

Posted in Acoustid, Announce | Tagged , , | Leave a comment

Acoustid fingerprinter 0.5 released

A new version of the Acoustid fingerprinter has been released. The version adds support for Unicode file names on Windows, reading 24-bit audio file formats and can parse MBID tags from MP3 files written by foo_musicbrainz.

Download:

Changes since version 0.4:

  • Unicode filename support on Windows.
  • Support for 24-bit sample formats.
  • Reading MBID tags from foobar2000-written MP3 files.
  • Added .desktop file for Linux.
Posted in Acoustid, Announce | Tagged , , | 1 Comment

Chromaprint 0.6 released

A new version of Chromaprint has been released. As with the previous version, the core library hasn’t changed much. The fpcalc utility now supports 24-bit sample formats and by default calculates fingerprints using the first 2 minutes of audio. The Python bindings previously included in Chromaprint have been moved to a separate library, pyacoustid.

Download:

Changes since version 0.5:

  • Support for 24-bit file formats in fpcalc.
  • The fpcalc utility now uses 120 seconds of audio data by default.
  • Python bindings moved to a separate project (pyacoustid).
Posted in Acoustid, Announce | Tagged , , | 1 Comment

Inside the Acoustid server

Time flies really fast. It’s been over a year ago since I first released the server code for Acoustid. Back then, Acoustid was just an experiment, but the project is becoming more and more visible and these days it’s serving between 500k and 600k lookups every day.

What makes me more happy than that the project is being useful is that the decisions I’ve made regarding the server architecture turned out to work very well and the server generally very fast and scalable. The average lookup processing time is around 60ms and I expect the number to go down, not up in the future.

As the post about Chromaprint says, the audio fingerprints used in Acoustid are basically vectors of numbers. For performance reasons on the client side, applications are now calculating these fingerprints only from the first two minutes of audio files. That means that when the server scores the results, it only considers the first two minutes of audio. If two tracks have the same intro that is over two minutes long and then they get different, Acoustid will unfortunately see them as the same. This doesn’t cause too many practical problems though. The MusicDNS service that MusicBrainz currently supports also use only the first two minutes.

Before scoring the results, the server must somehow get the results in the first place, and this is where normally things get slow. The database currently has more than 10M fingerprints. If we assume all fingerprints have at least two minutes (which means 948 numbers per fingerprint), that’s 9480M numbers to search in. Just saving these numbers on disk, together with the pointers to the fingerprints they come from, would require 76GB of space. And since the search must be fast, the data must fit in RAM. This is obviously not the way to go if we want to be able to host the service on a single server and yet get response times below 100ms. The search space must be reduced.

Because Acoustid is meant to be used for file identification, I don’t necessarily need to search anywhere in the fingerprint. I know that the fingerprints I get are from the start of the song, I know that if the two fingerprints are similar enough, they must match across the whole length and I can assume that they also must match a specific (smaller) part. So even though the original fingerprints are two minutes long, I decided to search only in the part between 0:10 and 0:25.

The sub-fingerprints that cover these 15 seconds are stored in the Acoustid index database. Whenever I search for a fingerprint, I extract the 15 seconds long sub-fingerprint (“query”) and send it to the index server. The server returns a list of matching fingerprint IDs (“candidates”). These candidates represents fingerprints that might match the original fingerprint, but to not necessarily have to, because all I know about them is that they matched the extracted 15 seconds long query.

The next step is to take these candidates and compare them against the original fingerprint. This is done in PostgreSQL, where the full fingerprints are stored. Each of the candidates is compared against the original fingerprint using a function that tries to align the two fingerprints and then calculates the bit-error-rate between the overlapping parts. The result of this function is a score between 0 and 1. Fingerprints with the score above a certain threshold are considered valid matches, MusicBrainz metadata is looked up for them, they are returned to the user and that’s the end of it.

The whole process looks something like this:

This covers the searching side of the server. I’ll try to write another post soon about the data management side (importing, merging, etc).

Posted in Acoustid | Tagged , | 4 Comments

AcoustID server release

I guess it’s time for AcoustID to have release notes when something gets released, so here is my first AcoustID server release blog post.

Some time ago I added overall search statistics. This release adds similar statistics for individual applications. For example:

Of course, these statistics are only available to the owners of the applications.

Another change related to external application support is that the submission API call now accepts a new parameter clientversion. This is the first step to allowing a single application API key to be used by multiple versions of the application. In following releases I’ll be changing the API key structure to allow applications to have a number of API keys that can be disabled/enabled any time.

Posted in Acoustid, Announce | Tagged , | Leave a comment