Skip to content

Conversation

@shenjinti
Copy link

Adds a python demo (vad_demo.py) that implements the complete VAD inference pipeline using ONNX Runtime.

cd examples_onnx 
python3 vad_demo.py --input ../examples/s0724-s0730.wav --labels

@shenjinti shenjinti changed the title fea: add python demo for onnx feat: add python demo for onnx Jul 1, 2025
@Ziyi6 Ziyi6 mentioned this pull request Jul 9, 2025
@wangfu91
Copy link

For anyone interested, based on the code in this PR, I created a Rust library ten-vad-rs to work with the ten_vad.onnx ONNX model. Feedback is welcome. 😺


for i in range(num_frames):
start_idx = i * HOP_SIZE
end_idx = start_idx + HOP_SIZE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be end_idx = start_idx + WINDOW_SIZE.

It brings the model output closer to the reference C library when run on the same file.

@Ziyi6
Copy link
Collaborator

Ziyi6 commented Nov 15, 2025

Hi, I just merged a PR, which is about calling C++ code from Python using pybind11. Using this, in python we can get the VAD result as precise as the C++ version. If you're interested, have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants