mirror of
https://github.com/k2-fsa/sherpa-onnx.git
synced 2026-11-10 21:11:03 +08:00
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.
17 lines
523 B
Bash
Executable File
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
|