https://github.com/salsowelim/dejavu_cpp_port
c++ implementation of the fingerprinting algorithm suggested in the dejavu audio fingerprinting project
https://github.com/salsowelim/dejavu_cpp_port
audio-fingerprinting cplusplus signal-processing spectrogram
Last synced: 3 months ago
JSON representation
c++ implementation of the fingerprinting algorithm suggested in the dejavu audio fingerprinting project
- Host: GitHub
- URL: https://github.com/salsowelim/dejavu_cpp_port
- Owner: salsowelim
- License: other
- Created: 2019-05-13T14:49:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T15:16:11.000Z (over 4 years ago)
- Last Synced: 2024-08-04T01:09:41.696Z (7 months ago)
- Topics: audio-fingerprinting, cplusplus, signal-processing, spectrogram
- Language: C++
- Homepage:
- Size: 146 KB
- Stars: 54
- Watchers: 4
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Dejavu c++ port (audio fingerprinting)
==========This is a c++ implementation of the fingerprinting algorithm suggested in the dejavu audio fingerprinting project (https://github.com/worldveil/dejavu specifically: the fingerprint.py file). [link on how dejavu works](http://willdrevo.com/fingerprinting-and-audio-recognition-with-python/)
## Prerequisites:
- opencv (= 3.4.5)
- boost library (= 1.60)
- c++14
- for demo only: ffmpegThe "fingerprint" function will accept array of floats as an input (raw audio pcm data). It will returns a list of hashes with offsets (as a json string).
## Why the c++ port?
1. You can run c++ code on iOS or Android (tested it myself, works Flawlessly).
2. In theory: performance boost. In practice: didn't see much difference.## Demo
The main function will load a test mp3 file, uncompressed it using ffmpeg (as a mono channel, 22050 sample rate), feed it to fingerprint function, then prints the list of hashes-offsets.## Update 2020: Include it in react-native/iOS/Android
Now a sample code is provided in a [different repository](https://github.com/salsowelim/mobileAfp) that demonstrates how to include this function in a react-native project. [Blog post](http://en.suliman.ws/posts/mafp) is available that explains how to do it.
## Final notes
- I wrote this code initially for prototype purposes. while I have tested the correctness of the algorithm output, I didn't optimise the code to c++ best standards. If you want to improve the code in this manner I will gladly accept pull requests.
- Performance (speed wise) is really slow when the audio input is large. However on small audio files (<10 seconds) it is similar or better than python implementation. For now, I'm not interested to look after this issue. If you have a fix, PR.