--- id: sox version: "1.5.0" license: BSD-3-Clause license_treatment: permissive maintenance: aging --- # sox — Python wrapper around SoX. License: permissive · Maintenance: aging · Downloads: 908.8K/mo ## What it is and what it does pysox is a Python wrapper around the SoX command-line audio processor, exposing its effects and transformations through a Transformer class for file-to-file and array-to-array audio processing, and a Combiner class for concatenating multiple audio files. It depends on numpy for array handling and requires SoX itself to be installed as a system dependency. The package lets you apply audio effects (compression, fading, pitch shifting, trimming), convert formats and sample rates, and work with audio either as files or in-memory numpy arrays. It is typically used in audio analysis pipelines, music information retrieval workflows, and batch audio preprocessing tasks where SoX's command-line tools are needed from Python without spawning subprocesses directly. Use it for: - Trim, compress, and fade audio files in batch preprocessing pipelines for machine learning datasets. - Pitch-shift or resample in-memory audio arrays during real-time audio analysis or feature extraction. - Concatenate multiple audio files with effects applied in a single operation. - Convert audio between formats (WAV, AIFF, MP3, FLAC, OGG) and sample rates programmatically. - Query audio file metadata (sample rate, duration, silence detection) without external subprocess calls. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python wrapper that exposes SoX audio processing capabilities—trimming, effects, format conversion, and concatenation—via a Transformer and Combiner API. Yes, with conditions. Install if you need SoX's audio processing power from Python and can meet the system dependency requirement (SoX 14.4.2+). The package is stable and permissively licensed, but maintenance is aging (last release 2024-03-20) and Python version support is unspecified—verify compatibility before relying on it in production. High install friction and lack of recent activity make it less suitable for new projects unless SoX integration is essential. ## Install pip install sox uv add sox poetry add sox ## Installing sox Before you install: High install friction: requires SoX 14.4.2+ to be installed separately on the system (via Homebrew, apt-get, or source). Package maintenance is aging—last release was 2024-03-20, over 877 days ago, though the repository remains active and unarchivedwith recent commits. License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and disclaimer in distributions. Quickstart: import sox tfm = sox.Transformer() tfm.trim(5, 10.5) tfm.compand() tfm.build_file('input.wav', 'output.aiff') # or with in-memory arrays import numpy as np y = np.sin(2 * np.pi * 440.0 * np.arange(44100) / 44100) tfm = sox.Transformer() tfm.pitch(2) y_out = tfm.build_array(input_array=y, sample_rate_in=44100) SoX version 14.4.2 or higher must be installed on the system before importing sox; Python support version is unspecified. Verify before relying: - Exact Python version compatibility (requires_python is unspecified in metadata) - Whether high install friction reflects unresolved dependency issues or simply the need for a system library - Current test coverage and whether aging maintenance affects reliability for modern audio formats ## Package facts - License: BSD-3-Clause (permissive) - Python support: unspecified - Install friction: high - Maintenance: aging - Downloads: 908.8K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags audio effects processing python, sox wrapper python, audio trimming compression fade, audio format conversion, audio signal processing library, batch audio transformation, pitch shifting audio python, audio-processing, sox-wrapper, signal-processing [View on SkillFed](https://skillfed.io/packages/sox) · [View on PyPI](https://pypi.org/project/sox/)