Repository navigation
Audio Services
The SoundFingerprinting library decodes audio samples (or video frames) from the underlying media file as the first step in the processing pipeline. It has to extract AudioSamples for audio fingerprints (or Frames for video fingerprints).
The decoding is done by instances of the following interfaces that you can specify in the UsingServices method overload during fingerprint creation or querying:
-
IAudioService- used for audio fingerprinting.SoundFingerprintingAudioServiceFFmpegAudioService-
NAudioService(deprecated, separate package) -
BassAudioService(deprecated, separate package)
-
IVideoService- used for video fingerprinting.FFmpegAudioService
-
IMediaService- used for both audio and video fingerprinting.FFmpegAudioService
-
IRealtimeMediaService- used by the realtime query command to read a stream URL in chunks.FFmpegAudioService
If neither of these implementations meets your requirements (i.e., none of the classes can decode file formats specific to your use case), you can implement your own class and use it in the processing pipeline.
-
SoundFingerprintingAudioServicecomes bundled with the core SoundFingerprinting library. It supports only WAV files at the input. This implementation is known to alias the audio signal during downsampling. You can use this implementation only in testing environments. It is supported in any OS and is MIT-licensed. -
FFmpegAudioServicecomes bundled with SoundFingerprinting.Emy package.FFmpegAudioServiceis also the only currently supported service that can be used to read video files, providing the ability to fingerprint video frames and audio samples. Best suited for the production environment due to speed and accuracy. It provides ways to read audio from any format that is supported by FFmpeg (that is almost any known format). It is also able to extract audio tracks directly from video files, and to read live streams (HLS, Icecast, RTMP, MPEG-TS, RTSP) chunk by chunk for the realtime query command.FFmpegAudioService.SupportedFormatslists the demuxers of the FFmpeg build that was loaded. To useFFmpegAudioServiceyou need to have it installed on the machine that fingerprints the files:- Windows - download the FFmpeg shared build for x64 that matches the version matrix below from gyan.dev and place the DLLs alongside your executable in the folder
FFmpeg\bin\x64. ForSoundFingerprinting.Emy14.x, 15.x and 16.x that is an 8.x build; for 17.x it is a 9.x build. Use the full shared build: it includes libsoxr, whichFFmpegAudioServicerequires for resampling. - Debian 12 -
apt-get install ffmpeg(only supported withSoundFingerprinting.Emyv9.x) - Debian 11 -
apt-get install ffmpeg(only supported withSoundFingerprinting.Emyv8.x) - Alpine -
apk add ffmpeg(verify withffmpeg --versionwhich version is installed). - MacOS -
FFmpegAudioServiceresamples with the SoXR engine, so the FFmpeg build must includelibsoxr. The Homebrew coreffmpeg(9.x) andffmpeg@8formulae no longer include it, so for current versions build FFmpeg from the homebrew-ffmpeg tap:-
SoundFingerprinting.Emyv17.x (FFmpeg 9):brew uninstall --force ffmpeg # only if the core formula is installed brew tap homebrew-ffmpeg/ffmpeg brew trust homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-libsoxr ffmpeg -buildconf | grep -c soxr # must print 1
-
SoundFingerprinting.Emyv14.x, v15.x, v16.x (FFmpeg 8): there is no Homebrew formula withlibsoxrfor FFmpeg 8 any more. Keep an existingffmpeg8.0.x keg if you have one, or upgrade to v17.x. - Install ffmpeg@7 for
SoundFingerprinting.Emyv12.x, v13.x (still includes libsoxr) - Install ffmpeg@6 for
SoundFingerprinting.Emyv10.x, v11.x (still includes libsoxr) - Install ffmpeg@5 for
SoundFingerprinting.Emyv9.x - Install ffmpeg@4 for
SoundFingerprinting.Emyv8.x
-
SoundFingerprinting.Emy is free for non-commercial use. Please contact sergiu@emysound.com for details. Please follow the below version matrix.
- Windows - download the FFmpeg shared build for x64 that matches the version matrix below from gyan.dev and place the DLLs alongside your executable in the folder
| SoundFingerprinting | SoundFingerprinting.Emy | FFmpeg |
|---|---|---|
| 17.x | 17.x | 9.x |
| 14.x, 15.x, 16.x | 14.x, 15.x, 16.x | 8.x |
| 12.x, 13.x | 12.x, 13.x | 7.x |
| 10.x, 11.x | 10.x, 11.x | 6.x |
| 9.x | 9.x | 5.x |
| 8.x | 8.x | 4.x |
-
Deprecated
NAudioServicesuitable for the Windows environment only. Available via SoundFingerprinting.Audio.NAudio NuGet package. Provides support for .mp3 audio file processing. MIT licensed. -
Deprecated
BassAudioServiceavailable for Windows and Unix environment via SoundFingerprinting.Audio.Bass NuGet package. Supports multiple audio formats (.wav, .ogg, .mp3, .flac). Bass is free for non-comercial use. Installation details can be found here.