From dac4e817509c32eb0736c0f12340d5333093d4b7 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 12 Oct 2023 07:27:54 +1300 Subject: [PATCH] Reset vad counter once it is triggered --- esphome/components/voice_assistant/voice_assistant.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/voice_assistant/voice_assistant.cpp b/esphome/components/voice_assistant/voice_assistant.cpp index 802ae508ff..f699b0138d 100644 --- a/esphome/components/voice_assistant/voice_assistant.cpp +++ b/esphome/components/voice_assistant/voice_assistant.cpp @@ -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) {