mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-04 09:29:22 +08:00
Update the ort dependency from 2.0.0-rc.2 to 2.0.0-rc.10 and adapt the code to work with the new API. This includes: - Updating ndarray to 0.16 to match ort's requirements - Using Session and Value from their new module locations - Adapting to the new Value::from_array() and try_extract_tensor() APIs - Converting SessionInputs from Value references Co-Authored-By: Claude <noreply@anthropic.com>
Stream example in Rust
Made after C++ stream example
Dependencies
- To build Rust crate
ortyou needccinstalled.
Usage
Just
cargo run
If you run example outside of this repo adjust environment variable
SILERO_MODEL_PATH=/path/to/silero_vad.onnx cargo run
If you need to test against other wav file, not recorder.wav, specify it as the first argument
cargo run -- /path/to/audio/file.wav