Don't feed wake word if listening

This commit is contained in:
Terrence
2025-03-06 07:13:17 +08:00
parent 70cb3410b0
commit f1de536110
2 changed files with 1 additions and 4 deletions

View File

@@ -685,7 +685,7 @@ void Application::InputAudio() {
} }
#if CONFIG_USE_WAKE_WORD_DETECT #if CONFIG_USE_WAKE_WORD_DETECT
if (wake_word_detect_.IsDetectionRunning()) { if (device_state_ != kDeviceStateListening && wake_word_detect_.IsDetectionRunning()) {
wake_word_detect_.Feed(data); wake_word_detect_.Feed(data);
} }
#endif #endif

View File

@@ -132,9 +132,6 @@ void WakeWordDetect::AudioDetectionTask() {
auto res = esp_afe_sr_v1.fetch(afe_detection_data_); auto res = esp_afe_sr_v1.fetch(afe_detection_data_);
if (res == nullptr || res->ret_value == ESP_FAIL) { if (res == nullptr || res->ret_value == ESP_FAIL) {
if (res != nullptr) {
ESP_LOGI(TAG, "Error code: %d", res->ret_value);
}
continue;; continue;;
} }