| Crates.io | ten-vad-rs |
| lib.rs | ten-vad-rs |
| version | 0.1.5 |
| created_at | 2025-07-09 10:13:19.969983+00 |
| updated_at | 2026-01-18 04:09:29.362649+00 |
| description | Rust library for working with the TEN VAD ONNX model. |
| homepage | |
| repository | https://github.com/wangfu91/ten-vad-rs |
| max_upload_size | |
| id | 1744683 |
| size | 435,443 |
A Rust library for working with the TEN VAD (Voice Activity Detector) ONNX model. A low-latency, high-performance and lightweight solution to detect speech in audio streams. 🚀
Add to your Cargo.toml:
[dependencies]
ten-vad-rs = "0.1.5" # Replace with the latest version
Here's a simple example using a WAV file:
use ten_vad_rs::TenVad;
let mut vad = TenVad::new("onnx/ten-vad.onnx", 16000).unwrap();
let audio_frame = vec![0i16; 256]; // 16-bit PCM audio samples in 16kHz
let vad_score = vad.process_frame(&audio_frame).unwrap();
See the examples/ directory for more advanced usage:
wav_file_vad.rs — Run VAD on a WAV filemicrophone_vad.rs — Real-time VAD from microphoneRequires Rust and a working ONNX Runtime environment. Build with:
cargo build --release
Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request.
Licensed under the Apache-2.0 license.