Crates.io | pywavers |
lib.rs | pywavers |
version | 0.1.1 |
source | src |
created_at | 2023-04-29 14:40:14.825528 |
updated_at | 2023-04-29 14:55:38.098329 |
description | A mixed Rust and Python crate/package for reading and writing WAVE files. Exposes the Rust crate Wavers to Python. |
homepage | |
repository | https://github.com/jmg049/PyWavers/ |
max_upload_size | |
id | 852111 |
size | 13,317 |
Firstly, PyWavers requries a Python version >= 3.10. Secondly the only main requirements is are Maturin and Numpy.
Create a Python venv/conda env that is running Python >= 3.10.
pip install numpy maturin
From the project root:
maturin develop --release
Congratulations, PyWavers has now been installed into the environment created in Step 1 and can be used in your Python code.
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)