--- id: soxr version: "1.1.0" license: LGPL-2.1-or-later license_treatment: copyleft maintenance: active --- # soxr — High quality, one-dimensional sample-rate conversion library License: copyleft · Maintenance: active · Downloads: 11.2M/mo ## What it is and what it does soxr is a Python wrapper around libsoxr, a high-quality audio resampling library. It converts audio signals from one sample rate to another while maintaining audio fidelity. The package supports both simple one-shot resampling via a single function call and streaming resampling for real-time or very long signals via a ResampleStream class. Input and output are numpy arrays; the library handles mono and multi-channel audio and preserves the input data type (float32, float64, int16, or int32). The package is actively maintained, supports Python 3.9 and later, and offers pre-built wheels for common platforms (macOS, Linux, Windows) and architectures (x86_64, ARM). It is copyleft-licensed under LGPL-2.1-or-later, following libsoxr's license. According to the project's benchmarks, soxr is among the fastest Python resamplers available, outperforming scipy.signal.resample, resampy, and other alternatives on CPU time for typical audio workloads. Use it for: - Downsampling or upsampling audio files to match target sample rates in audio processing pipelines. - Real-time audio streaming applications that need to convert between different input and output sample rates. - Digital signal processing workflows requiring high-quality resampling with minimal artifacts. - Audio feature extraction or machine learning preprocessing where sample rate normalization is needed. - Building audio codecs or transcoding tools that must resample between incompatible formats. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Performs high-quality sample-rate conversion (resampling) for audio signals, supporting both one-shot and streaming modes via a Python wrapper around libsoxr. Yes. soxr is production-stable, actively maintained, and offers superior resampling quality and speed compared to common alternatives. Medium install friction is manageable via pre-built wheels. LGPL-2.1-or-later licensing is suitable for open-source projects but requires review for proprietary use. Install if you need high-quality audio resampling; avoid only if copyleft licensing is incompatible with your project. ## Install pip install soxr uv add soxr poetry add soxr ## Installing soxr Before you install: Medium install friction due to compiled wheels; pre-built binaries available for Python 3.9+ across macOS (Intel and ARM), Linux, and Windows. Repository is actively maintained with recent commits. License in practice: Licensed under LGPL-2.1-or-later (copyleft); derivative works and distributions must comply with copyleft obligations. Suitable for open-source projects; proprietary use requires careful license review. Quickstart: import soxr import numpy as np # One-shot resampling y = soxr.resample(x, 48000, 16000) # x is numpy array, returns resampled array # Streaming resampling rs = soxr.ResampleStream(44100, 16000, 1, dtype='float32') y_chunk = rs.resample_chunk(x, last=False) Requires numpy; input must be numpy.ndarray or convertible to float32, float64, int16, or int32. Verify before relying: - Whether the package supports real-time latency constraints or is suitable for live audio applications. - Memory overhead and performance characteristics for very long signals or high channel counts. - Availability and stability of conda-forge builds relative to PyPI wheels. ## Package facts - License: LGPL-2.1-or-later (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 11.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags audio resampling, sample rate conversion, resample audio python, high quality audio resampler, DSP signal processing, audio SRC library, streaming audio resample, audio-dsp, resampling, signal-processing [View on SkillFed](https://skillfed.io/packages/soxr) · [View on PyPI](https://pypi.org/project/soxr/)