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.42.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.42.0-cp311-abi3-win_amd64.whl (205.7 kB view details)

Uploaded CPython 3.11+Windows x86-64

pozalabs_pydub-0.42.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (349.9 kB view details)

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

pozalabs_pydub-0.42.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (345.7 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

pozalabs_pydub-0.42.0-cp311-abi3-macosx_11_0_arm64.whl (311.3 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

pozalabs_pydub-0.42.0-cp311-abi3-macosx_10_12_x86_64.whl (314.9 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: pozalabs_pydub-0.42.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.42.0.tar.gz
Algorithm Hash digest
SHA256 a41f10c1f9c3584722293c947fb0d17b30063b0d8b12ba03f22030353c60f515
MD5 0d53361ce194c279b159f3e482b365f7
BLAKE2b-256 5c9aa9c77100b68c7a55b58c0d00a40f33ef95f0217df0a94443b627cba38ee3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pozalabs_pydub-0.42.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4ab0913cedb056db2dbc55bbe9145040ee087ce2dccdc54bb39410876718f925
MD5 57ce968c588340826f02ff7470cb47e7
BLAKE2b-256 304c651f24407a92d7d4c5288c82c30263b0be0cc8d9969a364385096bc78784

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pozalabs_pydub-0.42.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9637b6986a329777f23f6fcb846be3a1375b55f7f4238f73bd7cdf351e445fb0
MD5 59c028748003150f0e3d4e21f5c3afd1
BLAKE2b-256 3429b4383cd65ff5bc7ea8c77c4a32e441d4f227486aeea81feb556708e1166a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pozalabs_pydub-0.42.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f4ab9410968e91f4af0a9a85de56d61655aae542b7991d65ddd1b404853a34eb
MD5 48f052c026271c88638d8c1dbed19e59
BLAKE2b-256 8192f61d31f25f545b18cff4bb0d09e69623a5d9fe496a5605af640f51554c14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pozalabs_pydub-0.42.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f48b5fc62f15ca7eec5d35f7e504622cef5137177b036a108561ebdb91f770c
MD5 45f81fa267bbcc436008a184d754a2a9
BLAKE2b-256 cae9eb7afabf9d86156b8e34998440b021acb78872879332f850bb64458d91d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pozalabs_pydub-0.42.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bbb73a7245c6630919bde9881466411deba06cdce59aec30a3c1791b80b9d9b1
MD5 a8d45c239badf52a72ab15d7794727fc
BLAKE2b-256 f1525cf4971ccbd37ec61e5d34b4ca1cd2c352ff6356aa2dbb534771210fa1a6

See more details on using hashes here.

Provenance

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