skillfed

audiofile

Fast reading of all kind of audio files

audiofile v1.6.1 90.6K downloads/30d#13,573 on PyPI39
Permissive license MIT Active released

What it is and what it does

audiofile is a Python library for reading and writing audio files with a focus on reading speed. It abstracts away the complexity of working with multiple audio formats by leveraging ffmpeg, sox, and mediainfo for format conversion and metadata extraction, while using soundfile as its core reader. The package provides a simple API to extract signal data and metadata (channels, duration, samples, sampling rate) from any format those tools support, and can write to WAV, FLAC, MP3, and OGG.

The main use case is audio processing pipelines where you need to work with heterogeneous audio sources without worrying about format-specific handling. It automatically converts unsupported formats to WAV before reading, ensuring consistent behavior across your codebase. The dependency stack includes audeer, audmath, numpy, and soundfile, making it suitable for scientific and research applications that need reliable, fast audio I/O.

Use it for:

  • Extract audio signals and metadata from mixed audio formats in a batch processing pipeline.
  • Build audio feature extraction workflows that accept files in any format ffmpeg or sox supports.
  • Convert and standardize audio files to WAV, FLAC, MP3, or OGG in a research or production system.
  • Read audio duration and sample counts reliably across formats without manual format detection.
  • Integrate audio file handling into machine learning preprocessing steps with minimal boilerplate.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Reads and writes audio files across formats supported by ffmpeg, sox, and mediainfo, with optimized reading speed and metadata extraction for channels, duration, samples, and sampling rate.

Yes. audiofile is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers low install friction. It solves a real problem—unified, fast audio I/O across formats—with a simple API. Install it if you work with audio files in multiple formats and want to avoid format-specific code.

Install

audiofile on PyPI

pip

pip install audiofile

uv

uv add audiofile

poetry

poetry add audiofile

Installing audiofile

Before you install

Low install friction with a pure-Python wheel and four runtime dependencies. Active maintenance with a recent commit on 2026-08-05 and stable production status.

License in practice

MIT license permits commercial and private use with minimal restrictions; attribution required.

Quickstart

pip install audiofile

import audiofile

signal, sampling_rate = audiofile.read("signal.wav")

Requires ffmpeg, sox, or mediainfo installed on the system for format conversion and metadata extraction of non-WAV formats.

Verify before relying

  • Whether the package handles edge cases like corrupted or truncated audio files gracefully.
  • Performance benchmarks comparing reading speed across different audio formats and file sizes.
  • Exact behavior when writing formats (WAV, FLAC, MP3, OGG) with various codec options or quality settings.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — audeer, audmath, numpy, soundfile
Maintenance actively maintained — 86 days since the last release
Last repo commit
First released
Downloads 90,602/month — #13,573 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: audiofile-1.6.1-py3-none-any.whl

Keywords: audio, tools

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Multimedia :: Sound/AudioTopic :: Scientific/Engineering

Tags

read audio files pythonaudio file metadata extractionwav flac mp3 ogg writingfast audio file readingcross-format audio support
audio-processingformat-conversion

More Scientific/Engineering packages