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.43.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.43.0-cp311-abi3-win_amd64.whl (206.0 kB view details)

Uploaded CPython 3.11+Windows x86-64

pozalabs_pydub-0.43.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (350.3 kB view details)

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

pozalabs_pydub-0.43.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (346.0 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

pozalabs_pydub-0.43.0-cp311-abi3-macosx_11_0_arm64.whl (311.4 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

pozalabs_pydub-0.43.0-cp311-abi3-macosx_10_12_x86_64.whl (315.2 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: pozalabs_pydub-0.43.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.12

File hashes

Hashes for pozalabs_pydub-0.43.0.tar.gz
Algorithm Hash digest
SHA256 80fd265fe86d21db83db441b06248ffdd0e572eae6994d2091c765ef45800b42
MD5 3a377a3ade4ae4924bb96718b046f2f2
BLAKE2b-256 faa15bdf38459114f0b407e68d52fa36c1e2b3feb3b0069c186962871d3e7b98

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.43.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.43.0-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.43.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 59461120c5650cec21169566b1d5f1a03b4ac0d8f53559009a1a057258f6e217
MD5 4d0f589202900a46278df141d9444780
BLAKE2b-256 2d23c2ac5c372f99e791f93a38b070991b6256d967c445f4f54e298c6446b830

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.43.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.43.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.43.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff4ed34957f256525dc758e7eb24925e089a47b2b8a502c1991ca633e1f51244
MD5 d88ab21179bfb6d240062e60cc5598f0
BLAKE2b-256 9a8505b083e8730322a1cafad1d00f6542c9c3970e92bed2a6be4925f60d5012

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.43.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.43.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.43.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8bc8a790ffb504ef1fc6853d4906b5b2eda255d42ba3b4885ab6b1d9c20e3cc5
MD5 03595f21e063119d69f65e3a42bf5a91
BLAKE2b-256 4152008217fb9e9bfa61f7e58dceef67b7158c5f081ba1c626d2919dee490e82

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.43.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.43.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.43.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4bf6fc8f6d3551217e3ed8a8ef9736492bbbe40c7d900628765e6618fce84c6
MD5 cc23028dac0926b5edad4fda4325c728
BLAKE2b-256 b2e293c997444ef777d4bb549124522daef2d2e43358a7db1d578f1e80eed72a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.43.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.43.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pozalabs_pydub-0.43.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ad9139960c2ef101ccbe692f19d1f2d214c9cc2bbbfad7b87ab5eddd468aded8
MD5 cbd25829b66c0b4cde62d47f85ba06dc
BLAKE2b-256 8a91132e8a52320c8aaea9d3e00e498535ebae46ad61ee8ac09c8582c83f04fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for pozalabs_pydub-0.43.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