soundfile
An audio library based on libsndfile, CFFI and NumPy
Decision gist · record as of 2026-08-14
Yes. Soundfile is production-stable, actively maintained, permissively licensed, and has low install friction. It solves a real problem—reading and writing audio files with NumPy integration—and has no known vulnerabilities. Requires Python 3.10 or later.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires libsndfile; platform-specific wheels include it, but source installs require separate system installation.
- Low friction: pure-Python wheel distribution available.
- Active maintenance with recent release 69 days ago and 848 repository stars.
License · maintenance · safety
BSD 3-Clause License (permissive) — BSD 3-Clause License (permissive): you may use, modify, and distribute soundfile and derivative works freely, provided you include the license and copyright notice.
last release 2026-06-06 (69 days) · last repo commit 2026-07-14 · 848 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 29,968,697 downloads/mo, #807 on PyPI
Alternatives
Verify before relying
pip install soundfile
import soundfile as sf
import numpy as np
data, samplerate = sf.read('file.wav')
sf.write('output.flac', data, samplerate)- Whether bundled libsndfile in wheels receives independent security updates.
- Performance characteristics for very large files or real-time streaming.
- Full list of audio formats supported beyond WAV, FLAC, OGG, and MAT.
- Specific platforms where source installation is necessary.
What it is and what it does
Soundfile is a Python audio library that wraps libsndfile through CFFI, letting you read and write audio files in multiple formats while representing audio data as NumPy arrays. It supports WAV, FLAC, OGG, MAT, and RAW files, and can process audio in blocks for memory-efficient handling of large files. The library also supports virtual I/O, allowing you to read from file-like objects and perform in-memory format conversions.
The package depends on cffi, numpy, and typing-extensions. It requires Python 3.10 or later and is actively maintained with no known vulnerabilities. The BSD 3-Clause License is permissive, and the package ranks in the top 1000 PyPI packages by download volume.
Use it for
- Convert audio between formats (e.g., OGG to WAV) without external tools or intermediate files.
- Process long audio files in fixed-size blocks to avoid loading entire files into memory.
- Read audio from file-like objects for remote or dynamic audio sources.
- Extract audio data as NumPy arrays for analysis, filtering, or signal processing.
- Write processed audio back to disk in a specific format and sample rate.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Soundfile is production-stable, actively maintained, permissively licensed, and has low install friction. It solves a real problem—reading and writing audio files with NumPy integration—and has no known vulnerabilities. Requires Python 3.10 or later.
Install
soundfile on PyPI
Before you install
Low friction: pure-Python wheel distribution available. Active maintenance with recent release 69 days ago and 848 repository stars.
Requires libsndfile; platform-specific wheels include it, but source installs require separate system installation.
License in practice
BSD 3-Clause License (permissive): you may use, modify, and distribute soundfile and derivative works freely, provided you include the license and copyright notice.
Quickstart
pip install soundfile
import soundfile as sf
import numpy as np
data, samplerate = sf.read('file.wav')
sf.write('output.flac', data, samplerate)
Verify before relying
- Whether bundled libsndfile in wheels receives independent security updates.
- Performance characteristics for very large files or real-time streaming.
- Full list of audio formats supported beyond WAV, FLAC, OGG, and MAT.
- Specific platforms where source installation is necessary.
Package 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 packagescffinumpytyping-extensions |
| Maintenance | Actively maintained 69 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 29,968,697 / month, #807 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/ResearchLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Multimedia :: Sound/Audio |
Evidence: soundfile-0.14.0-py2.py3-none-any.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 › “read write audio files python”
- soundfileReads and writes audio files in formats like WAV, FLAC, OGG, and MAT…
- pedalboardpedalboard reads, writes, and processes audio files with built-in…
- kaldiioKaldiio reads and writes Kaldi archive (ark) and script (scp) files…
Give your agent the search over MCP, or paste the wish link into any chat.
More Sound/Audio packages
Pydub provides a high-level Python interface for loading, manipulating, and exporting audio files with simple operations like slicing, concatenation, and format conversion.
However, the abandoned status since 2021-03-10 means no future fixes or compatibility updates—use it only if you can tolerate potential issues with newer Python…
Mutagen reads and writes audio metadata (tags) across many audio formats including MP3, FLAC, OGG, MP4, WavPack, and others, supporting ID3v2 and APEv2 tag editing.
Install it if you need to read or edit audio tags programmatically.
Provides PyTorch-based audio processing, transforms, and dataloaders for machine learning tasks, with GPU acceleration and autograd support for trainable audio features.
MoviePy is a Python library for video editing that reads, processes, and writes video and audio files by converting them to numpy arrays for frame-level manipulation and effect application.
Reads metadata (artist, title, duration, bitrate, and more) from audio files in formats including MP3, MP4, FLAC, OGG, WAV, and others, without writing or modifying tags.
Install it if you need to extract metadata from audio files without the overhead of a heavier library.
Generate access tokens and call LiveKit server APIs (room management, egress, ingress, SIP, agent dispatch, connectors) from Python backends using async/await.
Install it if you are building a backend that needs to generate tokens, manage rooms, or integrate with LiveKit's services.
See also audiofile · fmod-toolkit · pedalboard · audiolab · wfdb · SoundCard · miniaudio · resemble-perth