soundfile
An audio library based on libsndfile, CFFI and NumPy
Install
soundfile on PyPI
pip
pip install soundfileuv
uv add soundfilepoetry
poetry add soundfilePackage facts
| License | BSD 3-Clause License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — cffi, numpy, typing-extensions |
| Maintenance | actively maintained — 68 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: soundfile-0.14.0-py2.py3-none-any.whl
Keywords: audio, libsndfile
About soundfile
from the package's own PyPI description — quoted content, verbatim
python-soundfile
|version| |python| |status| |license|
|contributors| |downloads|
The soundfile <https://github.com/bastibe/python-soundfile>__ module is an audio
library based on libsndfile, CFFI and NumPy. Full documentation is
available on https://python-soundfile.readthedocs.io/.
The soundfile module can read and write sound files. File reading/writing is
supported through libsndfile <http://www.mega-nerd.com/libsndfile/>,
which is a free, cross-platform, open-source (LGPL) library for reading
and writing many different sampled sound file formats that runs on many
platforms including Windows, OS X, and Unix. It is accessed through
CFFI <https://cffi.readthedocs.io/>, which is a foreign function
interface for Python calling C code. CFFI is supported for CPython 2.6+,
3.x and PyPy 2.0+. The soundfile module represents audio data as NumPy arrays.
| python-soundfile is BSD licensed (BSD 3-Clause License). | (c) 2013, Bastian Bechtold
|open-issues| |closed-issues| |open-prs| |closed-prs|
.. |contributors| image:: https://img.shields.io/github/contributors/bastibe/python-soundfile.svg .. |version| image::...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
soundfile reads and writes audio files in formats like WAV, FLAC, and OGG through libsndfile, exposing audio data as NumPy arrays for processing.
Low friction: pure-Python wheel distribution with bundled libsndfile on Windows, macOS, and Linux 64-bit. Active maintenance (last commit 2026-07-14, 68 days since release). Requires Python 3.10+.
BSD 3-Clause License (permissive): you may use, modify, and distribute soundfile freely in commercial and private projects provided you include the license text and do not hold the authors liable.
Usage
import soundfile as sf
import numpy as np
# Read audio file
data, samplerate = sf.read('existing_file.wav')
# Write audio file
sf.write('new_file.flac', data, samplerate)
Requires libsndfile system library; bundled in wheels for Windows, macOS (Intel/ARM), and Linux 64-bit. Source installs need libsndfile via package manager (e.g., 'apt install libsndfile1').
Verdict: soundfile is a stable, actively maintained audio I/O library with low install friction on common platforms. BSD 3-Clause licensing is permissive. No known vulnerabilities. Suitable for audio processing workflows that need NumPy integration and multi-format support.
Needs verification
- Performance characteristics and memory efficiency for large audio files or real-time streaming
- Compatibility with PyPy implementation beyond the stated support claim
- Behavior differences between bundled and system-provided libsndfile versions
Similar packages
permissive · top 1,000 on PyPI
aiofilespermissive · top 1,000 on PyPI
filetypepermissive · top 1,000 on PyPI
avpermissive · top 1,000 on PyPI
lz4permissive · top 1,000 on PyPI
ijsonpermissive · top 1,000 on PyPI
cffipermissive · top 100 on PyPI
cramjampermissive · top 1,000 on PyPI
zstandardpermissive · top 1,000 on PyPI
zopflipermissive · top 1,000 on PyPI