Implement acoustic fingerprinting fallback in shanty-tag #16

Open
opened 2026-03-17 16:34:41 -04:00 by connor · 0 comments
Owner

When online metadata lookup fails (Issue #4), fall back to acoustic fingerprinting to identify tracks. This uses the Chromaprint/AcoustID system to generate a fingerprint from the audio data and look it up in the AcoustID database, which links back to MusicBrainz.

  1. Chromaprint integration — use the chromaprint library (via FFI bindings or a Rust crate if available) to generate acoustic fingerprints from audio files
  2. AcoustID lookup — submit the fingerprint + duration to the AcoustID API to get matching MusicBrainz recording IDs
  3. Integration with existing tag flow — modify the tagging pipeline: try online text search first → if no match, generate fingerprint → look up via AcoustID → retrieve metadata from MusicBrainz using the matched recording ID
  4. Store fingerprints — save generated fingerprints in the database so they don't need to be recomputed

Acceptance Criteria

  • Chromaprint fingerprints can be generated from audio files
  • AcoustID API lookup returns matching MusicBrainz IDs
  • Fingerprinting is used as a fallback when text-based search fails
  • Generated fingerprints are cached in the database
  • CLI flag --fingerprint forces fingerprint-based lookup
  • Works for common audio formats (MP3, FLAC, OGG, OPUS)

Dependencies

  • Issue #4 (online metadata lookup — this extends it)
  • External: chromaprint library must be available on the system (or bundled)
When online metadata lookup fails (Issue #4), fall back to acoustic fingerprinting to identify tracks. This uses the Chromaprint/AcoustID system to generate a fingerprint from the audio data and look it up in the AcoustID database, which links back to MusicBrainz. 1. **Chromaprint integration** — use the `chromaprint` library (via FFI bindings or a Rust crate if available) to generate acoustic fingerprints from audio files 2. **AcoustID lookup** — submit the fingerprint + duration to the AcoustID API to get matching MusicBrainz recording IDs 3. **Integration with existing tag flow** — modify the tagging pipeline: try online text search first → if no match, generate fingerprint → look up via AcoustID → retrieve metadata from MusicBrainz using the matched recording ID 4. **Store fingerprints** — save generated fingerprints in the database so they don't need to be recomputed ### Acceptance Criteria - [ ] Chromaprint fingerprints can be generated from audio files - [ ] AcoustID API lookup returns matching MusicBrainz IDs - [ ] Fingerprinting is used as a fallback when text-based search fails - [ ] Generated fingerprints are cached in the database - [ ] CLI flag `--fingerprint` forces fingerprint-based lookup - [ ] Works for common audio formats (MP3, FLAC, OGG, OPUS) ### Dependencies - Issue #4 (online metadata lookup — this extends it) - External: `chromaprint` library must be available on the system (or bundled)
connor added the LowPriority label 2026-03-19 12:28:30 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Shanty/Main#16