Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 701 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 701 Bytes

sphn

Python bindings for the symphonia and opus crates.

  • Easily load various audio file formats into numpy arrays.
  • Read/write ogg/opus audio files with streaming support.

Installation

The python wheels are available on pypi.

pip install sphn

Usage

Download some sample audio file.

wget https://github.com/metavoiceio/metavoice-src/raw/main/assets/bria.mp3
import sphn

# Read an audio file
data, sample_rate = sphn.read("bria.mp3")
print(data.shape, sample_rate)

# Save as wav
sphn.write_wav("bria.wav", data[0], sample_rate)