From 363b8e4c1e35ed844a0349c9d129f7a322a4f66e Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 8 Sep 2024 17:52:53 +0800 Subject: [PATCH] Fix vad.Flush(). (#1329) Fixes #1314 --- sherpa-onnx/csrc/voice-activity-detector.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sherpa-onnx/csrc/voice-activity-detector.cc b/sherpa-onnx/csrc/voice-activity-detector.cc index 73b77b55..e3c8a795 100644 --- a/sherpa-onnx/csrc/voice-activity-detector.cc +++ b/sherpa-onnx/csrc/voice-activity-detector.cc @@ -123,7 +123,7 @@ class VoiceActivityDetector::Impl { return; } - int32_t end = buffer_.Tail() - model_->MinSilenceDurationSamples(); + int32_t end = buffer_.Tail() if (end <= start_) { return; }