chromaprint-next
A pure-Rust, drop-in replacement for Chromaprint, the audio fingerprinting library used by AcoustID.
Produces bit-identical fingerprints to the C reference implementation across all five algorithm variants.
Faster than C — outperforms the C reference library by ~4% (269 vs 258 Melem/s at 120s), even though the C version uses Apple's hardware-optimised Accelerate/vDSP for FFT.
Usage
Add to your Cargo.toml:
[]
= "0.1"
One-shot fingerprinting
use ;
let samples: = todo!;
let result = fingerprint_audio.unwrap;
let encoded = result.encode; // compressed base64 string
let hash = result.hash; // SimHash for quick comparison
Streaming API
use ;
let mut fp = new;
fp.start.unwrap;
// Feed audio in chunks
// fp.feed(&chunk).unwrap();
fp.finish.unwrap;
let raw = fp.fingerprint; // &[u32] sub-fingerprints
let encoded = fp.encode; // compressed base64 string
let hash = fp.hash; // SimHash
Decode existing fingerprints
use decode_fingerprint;
let = decode_fingerprint.unwrap;
Features
[]
= { = "0.1", = ["parallel"] }
License
Most of this crate is licensed under the MIT License. The resampler module (src/audio/resample.rs) is a port of FFmpeg's av_resample and is licensed under LGPL-2.1-or-later.
The combined work is therefore licensed as MIT AND LGPL-2.1-or-later.