filtering
Utilities for resampling and filtering audio data
This repository exports a Python package lilfilter containing certain
utilities for filtering and resampling audio data.
One quite-useful thing is class Resampler:
python3
>>> import lilfilter
>>> # ... let a be a Torch tensor of size (num_channels, num_samples)
>>> # that we want to downsample from 42.1kHz to 16kHz. Note,
>>> # the sampling rates must be integers; only their ratio
>>> # matters.
>>> r = lilfilter.Resampler(42100, 16000, dtype=torch.float32)
>>> b = r.resample(a)
Another thing that's useful is class Multistreamer, which can turn a signal into multiple parallel signals at a lower sampling rate, where pairs of those signals represent the (real,complex) part of one complex frequency band of the input.
>>> import lilfilter
>>> num_freq_bands = 8
>>> m = lilfilter.Multistreamer(num_freq_bands)
>>>
>>> # ... let a be a Torch tensor of size (num_channels, num_samples)
>>> # that we want to `demultiplex`.
>>>
>>> b = m.split(a)
>>> # now b is of size (num_channels, 2, num_freq_bands, num_samples/num_freq_bands)
>>> # (note: the dim of the last axis may be slightly different from that number).
>>> # You can in principle manipulate b somehow, e.g. do some kind of machine
>>> # learning with it, and then reconstruct to the original format:
>>>
>>> c = m.merge(b)
>>> # now c is of size (num_channels, 8*(num_samples/8)) and will be extremely
>>> # close to a.
Metadata
Release files for lilfilter 0.0.1
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 |
|---|---|---|---|---|
| lilfilter-0.0.1.tar.gz | 69.2 kB | Without provenance | Details for lilfilter-0.0.1.tar.gz |
Release files / lilfilter-0.0.1.tar.gz
| Download URL | lilfilter-0.0.1.tar.gz |
|---|---|
| Size | 69.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16b68bf18abe6e28df8c40a77e579c3514a963eb39a6834ed11ea6eb8d647f1c
|
|
BLAKE2b-256 checksum How to use checksums |
6d67aeb79c636d5bc349e3b935aa4a498e9166ebd224529d68924c5cf186bef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for lilfilter 0.0.1
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.