Skip to content

PyALSoft

PyALSoft provides a function-oriented audio API for common playback and recording tasks, along with typed low-level OpenAL Soft bindings. Wheels include the native OpenAL Soft runtime, so a separate installation is not normally required.

Installation

PyALSoft requires Python 3.12 or later. Install it from PyPI:

python -m pip install pyalsoft

Play a WAV file

play() begins playback immediately and returns a PlayingSound handle:

import time

from pyalsoft import play

sound = play("sound.wav")
while sound.playing:
    time.sleep(0.1)

Playback is asynchronous. If you do not need to control the sound, you can ignore the return value without stopping playback:

play("notification.wav")

Documentation

Complete runnable programs are available in the examples directory.