Libhum
Libhum is a Python library and set of utilities to extract and compare electricity frequency signals (ENF).
The library uses GPU accelaration (CUDA or OpenCL) to accurately match ENF signals in seconds.
On an Apple Macbook Air M1, the library is able to match an 1 hour signal over a 10 years history in about 20 seconds.
Setup
pip install libhum
Compute ENF
Use the compute_enf command to extract the main ENF from an audio or video file to an .enf file:
libhum compute_enf samples/target.ogg target.enf --plot
By default, the library is looking for an ENF signal in the 50 Hz band. Use the -f/--frequency
option to use a different frequency.
Match ENFs
Use the match_enf command to find the best matches between two signals:
libhum match_enf samples/reference.enf samples/target.enf --plot
The default backend is using Numpy and is considerably slower than the OpenCL or CUDA backends which
rely on GPU accelaration. Append the --backend=cuda or --backend=opencl option to use a
GPU-accelerated backend.
Special thanks
Some of the signal processing algorithms used by the library originate from Robert Heaton's ENF matching library.
License
See LICENSE file for details.
BibTeX Citation
If you use Libhum in any scientific publication, please use the following BibTex citation:
@software{Javaux_Libhum,
author = {Javaux, Raphael},
license = {LGPL-3.0},
title = {{Libhum}},
url = {https://github.com/RaphaelJ/libhum},
year={2024},
}
Metadata
Release files for libhum 1.1.5
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 |
|---|---|---|---|---|
| libhum-1.1.5.tar.gz | 61.4 kB | Without provenance | Details for libhum-1.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libhum-1.1.5-py3-none-any.whl | Python 3 | none | any | Details for libhum-1.1.5-py3-none-any.whl |
Total release size: 125.2 kB
Release files / libhum-1.1.5.tar.gz
| Download URL | libhum-1.1.5.tar.gz |
|---|---|
| Size | 61.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39a53c6507c8db88ff3d72ebbe19e7c5c8f15a262ac5d8409f7f43ebd8a21d45
|
|
BLAKE2b-256 checksum How to use checksums |
b7cee059a8364740f528268d07b193593dee7f999782aa8c627264b5b59f8245
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Release files / libhum-1.1.5-py3-none-any.whl
| Download URL | libhum-1.1.5-py3-none-any.whl |
|---|---|
| Size | 63.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5579ec8558a7501ce6e84d12ee7682416f925a79881fc004b3d0307b3c7b6d2
|
|
BLAKE2b-256 checksum How to use checksums |
e905f93e9be66507889d7d58a8a268b80664cda0b9e11b6c05a0388516c3c36d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Security for libhum 1.1.5
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.