Skip to main content

DFPWM convertor for Python

Project description

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

Project details


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.2.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distributions

dfpwm-0.2.0-cp312-cp312-manylinux_2_40_x86_64.whl (659.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.40+ x86-64

dfpwm-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl (653.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ x86-64

File details

Details for the file dfpwm-0.2.0.tar.gz.

File metadata

  • Download URL: dfpwm-0.2.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.11.9-zen1-1-zen

File hashes

Hashes for dfpwm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f652e36a0886f036d4a35b9eaa297ee089a6a28d016b7515dd6bf2a7a87e5364
MD5 6f29242cab989b9896eef7e1b91345c7
BLAKE2b-256 a1de38c4532e277aea01060644bb61b769b31d7c500dd8071f569ad2272ca55e

See more details on using hashes here.

File details

Details for the file dfpwm-0.2.0-cp312-cp312-manylinux_2_40_x86_64.whl.

File metadata

  • Download URL: dfpwm-0.2.0-cp312-cp312-manylinux_2_40_x86_64.whl
  • Upload date:
  • Size: 659.5 kB
  • Tags: CPython 3.12, manylinux: glibc 2.40+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.11.9-zen1-1-zen

File hashes

Hashes for dfpwm-0.2.0-cp312-cp312-manylinux_2_40_x86_64.whl
Algorithm Hash digest
SHA256 ccf446b5707c46091cca6a9168423793489d7bfceed26f164bea7002d058fe7e
MD5 56fe549e191dc3c3f1e04e13e234b322
BLAKE2b-256 b8f78e54ba71c871bf8026777effcc997d6388157bd78451b4d154280c624b04

See more details on using hashes here.

File details

Details for the file dfpwm-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: dfpwm-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 653.0 kB
  • Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure

File hashes

Hashes for dfpwm-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 36fa1e555426ebd371a958650424c64a52f4318ab416ba0ef1f115c9e565fbc4
MD5 d622c6092b65dc3647fbde7cb8385438
BLAKE2b-256 220b2f82e52505f46c9f4b5abd898bca7745de15e7525eb680d8547fbca81798

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page