Skip to content

Commit

Permalink
Update voice-activity-detector.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
laochen authored Oct 30, 2024
1 parent b68424d commit a7f1a7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/voice-activity-detector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class VoiceActivityDetector::Impl {
void Flush() {
int32_t buffer_size = buffer_.Size();

if (buffer_size > 0) {
if (buffer_size >= window_size) {
std::vector<float> s = buffer_.Get(buffer_.Head(), buffer_size);
SpeechSegment segment;
segment.start = current_sample;
Expand Down

0 comments on commit a7f1a7b

Please sign in to comment.