This crate provides a pitch estimate for each frame of the audio signal and a probability the frame is voiced region.
The implementation is based on librosa. For easy translation from Python + Numpy to Rust, the implementation is written on top of ndarray crate.
You can use this both as a executable binary and as a library (C shared library and Rust library).
cargo run --release <input_file> <output_npy_file> <fmin> <fmax> --frame_ms <frame length in miliseconds>
or
cargo build --release
./target/release/pyin <input_file> <output_npy_file> <fmin> <fmax> --frame_ms <frame length in miliseconds>
The example is in test/test.c
. To build and run it with GCC,
./compile_test.sh
LD_LIBRARY_PATH=target/release ./test_pyin
Add the following to your Cargo.toml
:
[dependencies]
pyin = {git = "https://github.com/Sytronik/pyin-rs.git", tag = "v1.0.0"}