Add C++ runtime for silero_vad with RKNN (#2078)

This commit is contained in:
Fangjun Kuang
2025-04-01 15:56:56 +08:00
committed by GitHub
parent 0703bc1b86
commit 8e51a97550
12 changed files with 867 additions and 16 deletions

View File

@@ -100,12 +100,11 @@ int32_t main() {
while (!is_eof) {
if (i + window_size < wave->num_samples) {
SherpaOnnxVoiceActivityDetectorAcceptWaveform(vad, wave->samples + i,
window_size);
}
else {
SherpaOnnxVoiceActivityDetectorFlush(vad);
is_eof = 1;
SherpaOnnxVoiceActivityDetectorAcceptWaveform(vad, wave->samples + i,
window_size);
} else {
SherpaOnnxVoiceActivityDetectorFlush(vad);
is_eof = 1;
}
while (!SherpaOnnxVoiceActivityDetectorEmpty(vad)) {
const SherpaOnnxSpeechSegment *segment =