forked from xiaozhi/xiaozhi-esp32
Don't feed wake word if listening
This commit is contained in:
@@ -685,7 +685,7 @@ void Application::InputAudio() {
|
||||
}
|
||||
|
||||
#if CONFIG_USE_WAKE_WORD_DETECT
|
||||
if (wake_word_detect_.IsDetectionRunning()) {
|
||||
if (device_state_ != kDeviceStateListening && wake_word_detect_.IsDetectionRunning()) {
|
||||
wake_word_detect_.Feed(data);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -132,9 +132,6 @@ void WakeWordDetect::AudioDetectionTask() {
|
||||
|
||||
auto res = esp_afe_sr_v1.fetch(afe_detection_data_);
|
||||
if (res == nullptr || res->ret_value == ESP_FAIL) {
|
||||
if (res != nullptr) {
|
||||
ESP_LOGI(TAG, "Error code: %d", res->ret_value);
|
||||
}
|
||||
continue;;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user