--- id: audiofile version: "1.6.1" license: MIT license_treatment: permissive maintenance: active --- # audiofile — Fast reading of all kind of audio files License: permissive · Maintenance: active · Downloads: 90.6K/mo ## 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 above — 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 pip install audiofile uv add audiofile 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_current - Install friction: low - Maintenance: active - Downloads: 90.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags read audio files python, audio file metadata extraction, wav flac mp3 ogg writing, fast audio file reading, cross-format audio support, audio-processing, format-conversion [View on SkillFed](https://skillfed.io/packages/audiofile) · [View on PyPI](https://pypi.org/project/audiofile/)