sound_rs v0.5.0

01 · Start

Installation

One command. Wheels carry the decoders, so no ffmpeg or development headers are needed.

pip install sound_rs

Requirements

PlatformWheel tagPython
Linux x86_64cp310-abi3-manylinux_2_17_x86_643.10+
Linux aarch64cp310-abi3-manylinux_2_17_aarch643.10+
Windows amd64cp310-abi3-win_amd643.10+
macOS arm64cp310-abi3-macosx_11_0_arm643.10+
macOS Intelcp310-abi3-macosx_10_12_x86_643.10+

The wheels use the stable ABI, so one file covers every Python from 3.10 up — the same wheel installs on 3.10 through 3.14. Anything else (musl, PyPy, other architectures) falls back to the source distribution, which needs a Rust toolchain.

From source

git clone https://github.com/Neksand/sound_rs
cd sound_rs
pip install maturin
maturin develop --release

Linux audio

Playback uses ALSA through cpal. The Linux wheels bundle the ALSA runtime library, so import sound_rs, decoding, metadata and soundrs info work in a slim container without installing system packages. Playback still needs an output device; with none, it raises SoundRsError(code="device").

Source builds need the ALSA development headers:

sudo apt install libasound2-dev      # Debian / Ubuntu
sudo dnf install alsa-lib-devel      # Fedora
Alpine and muslmusllinux wheels are not published yet. Alpine falls back to the source distribution, which needs Rust plus alsa-lib-dev. The wheel does not require a separate ALSA runtime install.

Check it works

import sound_rs

print(sound_rs.__version__)
print(sound_rs.list_devices())        # [(0, 'MacBook Pro Speakers', True), ...]
print(sound_rs.get_audio_info("song.mp3"))

From a terminal, soundrs --help prints the same check as a command, with the documentation link. See Command line.

No sound, or an empty device list? See Troubleshooting.