Registry / devops / audiofile

audiofile

JSON →
library1.6.1pypypi✓ verified 80d ago

A library for fast reading of audio files in various formats (WAV, MP3, FLAC, etc.). Current version 1.6.1, requires Python >=3.10. Released irregularly, with focus on performance and format support.

pip install audiofile
INSTALL
IMPORT
SIG · AUDIOFILE
A
audiofile
devopspythonv1.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

read
from audiofile import read
import audiofile; audiofile.read(...)

Read an audio file and get signal array and sampling rate.

import audiofile # Read audio file signal, sampling_rate = audiofile.read('example.wav') print(f"Sampling rate: {sampling_rate}, shape: {signal.shape}")
Debug
Known issues
breakingIn version 1.0.0, the return order changed from (sampling_rate, signal) to (signal, sampling_rate).
fix
Update code to expect (signal, sampling_rate) tuple.
affects: <1.0.0 and >=1.0.0
deprecatedThe `info` function is deprecated since version 1.2.0 and will be removed in a future release. Use `duration` and other separate functions instead.
fix
Replace audiofile.info(...) with specific functions like audiofile.duration(...) and audiofile.samples(...).
affects: >=1.2.0
gotchaaudiofile.read returns signal as a NumPy array with shape (channels, samples). If you expect (samples, channels), you need to transpose.
fix
Use signal.T or audiofile.read(..., always_2d=True, dtype='float64') depending on desired layout.
affects: all
gotchaFile format detection is based on extension, not magic bytes. Renaming a .mp3 file to .wav will fail.
fix
Ensure file extensions match actual content.
affects: all
Upgrade
Version history
1.6.1latest on PyPI · released May 20, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources

No resource links recorded.

audiofile — pip install audiofile · libregistry