soxr
High quality, one-dimensional sample-rate conversion library
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires numpy; input must be numpy.ndarray or convertible to float32, float64, int16, or int32.
- 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 · maintenance · safety
LGPL-2.1-or-later (copyleft) — 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.
last release 2026-05-03 (103 days) · last repo commit 2026-07-24 · 110 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 11,225,603 downloads/mo, #1,407 on PyPI
Alternatives
Verify before relying
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)- 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.
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 on this page. Verify before relying on it.
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
soxr on PyPI
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.
Requires numpy; input must be numpy.ndarray or convertible to float32, float64, int16, or int32.
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)
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 the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 103 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 11,225,603 / month, #1,407 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchIntended Audience :: Telecommunications IndustryProgramming Language :: CProgramming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: Free Threading :: 2 - BetaTopic :: Multimedia :: Sound/Audio :: AnalysisTopic :: Multimedia :: Sound/Audio :: ConversionTopic :: Scientific/Engineering |
Evidence: soxr-1.1.0-cp310-cp310-macosx_10_14_x86_64.whl; soxr-1.1.0-cp310-cp310-macosx_11_0_arm64.whl; soxr-1.1.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; soxr-1.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; soxr-1.1.0-cp310-cp310-win_amd64.whl; soxr-1.1.0-cp311-cp311-macosx_10_14_x86_64.whl; soxr-1.1.0-cp311-cp311-macosx_11_0_arm64.whl; soxr-1.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; soxr-1.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; soxr-1.1.0-cp311-cp311-win_amd64.whl; soxr-1.1.0-cp312-abi3-macosx_10_14_x86_64.whl; soxr-1.1.0-cp312-abi3-macosx_11_0_arm64.whl; soxr-1.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; soxr-1.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; soxr-1.1.0-cp312-abi3-win_amd64.whl; soxr-1.1.0-cp314-cp314t-macosx_10_15_x86_64.whl; soxr-1.1.0-cp314-cp314t-macosx_11_0_arm64.whl; soxr-1.1.0-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; soxr-1.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; soxr-1.1.0-cp314-cp314t-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “audio resampling”
- soxrPerforms high-quality sample-rate conversion (resampling) for audio…
- samplerateWraps libsamplerate (Secret Rabbit Code) to perform high-quality…
- juliusJulius provides differentiable, GPU-accelerated digital signal…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also samplerate · sox · doppler-dsp · audiofile · python-stretch · audiolab · julius · soundfile · stftpitchshift