Reset vad counter once it is triggered

This commit is contained in:
Jesse Hills 2023-10-12 07:27:54 +13:00
parent 41f29c46d0
commit dac4e81750
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -188,6 +188,7 @@ void VoiceAssistant::loop() {
} else {
ESP_LOGD(TAG, "VAD detected speech");
this->set_state_(State::START_PIPELINE, State::STREAMING_MICROPHONE);
this->vad_counter_ = 0;
}
} else {
if (this->vad_counter_ > 0) {