sound_rs v0.5.1

Python · Rust · macOS / Windows / Linux

Audio for Python, without ffmpeg.

sound_rs plays and decodes the formats people actually have — MP3, FLAC, WAV, OGG, M4A/AAC/ALAC, AIFF and CAF — from a single wheel. The decoders are compiled in; no ffmpeg binary is required. Linux wheels bundle the ALSA runtime, and array APIs need NumPy.

First sound11 mson a 10-minute file
Memory43 MBwhile streaming that file
Import1.1 msversus 32 ms for soundfile
Platforms3Linux, Windows, macOS

Timing and memory figures above are historical 0.3.0 measurements on one Mac, not device guarantees. See the benchmark methodology and limits.

pip install sound_rs
import sound_rs

with sound_rs.Player() as player:
    player.play_file("music.flac")   # streams from disk, returns immediately
    player.seek(42.0)
    print(player.position, player.duration)
    player.wait()

What it does

What it does not do

No effects, mixing graph or plugin system. If you need a DAW-style graph, this is the wrong tool; if you need to play or load audio reliably, it is the right one. The benchmark page also says where it is slower than the alternatives.

Where to go next