haudiotagger_fingerprint 0.3.0
haudiotagger_fingerprint: ^0.3.0 copied to clipboard
Perceptual audio fingerprinting for Flutter. Identify and compare recordings by content - duplicate detection, library cleanup, song matching. Powered by Rust.
0.3.0 #
Bug Fixes #
- Breaking: the public
AudioFingerprinttype is now the shared DTO fromhaudiotagger_interface(converted internally) instead of the FRB-generated twin, so importinghaudiotaggerandhaudiotagger_fingerprinttogether no longer collides withambiguous_import. No behavior change; re-runflutter pub get, no code changes needed unless you referenced the FRB type directly
0.2.0 #
Features #
- Cooperative cancellation for long scans:
CancellationToken.create()/cancel()/dispose(), passable tofingerprintandfingerprintFromBytes; tripped tokens abort withFingerprintError.cancelled. One token per scan; cancel/dispose are idempotent - Non-blocking execution: fingerprint calls are now truly async — background threads on native, cooperative yields between decode chunks on web. Public Dart signatures unchanged (still
Future-based)
Platform Notes #
- On web the calls share the main thread cooperatively (yields ~every second of audio); for bulk scans prefer short clips or native. No extra setup needed — no worker pool involved
similaritystays synchronous: it compares small in-memory vectors in microseconds, no token needed
0.1.4 #
Bug Fixes #
- Fixed macOS/iOS Swift Package Manager resolution: the vended library product is now
haudiotagger-fingerprint(hyphenated, as flutter_tool requires — underscores are illegal in the derived CFBundleIdentifier), while package and target names stay unchanged
0.1.3 #
Bug Fixes #
- Fixed web
DataCloneErrorwhen used alongsidehaudiotagger: plain functions ran on FRB's worker pool, whose bootstrap hardcodes thewasm_bindgenJS global. All three API functions are now#[frb(sync)]— they execute on the calling thread with no pool, no workers, and no shared-memory hand-off. Public Dart API unchanged (stillFuture-based)
0.1.2 #
Bug Fixes #
- Fixed web content-hash mismatch when used alongside
haudiotagger: both plugins' wasm-bindgen glue declared the same top-levelwasm_bindgenglobal, so one plugin talked to the other's wasm. This package now uses a uniquewasm_bindgen_haudiotagger_fingerprintglobal (wasm_bindgen_name+ renamed glue; publish workflow applies the rename on every build)
0.1.1 #
Bug Fixes #
- Fixed Linux/Windows builds: native registrant headers and symbols now match what flutter_tool generates from
pluginClass(haudio_fingerprint_plugin.h,HaudioFingerprintPluginCApiRegisterWithRegistrar) - Fixed
Haudiotagger.fingerprint()on web throwing "no backend registered": the web plugin registrant never callsdartPluginClass, so the web plugin class now registers the backend itself - Fixed source builds resolving the wrong Rust output name in
apply_cargokit
0.1.0 #
Features #
- New
HaudioFingerprint.fingerprint(path)API for perceptual audio fingerprinting via file path - New
HaudioFingerprint.fingerprintFromBytes(bytes)API for web/WASM and in-memory audio - New
HaudioFingerprint.similarity(a, b)(plussimilarityTo) returning a0.0–1.0content-match score - Chromaprint-compatible fingerprints (
preset_test2, same algorithm as fpcalc/AcoustID) - Pure-Rust stack (Symphonia + rusty-chromaprint): no C dependencies, builds on all platforms including WASM
- Federated backend:
FingerprintBackendImplplusHaudioFingerprintBackend.registerWith, self-registering viadartPluginClass— installing this package wiresHaudiotagger.fingerprint()with no imports or init calls
Dependencies #
symphonia 0.6for audio decoding (MP3, FLAC, Ogg Vorbis, WAV, AIFF, M4A/AAC/ALAC)rusty-chromaprint 0.3for fingerprint calculation and comparisonflutter_rust_bridge =2.13.0for the Dart FFI bridgehaudiotagger_interface ^0.1.0(pure-Dart contract, zero native weight)
Platform Notes #
- Decodable formats: MP3, FLAC, Ogg Vorbis, WAV, AIFF, M4A/AAC/ALAC
- Not decodable: Opus, APE, WavPack, Musepack (no pure-Rust decoder)
- Independent package: separate Dart package, Rust crate, native libraries, and plugin classes
Haudiotagger.fingerprint()(requireshaudiotagger ^2.2.0) throws a helpfulStateErrorwhen this package is not installed