yes Mirage is also usable as a standalone library. If you look at the
source code you can see a Test/ directory, which includes a short Test
program and actually does what you want.
Concerning duplicates -- I guess Mirage could be easily used to identify
duplicates, but for real duplicate detection audio-fingerprinting should
be applied.
greetings,
dominik.