Qfp
Qfp is a python library for creating audio fingerprints that are robust to alterations in pitch and speed. This method is ideal for ID'ing music from recordings such as DJ sets where the tracks are commonly played at a different pitch or speed than the original recording. Qfp is an implementation of the audio fingerprinting/recognition algorithms detailed in a 2016 academic paper by Reinhard Sonnleitner and Gerhard Widmer [1].
NOTE: This is a fork of https://github.com/mbortnyck/qfp/ which incorporates:
- multiple bug fixes
- Python 3 compatibilty
- modern packaging with Poetry
This is all in service of having a convient audio fingerprinting service for a website I'm working on.
Quickstart
Install by downloading it from PyPI.
pip install qfp
You can create a fingerprint from your reference audio...
from qfp import ReferenceFingerprint
fp_r = ReferenceFingerprint("Prince_-_Kiss.mp3")
fp_r.create()
...or a query fingerprint from an audio clip that you wish to identify.
from qfp import QueryFingerprint
fp_q = QueryFingerprint("unknown_audio.wav")
fp_q.create()
The QfpDB can store reference fingerprints...
from qfp.db import QfpDB
db = QfpDB()
db.store(fp_r, "Prince - Kiss")
... and look up query fingerprints.
fp_q = QueryFingerprint("kiss_pitched_up.mp3")
fp_q.create()
db.query(fp_q)
print(fp_q.matches)
[Match(record=u'Prince - Kiss', offset=0, vScore=0.7077922077922078)]
Qfp currently accepts recordings in any format that FFmpeg can handle.
Dependencies
FFmpeg - https://github.com/FFmpeg/FFmpeg
NumPy - https://github.com/numpy/numpy
Pydub - https://github.com/jiaaro/pydub
SciPy - https://github.com/scipy/scipy
SQLite - https://www.sqlite.org/
[1] R. Sonnleitner and G. Widmer, "Robust quad-based audio fingerprinting," IEEE/ACM Transactions on Audio, Speech and Language Processing (TASLP), vol. 24, no. 3, pp. 409–421, Jan. 2016. [Online]. Available: http://ieeexplore.ieee.org/abstract/document/7358094/. Accessed: Nov. 15, 2016.
Metadata
Release files for qfp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qfp-0.2.0.tar.gz | 10.8 kB | Without provenance | Details for qfp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qfp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for qfp-0.2.0-py3-none-any.whl |
Total release size: 21.3 kB
Release files / qfp-0.2.0.tar.gz
| Download URL | qfp-0.2.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6d3d6c4138dad5928b9786493325ea2dcedfdf38e3ed4235d467999bb4c7930
|
|
BLAKE2b-256 checksum How to use checksums |
a36efaa6ac36bb80c1607012f525e4f9bba84e21eb8c0f6d9ff2a4a69f239d46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.8.10 Linux/5.4.0-94-generic
|
Release files / qfp-0.2.0-py3-none-any.whl
| Download URL | qfp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bd22106646cfa78e25069fbcd7c4b0a8785b98ee6619969e51b1a1fbad8a4af
|
|
BLAKE2b-256 checksum How to use checksums |
c738c4b0206b9321f13208f0052bc475b2046deaef5c1d9096d4bfc892caba30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.8.10 Linux/5.4.0-94-generic
|
Security for qfp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.