Skip to content
ALSA wrappers for Python
Branch: master
Clone or download
Latest commit 82febd3 Nov 16, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Update pyalsaaudio.rst Nov 16, 2018
.gitignore Inclide MANIFEST/dist/ May 13, 2015
CHANGES Prepare next release Feb 20, 2018
LICENSE Import from divmod. Added css. Original log message: Jan 24, 2008
MANIFEST.in This is release 0.4; it was tested with python2.5 and python3.0 (rc2 & Nov 29, 2008
NOTES.md Document release procedure Jul 9, 2017
README.md Correct capitalization May 13, 2015
TODO Import from divmod. Added css. Original log message: Jan 24, 2008
alsaaudio.c Transactional semantics for the alsapcm_set* calls Feb 28, 2018
isine.py Correct the sine example (finally!) Closes #10 Feb 25, 2017
mixertest.py Add functions for listing cards and their names Feb 8, 2017
play_rusage.py Fix memory leak on Python 3. Closes #2 May 8, 2015
playbacktest.py Make tests more robust, use devices or card indices. Feb 22, 2017
playwav.py Support 24bit audio Aug 29, 2017
recordtest.py Make tests more robust, use devices or card indices. Feb 22, 2017
setup.py Prepare next release Feb 20, 2018
test.py

README.md

PyAlsaAudio

For documentation, see http://larsimmisch.github.io/pyalsaaudio/

Author: Casper Wilstrup (cwi@aves.dk)
Maintainer: Lars Immisch (lars@ibp.de)

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.

Installation

PyPI

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 libasound.so and asoundlib.h.

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

  $ git clone https://github.com/larsimmisch/pyalsaaudio.git
  $ cd pyalsaaudio

Then, build:

  $ python setup.py build

And install:

  $ sudo python setup.py install

Using the API

The API documentation is included in the doc subdirectory of the source distribution; it is also online on http://larsimmisch.github.io/pyalsaaudio/.

There are some example programs included with the source:

You can’t perform that action at this time.