--- id: miniaudio version: "1.71" license: MIT license_treatment: permissive maintenance: active --- # miniaudio — python bindings for the miniaudio library and its decoders (mp3, flac, ogg vorbis, wav) License: permissive · Maintenance: active · Downloads: 674.9K/mo ## What it is and what it does Miniaudio is a Python wrapper around the miniaudio C library that handles audio I/O across Linux, macOS, Windows, and other platforms. It lets you play, record, decode, and convert audio files and streams without managing low-level audio APIs yourself. The library supports WAV, FLAC, MP3, and Ogg Vorbis formats, and runs audio operations in background threads so your Python code doesn't block during playback or recording. You interact with miniaudio through Python classes and enums rather than raw C integers. Audio samples are exposed as Python arrays with appropriately sized elements, and the library handles channel mixing, sample rate conversion, and format conversion. It also supports streaming large files and Icecast internet radio, making it suitable for both simple playback tasks and more complex audio pipelines. Use it for: - Play MP3 or FLAC files in a desktop application without external dependencies. - Record audio from the system microphone and save it as WAV or convert to a different format. - Decode an audio file to raw PCM samples for analysis, DSP, or machine learning pipelines. - Convert between audio formats and sample rates across different channel configurations. - Stream large audio files or internet radio without loading the entire file into memory first. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Miniaudio provides Python bindings for cross-platform audio playback, recording, decoding, and sample format conversion using the miniaudio C library. Yes. Miniaudio is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and provides a clean Pythonic interface to a mature cross-platform audio library. Install friction is moderate but manageable via prebuilt wheels. It is well-suited for projects needing audio playback, recording, or decoding without heavy dependencies. ## Install pip install miniaudio uv add miniaudio poetry add miniaudio ## Installing miniaudio Before you install: Medium install friction due to compiled wheel dependencies (cffi-based bindings). Wheels are provided for Python 3.10–3.13 across macOS, Linux, Windows, and ARM platforms. Repository is actively maintained with recent commits and no archived status. License in practice: MIT license is permissive; you may use, modify, and distribute this package and its bundled miniaudio C library with minimal restrictions, provided you include the license notice. Quickstart: pip install miniaudio import miniaudio # Get file info info = miniaudio.get_file_info("music.mp3") print(f"Duration: {info.duration}s") # Stream and play stream = miniaudio.stream_file("music.mp3") with miniaudio.PlaybackDevice() as device: device.start(stream) Requires Python 3.8 or newer; audio operations run in background threads, so playback device context must remain open during playback. Verify before relying: - Whether PyPy3 support (mentioned as working because it uses cffi) is actively tested or documented in CI. - Performance characteristics for real-time recording or low-latency playback scenarios. - Availability and maturity of Icecast internet radio streaming support mentioned in description. - Typical sample rate and channel configurations supported for conversion operations. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 674.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags audio playback recording python, mp3 flac wav decoding, audio format conversion, cross-platform audio library, pcm sample conversion, audio streaming playback, audio device recording, audio-io, cross-platform, streaming [View on SkillFed](https://skillfed.io/packages/miniaudio) · [View on PyPI](https://pypi.org/project/miniaudio/)