pywavers

Crates.iopywavers
lib.rspywavers
version0.1.1
sourcesrc
created_at2023-04-29 14:40:14.825528
updated_at2023-04-29 14:55:38.098329
descriptionA mixed Rust and Python crate/package for reading and writing WAVE files. Exposes the Rust crate Wavers to Python.
homepage
repositoryhttps://github.com/jmg049/PyWavers/
max_upload_size
id852111
size13,317
Jack Geraghty (jmg049)

documentation

https://docs.rs/pywavers/

README

PyWavers

A mixed Rust and Python repository/package that exposes the Wavers Rust crate to Python.

crates.io

Documentation

Wavers

Building and installing PyWavers

Firstly, PyWavers requries a Python version >= 3.10. Secondly the only main requirements is are Maturin and Numpy.

Step 1

Create a Python venv/conda env that is running Python >= 3.10.

Step 2

pip install numpy maturin

Step 3

From the project root:

maturin develop --release

Step 4

Congratulations, PyWavers has now been installed into the environment created in Step 1 and can be used in your Python code.

Example Usage

import numpy as np
import pywavers as pw

if __name__ == '__main__':
    data_f32 = pywavers.read('./my_test_wav.wav' dtype=np.float32)
    pywavers.write('./my_output_test_wav.wav', data_f32, sample_rate=16000, dtype=np.int16)
Commit count: 6

cargo fmt