multinet wakeword (#927)

Co-authored-by: zk <982145@qq.com>
This commit is contained in:
ZhouKe
2025-07-18 01:18:40 +08:00
committed by GitHub
parent be46cf1731
commit 1aea59a472
6 changed files with 344 additions and 1 deletions

View File

@@ -21,6 +21,8 @@
#include "afe_wake_word.h"
#elif CONFIG_USE_ESP_WAKE_WORD
#include "esp_wake_word.h"
#elif CONFIG_USE_CUSTOM_WAKE_WORD
#include "custom_wake_word.h"
#else
#include "no_wake_word.h"
#endif
@@ -71,6 +73,8 @@ Application::Application() {
wake_word_ = std::make_unique<AfeWakeWord>();
#elif CONFIG_USE_ESP_WAKE_WORD
wake_word_ = std::make_unique<EspWakeWord>();
#elif CONFIG_USE_CUSTOM_WAKE_WORD
wake_word_ = std::make_unique<CustomWakeWord>();
#else
wake_word_ = std::make_unique<NoWakeWord>();
#endif
@@ -685,7 +689,7 @@ void Application::Start() {
}
ESP_LOGI(TAG, "Wake word detected: %s", wake_word.c_str());
#if CONFIG_USE_AFE_WAKE_WORD
#if CONFIG_USE_AFE_WAKE_WORD || CONFIG_USE_CUSTOM_WAKE_WORD
AudioStreamPacket packet;
// Encode and send the wake word data to the server
while (wake_word_->GetWakeWordOpus(packet.payload)) {