Autotag: identify tracks by audio fingerprint (Chromaprint + AcoustID) #96

Open
opened 2026-08-18 20:37:45 +00:00 by yonlu · 0 comments
Owner

Identify a track by what it sounds like rather than by what its tags claim. Chromaprint generates a fingerprint, AcoustID maps that to MusicBrainz recording MBIDs, and the existing autotag machinery takes it from there.

Salvaged from section 5.2 of docs/dev/roadmap.md, which is deleted — every other part of its MusicBrainz phase has shipped.

Why it is worth having

The autotagger currently matches on metadata: normalized titles, track counts, durations. That works well on a library whose tags are approximately right and not at all on the case that most needs help — a folder of track01.mp3 with no tags at all, where there is nothing to match on. Fingerprinting is the only thing that answers those, and they are exactly the albums a user cannot fix by hand.

It also raises confidence on the ambiguous cases the scorer refuses to auto-accept: a bonus-track edition and its plain pressing have the same titles and nearly the same durations, and different recordings.

The seam already exists

#91 proposes type Identifier interface { Identify(path) ([]Candidate, error) } with MetadataIdentifier as the v1 implementation, explicitly so that an AcoustIDIdentifier is a new implementation rather than a rewrite of the call sites. This issue is the reason that seam is worth building — the argument in #91 says the interface is speculative generality unless fingerprinting is actually wanted. If this is wanted, it is not.

The cost to weigh first

Chromaprint is a C library. This project has spent real effort staying off cgo — cmd/indexbuild and cmd/indexexport build with CGO_ENABLED=0 so they need no GTK, and the SQLite driver is modernc's pure-Go one. The options are bundling the fpcalc binary and calling it (which keeps that property, at the cost of shipping a binary per platform and a packaging change in four recipes), or cgo bindings (which do not). fpcalc is what Picard itself ships.

An AcoustID API key is also required, and it is per-application.

Done when

A folder of untagged files can be identified and tagged, and the autotag confidence for an ambiguous edition improves rather than merely being another opinion.

Identify a track by what it *sounds like* rather than by what its tags claim. Chromaprint generates a fingerprint, AcoustID maps that to MusicBrainz recording MBIDs, and the existing autotag machinery takes it from there. Salvaged from section 5.2 of `docs/dev/roadmap.md`, which is deleted — every other part of its MusicBrainz phase has shipped. ## Why it is worth having The autotagger currently matches on metadata: normalized titles, track counts, durations. That works well on a library whose tags are approximately right and not at all on the case that most needs help — a folder of `track01.mp3` with no tags at all, where there is nothing to match *on*. Fingerprinting is the only thing that answers those, and they are exactly the albums a user cannot fix by hand. It also raises confidence on the ambiguous cases the scorer refuses to auto-accept: a bonus-track edition and its plain pressing have the same titles and nearly the same durations, and different recordings. ## The seam already exists #91 proposes `type Identifier interface { Identify(path) ([]Candidate, error) }` with `MetadataIdentifier` as the v1 implementation, explicitly so that an `AcoustIDIdentifier` is a new implementation rather than a rewrite of the call sites. **This issue is the reason that seam is worth building** — the argument in #91 says the interface is speculative generality unless fingerprinting is actually wanted. If this is wanted, it is not. ## The cost to weigh first Chromaprint is a C library. This project has spent real effort staying off cgo — `cmd/indexbuild` and `cmd/indexexport` build with `CGO_ENABLED=0` so they need no GTK, and the SQLite driver is modernc's pure-Go one. The options are bundling the `fpcalc` binary and calling it (which keeps that property, at the cost of shipping a binary per platform and a packaging change in four recipes), or cgo bindings (which do not). `fpcalc` is what Picard itself ships. An AcoustID API key is also required, and it is per-application. ## Done when A folder of untagged files can be identified and tagged, and the autotag confidence for an ambiguous edition improves rather than merely being another opinion.
yonlu added the Platform/DesktopKind/Feature
Priority
Low
4
Area/Metadata
labels 2026-08-18 20:37:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#96