Skip to main content

Manipulate audio with an simple and easy high level interface (Pozalabs fork)

Project description

Pydub (Pozalabs Fork)

Note: This is a fork tailored for Pozalabs internal use. The API may differ significantly from upstream.

Pydub lets you do stuff to audio in a way that isn't stupid.

This is a Pozalabs fork of jiaaro/pydub, published as pozalabs-pydub on PyPI.

Changes from Upstream

Requirements

  • Python 3.11+ (upstream supports Python 2.7+)
  • All legacy Python 2 compatibility code has been removed

Performance (Rust/PyO3 Extensions)

  • overlay_segments - Pre-allocated buffer overlay replacing audioop.add/mul (16-bit 4-5x, 32-bit 11-16x faster)
  • extend_24bit_to_32bit - Zero-copy 24-bit to 32-bit sample extension via direct PyBytes allocation (~400x faster than pure Python)
  • fade_segment - Single-pass fade replacing per-sample audioop.mul loop (used by fade/fade_in/fade_out). Upstream applies gain per millisecond (>100ms) or per sample (<=100ms); this implementation always applies gain per sample for consistent precision
  • mix_segments - N-segment single-pass mix in Rust (~2.9x faster than sequential overlay chaining with 19 segments)

New Features

  • Compressed audio I/O - from_file() auto-detects and decompresses gzip/zstd files; export() accepts an optional compressor parameter
  • Audio level metering - measure_audio_level() for RMS, peak, and LUFS measurement
  • Waveform data - get_normalized_amplitudes() computes normalized amplitude values for waveform visualization
  • Silent audio generation - Create silent audio matching the original segment's parameters
  • Multi-segment mix - AudioSegment.mix(*segs) classmethod for mixing N segments simultaneously
  • Audio processing framework - Command-based processor architecture for merge, overlay, and format conversion
  • Python 3.13 support - Via audioop-lts dependency

Removed

  • from_file_using_temporary_files - Redundant legacy method replaced by from_file (pipe I/O, codec inference, compression support)
  • AudioSegment.ffmpeg - Legacy class property alias for AudioSegment.converter
  • effects / scipy_effects modules - All dynamically registered effects (normalize, speedup, compress_dynamic_range, invert_phase, low_pass_filter, high_pass_filter, pan, apply_gain_stereo, strip_silence, eq, etc.) and the register_pydub_effect decorator

Type Safety

  • Comprehensive type hints using Self, Literal, TypedDict, Unpack
  • _AudioParams dataclass with validation for initialization parameters

Build System

  • pyproject.toml with maturin backend, managed by uv
  • Rust(PyO3) native extension compiled via maturin
  • Wheel distribution via GitHub Actions

Dependencies

  • backports.zstd (>=1.3.0) - Zstandard compression (Python <3.14, stdlib compression.zstd on 3.14+)

For general usage, API documentation, and ffmpeg setup, see the upstream README.

License

MIT License - Copyright 2011 James Robert

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

pozalabs_pydub-0.41.0.tar.gz (27.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pozalabs_pydub-0.41.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (354.1 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

pozalabs_pydub-0.41.0-cp311-abi3-win_amd64.whl (205.5 kB view details)

Uploaded CPython 3.11+Windows x86-64

pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (354.3 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (346.5 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

pozalabs_pydub-0.41.0-cp311-abi3-macosx_11_0_arm64.whl (312.6 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

pozalabs_pydub-0.41.0-cp311-abi3-macosx_10_12_x86_64.whl (320.4 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file pozalabs_pydub-0.41.0.tar.gz.

File metadata

  • Download URL: pozalabs_pydub-0.41.0.tar.gz
  • Upload date:
  • Size: 27.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pozalabs_pydub-0.41.0.tar.gz
Algorithm Hash digest
SHA256 8845557310972dc6d4a4c29912c59f6012790d0ca06d1f4d322ca78a0795e296
MD5 2c9030b34ad50e7a335d990864982cc3
BLAKE2b-256 00228b05cf5a83b3f8ec8f5d6d23d90e4bdb5579cc279689e7c687f1e691f8e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.41.0.tar.gz:

Publisher: publish.yml on POZAlabs/pydub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pozalabs_pydub-0.41.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.41.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d8a9c97d8689dd25d69b57b56e00641605f0b546a43ff6973e5fcc8d0d13164
MD5 b5f55142f1844f3935d8d8bd626fddd6
BLAKE2b-256 3443c868140be591f3c72a9cca85281cbc9557d93239898c43aa897b12b1a87f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.41.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on POZAlabs/pydub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pozalabs_pydub-0.41.0-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.41.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 95a76ebf56af225fa8e41d52062bcd20a66d869be50bbd703de6717c6a6fe6f1
MD5 54d0ddb15052dc5519d1a095f917374b
BLAKE2b-256 6d0902f1b0a09305e791552e41c845e6ff1f8e6bf193e17eb38ba35110ffc911

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.41.0-cp311-abi3-win_amd64.whl:

Publisher: publish.yml on POZAlabs/pydub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2df52ab290b5a82ab141cd4fc782aba598fca666d9abca8eb436697860ae499c
MD5 2e5325ebc1c0be9cf8fdd70f28363822
BLAKE2b-256 cf64f811794bc950c5f051a194f4e6306f709a1832e4edb867293941441c4279

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on POZAlabs/pydub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 438481e23867b7d29dc37616309b616398205520287c9c6987bae8040d39e45a
MD5 5fab4be330b7ff8692f5a46396bcf6e9
BLAKE2b-256 77cc883ce1f01dc5948ffb5b09aa7b8c0c4a0a8eccbea1cdb5e909d56a7a4a5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.41.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on POZAlabs/pydub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pozalabs_pydub-0.41.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.41.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba051e39cdb895610bbec2b1b89524fae94bdab33c7cf3132c7e30fe68ac571d
MD5 b8added8ad4b68fe8b9a64f7dcc4eca6
BLAKE2b-256 d828334b2eca01007d4032bd24379d4ab347375fcd547d35b0872621a48df934

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.41.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on POZAlabs/pydub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pozalabs_pydub-0.41.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.41.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1c184dda74783a3bc9be5203fef99111b8bb35a9695e796325635ad118be5f3d
MD5 2f99751664031171b605f6aff2b18225
BLAKE2b-256 2d50aaaf8372f8394b6f1e184633a8d3ace33230fcccebacfead457cb9c14eaa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.41.0-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: publish.yml on POZAlabs/pydub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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