pyrubberband
Python module to wrap rubberband
What it is and what it does
pyrubberband is a lightweight Python wrapper around the Rubberband audio processing tool, enabling time-stretching and pitch-shifting of audio files. It processes audio via the Rubberband command-line interface, reading and writing files to disk rather than operating in-memory. The package depends on numpy and soundfile for audio I/O and manipulation.
The wrapper exposes Rubberband's command-line options, allowing you to pass additional arguments to control processing behavior. It is classified as Alpha and supports Python 3.7 through 3.12. The project has been stable since its initial release in 2015 but has not received active development recently, making it suitable for established workflows that don't require new features or frequent updates.
Use it for:
- Adjust playback speed of audio files without changing pitch for music practice or analysis.
- Shift the pitch of recordings up or down while preserving tempo for transposition tasks.
- Batch-process audio files with Rubberband CLI options for custom time-stretch and pitch-shift parameters.
- Integrate audio time-stretching into music information retrieval or audio analysis pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python wrappers for time-stretching and pitch-shifting audio via the Rubberband command-line tool, processing audio files on disk.
Yes, if you need time-stretching or pitch-shifting and already have Rubberband installed or can install it on your target system. The low install friction, permissive license, and stable API make it a straightforward choice for audio processing workflows. No, if you require active maintenance, in-memory processing, or need Rubberband support on Windows without manual setup.
Install
pyrubberband on PyPI
pip
pip install pyrubberbanduv
uv add pyrubberbandpoetry
poetry add pyrubberbandInstalling pyrubberband
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 683 days ago—but the repository remains active with recent commits and no archived status. Suitable for stable use cases that don't require ongoing feature development.
License in practice
Licensed under ISC (permissive), allowing commercial and private use with minimal restrictions. No notable licensing constraints for most use cases.
Quickstart
pip install pyrubberband
import soundfile as sf
import pyrubberband as pyrb
y, sr = sf.read("test.wav")
y_stretched = pyrb.time_stretch(y, sr, 2.0)
Requires the Rubberband command-line tool to be installed separately on your system (e.g., via brew on macOS or package manager on Linux).
Verify before relying
- Whether Rubberband CLI installation is straightforward on Windows and Linux systems beyond the macOS example provided.
- Performance characteristics and latency for real-time or streaming audio use cases.
- Supported audio formats and sample rate constraints beyond the basic example.
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, soundfile |
| Maintenance | dormant — 683 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,068/month — #13,111 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyrubberband-0.4.0-py3-none-any.whl
Keywords: audio, music, sound
Tags
More Analysis packages
Pydub provides a high-level Python interface…
permissive · top 5,000 on PyPI
librosalibrosa provides audio and music signal…
permissive · top 5,000 on PyPI
soxrPerforms high-quality sample-rate conversion…
copyleft · top 5,000 on PyPI
moviepyMoviePy is a Python library for video editing…
permissive · top 5,000 on PyPI
tinytagReads metadata (artist, title, duration,…
permissive · top 5,000 on PyPI
kaldiioKaldiio reads and writes Kaldi archive (ark)…
unclear · top 5,000 on PyPI
pyloudnormMeasures and normalizes audio loudness…
permissive · top 5,000 on PyPI
python-stretchPitch-shifts and time-stretches audio using the…
permissive · top 15,000 on PyPI
aubioaubio is a Python wrapper around a C library…
copyleft · top 15,000 on PyPI
stftpitchshiftShifts the pitch and timbre of audio signals…
permissive · top 15,000 on PyPI
basic-pitchBasic Pitch converts audio files to MIDI…
unclear · top 15,000 on PyPI
torchfcpeTorchFCPE estimates fundamental frequency…
permissive · top 15,000 on PyPI
audiomentationsAudiomentations applies randomized audio…
permissive · top 15,000 on PyPI
torchcrepePyTorch implementation of the CREPE pitch…
permissive · top 15,000 on PyPI
soundfileReads and writes audio files in formats like…
permissive · top 1,000 on PyPI