A mixed Rust and Python crate/package for reading and writing WAVE files. Exposes the Rust crate Wavers to Python.
Project description
PyWaveRS - WaveRs but for Python
WaveRs (pronounced wavers) is a Wav file reader/writer written in Rust and designed to fast and easy to use. WaveRs is also available in Python through the PyWaveRs package.
Getting Started · Benchmarks
Getting Started
Benchmarks
dtype | PyWavers | SoundFile | SciPy | TorchAudio (Sox) | TorchAudio (SoundFile) | TensorFlow Audio-IO |
---|---|---|---|---|---|---|
int16 | 18.0455 | 31.505 | 16.8316 | 195.954 | 191.826 | 49.0038 |
int32 | 35.8505 | 141.546 | nan | nan | nan | nan |
float32 | 43.3757 | 203.17 | nan | 228.13 | 225.659 | nan |
float64 | 81.4131 | 206.821 | nan | 324.17 | 315.95 | nan |
All times are in microseconds μs and are the time taken (on average) to load a single file from the set of test files. Timings were only taken when the library could load and automatically convert the file to another type of sampled audio data. Only PyWavers
and Soundfile
have this functionality built in. For the cases of f32
and f64
the conversion involves just casting to the other type therefore the times are included where applicable.
The NaNs present in the benchmarks table incidate the the library could not automatically load and convert to that data type. For example, SciPy
loads the native encoding of the file, it isn't that it can't load a file, it just can't convert it to another type of sampled audio data. The same occurs with Tensorflow
. PyTorch
has the options of normalizing or not normalizing the data (as f32
or native encoding), but it doesn't have the option to convert to another type of sampled audio data, such as between i16
and i32
.
The wav files included in the test set are between 7 and 15 seconds long. They are all encoded as PCM-16. The benchmarks were taken using Wavers v1.4.3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pywavers-0.1.0.tar.gz
.
File metadata
- Download URL: pywavers-0.1.0.tar.gz
- Upload date:
- Size: 476.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f24dfbc20dbae4dfb40f81da2d22ac4c60b8d9e5817f39e925e306cc019467 |
|
MD5 | 671c6ceef55f12d5043f1c8aabba10f7 |
|
BLAKE2b-256 | cfca13806262c0498bc256c50223fe66c7abb9a344270e00ded83395a0b82b48 |
File details
Details for the file pywavers-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: pywavers-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 306.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2077f4b3ea2aa03490e39b2f6b6dc1b43b02bd4841c9dd493c2fe9383d16bece |
|
MD5 | 2aba7d074c828a1fadeab5ee1991785c |
|
BLAKE2b-256 | d8f6d843c152968520a19cc6538de74c0eea5770f51bfdff8bc1412d4f1e0fb5 |