DFPWM convertor for Python
Reason this release was yanked:
resample feature not working
Project description
DFPWM
DFPWM convertor for Python
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 -f sdist
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dfpwm-0.1.4.1.tar.gz
(160.2 kB
view hashes)
Built Distribution
Close
Hashes for dfpwm-0.1.4.1-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c054cb742bcbbaaffbf5cc7151260be365238a595edde7b83e94b2b1a48aca2 |
|
MD5 | c78d69fc34dd4511ed17aaa0ef4251d5 |
|
BLAKE2b-256 | 193fb7f48f0ef32bb039bc749dfadc017300e16be12a7f1005468ebc3765c878 |