ALSA bindings

pip install pyalsaaudio==0.10.0



For documentation, see

Author: Casper Wilstrup (
Maintainer: Lars Immisch (

This package contains wrappers for accessing the ALSA API from Python. It is currently fairly complete for PCM devices, and has some support for mixers.

If you find bugs in the wrappers please open an issue in the issue tracker. Please don't send bug reports regarding ALSA specifically. There are several bugs in the ALSA API, and those should be reported to the ALSA team - not me.

This software is licensed under the PSF license - the same one used by the majority of the python distribution. Basically you can use it for anything you wish (even commercial purposes). There is no warranty whatsoever.



To install pyalsaaudio via pip (or easy_install):

  $ pip install pyalsaaudio

Manual installation

Note: the wrappers need a kernel with ALSA support, and the ALSA library and headers. The installation of these varies from distribution to distribution.

On Debian or Ubuntu, make sure to install libasound2-dev. On Arch, install alsa-lib. When in doubt, search your distribution for a package that contains and asoundlib.h.

First, get the sources and change to the source directory:

  $ git clone
  $ cd pyalsaaudio

Then, build:

  $ python build

And install:

  $ sudo python install

Using the API

The API documentation is included in the doc subdirectory of the source distribution; it is also online on

There are some example programs included with the source: