DFPWM
DFPWM convertor for Python
Installation
From PyPI
You can get this package from PyPI if you are in py311 Linux x86
pip install dfpwm
Build from source
Usage
from pathlib import Path
import soundfile as sf # for reading audio
import dfpwm
data, sample_rate = sf.read('./someaudio.mp3') # read audio
# If sample rate is not 48000, may get strange result
# use `dfpwm.resample(...)` to resample
if sample_rate != dfpwm.SAMPLE_RATE:
raise ValueError(f"{sample_rate} != {dfpwm.SAMPLE_RATE}")
if len(data.shape) != 0 and data.shape[1] > 1:
data = data[:, 0] # get channel 0
dfpwm = dfpwm.compressor(data) # convert
Path('out.dfpwm').write_bytes(dfpwm) # write result to file
Build from source
Clone
git clone https://github.com/CyanChanges/python-dfpwm.git python-dfpwm
cd python-dfpwm
Build
This project use poetry to build,
Make sure poetry is installed.
poetry build
Release files for dfpwm 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 | |
|---|---|---|---|
| dfpwm-0.2.0.tar.gz | 4.9 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dfpwm-0.2.0-cp312-cp312-manylinux_2_40_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.40+ x86-64 | Details |
| dfpwm-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.35+ x86-64 | Details |
Total release size: 1.3 MB
Release files / dfpwm-0.2.0.tar.gz
| Download URL | dfpwm-0.2.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f652e36a0886f036d4a35b9eaa297ee089a6a28d016b7515dd6bf2a7a87e5364
|
|
BLAKE2b-256 checksum How to use checksums |
a1de38c4532e277aea01060644bb61b769b31d7c500dd8071f569ad2272ca55e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.7 Linux/6.11.9-zen1-1-zen
|
Release files / dfpwm-0.2.0-cp312-cp312-manylinux_2_40_x86_64.whl
| Download URL | dfpwm-0.2.0-cp312-cp312-manylinux_2_40_x86_64.whl |
|---|---|
| Size | 659.5 kB |
| Tags | CPython 3.12 Linux glibc 2.40+ x86-64 |
|
SHA-256 checksum How to use checksums |
ccf446b5707c46091cca6a9168423793489d7bfceed26f164bea7002d058fe7e
|
|
BLAKE2b-256 checksum How to use checksums |
b8f78e54ba71c871bf8026777effcc997d6388157bd78451b4d154280c624b04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.7 Linux/6.11.9-zen1-1-zen
|
Release files / dfpwm-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl
| Download URL | dfpwm-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 653.0 kB |
| Tags | CPython 3.11 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
36fa1e555426ebd371a958650424c64a52f4318ab416ba0ef1f115c9e565fbc4
|
|
BLAKE2b-256 checksum How to use checksums |
220b2f82e52505f46c9f4b5abd898bca7745de15e7525eb680d8547fbca81798
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure
|