skillfed

PyAudio

Cross-platform audio I/O with PortAudio

pyaudio v0.2.14 1.3M downloads/30d#4,037 on PyPI
Permissive license MIT DORMANT released

What it is and what it does

PyAudio wraps PortAudio v19, a cross-platform audio I/O library, to let you record from and play to audio devices in Python. It abstracts away platform-specific audio APIs—Windows MME, DirectSound, WASAPI, and WDM-KS on Windows; Core Audio on macOS; and ALSA or OSS on GNU/Linux—so you can write audio code once and run it on multiple operating systems.

The package has no runtime dependencies beyond PortAudio itself, which must be installed separately on macOS and GNU/Linux. Installation is straightforward on Windows via pip, but requires prior system setup on Unix-like platforms. The project is in Beta status and has not been updated recently, so it is stable but not actively developed.

Use it for:

  • Record audio from a microphone or line input for speech recognition, music analysis, or audio logging applications.
  • Play back audio files or generated sound in real-time applications such as games, synthesizers, or notification systems.
  • Build cross-platform audio processing pipelines that capture, process, and output audio without rewriting for each OS.
  • Prototype audio I/O functionality in Python before moving to lower-level APIs or compiled languages.

Worth the install?

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

PyAudio provides Python bindings for PortAudio v19, enabling you to play and record audio on Windows, macOS, and GNU/Linux from Python code.

Yes, if you need straightforward cross-platform audio I/O in Python and are willing to handle platform-specific setup (Homebrew on macOS, system packages on Linux). The package is stable, permissively licensed, and has no known vulnerabilities. Install friction is moderate but manageable. Be aware that the project is dormant and unlikely to receive updates; if you need active maintenance or ASIO support on Windows, consider alternatives.

Install

pyaudio on PyPI

pip

pip install pyaudio

uv

uv add pyaudio

poetry

poetry add pyaudio

Installing PyAudio

Before you install

Medium install friction: precompiled wheels exist for Windows across multiple Python versions, but macOS requires Homebrew to install portaudio first, and GNU/Linux requires system packages or building from source with development libraries.

License in practice

MIT license is permissive; you can use, modify, and distribute PyAudio with minimal restrictions, provided you include the license notice.

Quickstart

pip install pyaudio

import pyaudio

p = pyaudio.PyAudio()
print(p.get_device_count())

On macOS, install portaudio via Homebrew first: brew install portaudio. On GNU/Linux, install portaudio19 development libraries and python3 headers via your package manager before pip install.

Verify before relying

  • Whether ASIO support is available on Windows via custom builds, given the standard distribution does not include it.
  • Current maintenance trajectory and likelihood of future updates given dormant status.

Package facts

License MIT (permissive)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance dormant — 1,011 days since the last release
First released
Downloads 1,335,110/month — #4,037 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: PyAudio-0.2.14-cp310-cp310-win32.whl; PyAudio-0.2.14-cp310-cp310-win_amd64.whl; PyAudio-0.2.14-cp311-cp311-win32.whl; PyAudio-0.2.14-cp311-cp311-win_amd64.whl; PyAudio-0.2.14-cp312-cp312-win32.whl; PyAudio-0.2.14-cp312-cp312-win_amd64.whl; PyAudio-0.2.14-cp313-cp313-win32.whl; PyAudio-0.2.14-cp313-cp313-win_amd64.whl; PyAudio-0.2.14-cp38-cp38-win32.whl; PyAudio-0.2.14-cp38-cp38-win_amd64.whl; PyAudio-0.2.14-cp39-cp39-win32.whl; PyAudio-0.2.14-cp39-cp39-win_amd64.whl

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Topic :: Multimedia :: Sound/Audio

Tags

audio input output pythonrecord audio pythonplay audio pythoncross-platform audio libraryportaudio python bindingsmicrophone recording pythonsound playback python
audio-iocross-platformportaudio

More Sound/Audio packages