Files
sherpa-onnx/rust-api-examples/run-silero-vad-remove-silence.sh
T
Fangjun Kuang 5e828e351b Add Rust API for VAD (#3213)
This pull request expands the Rust API by integrating Voice Activity Detection (VAD) capabilities. It introduces new modules and structures to allow Rust applications to perform VAD, specifically demonstrated through an example that removes silent segments from audio files. This addition enhances the functionality of the sherpa-onnx Rust bindings, making it more versatile for various audio processing tasks.
2026-02-24 20:49:14 +08:00

17 lines
523 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
# https://k2-fsa.github.io/sherpa/onnx/vad/silero-vad.html
if [ ! -f "./silero_vad.onnx" ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx
fi
if [ ! -f ./lei-jun-test.wav ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/lei-jun-test.wav
fi
cargo run --example silero_vad_remove_silence -- \
--input ./lei-jun-test.wav \
--output ./no-silence.wav \
--silero-vad-model ./silero_vad.onnx