audioop-lts is an LTS (Long Term Support) port of Python's built-in `audioop` module, which was deprecated in Python 3.11 and completely removed in Python 3.13. This project aims to maintain the functionality of the `audioop` module for future Python versions, specifically targeting Python 3.13 and greater. It provides operations for manipulating raw audio data, such as adding, averaging, and calculating RMS of sound fragments. The current version is 0.2.2. The library sees releases as needed for maintenance and compatibility with newer Python versions, indicating active maintenance rather than a strict release cadence.
pip install audioop-ltsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates basic operations using the `audioop-lts` library, which directly replaces the functionality of the removed `audioop` built-in module. It simulates a raw audio fragment and performs RMS calculation, fragment addition, and conversion to u-LAW encoding. Ensure your Python environment is 3.13 or newer.
Ensure your project's `requires_python` is set to `>=3.13` and that your development and deployment environments use Python 3.13 or a newer compatible version. For older Python versions, the original built-in `audioop` module would be available (up to 3.10) or alternatives like `pydub` might be used.
Always verify the sample width of your audio fragments and pass the corresponding byte-width to `audioop` functions. For example, 16-bit audio uses `width=2`.