From 70481429367ca00144b24f118cbfdfb28b02967d Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期三, 26 八月 2026 15:54:31 +0800
Subject: [PATCH] add sening functions
---
xiaozhi-esp32-2.2.6/main/audio/wake_words/afe_wake_word.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/xiaozhi-esp32-2.2.6/main/audio/wake_words/afe_wake_word.h b/xiaozhi-esp32-2.2.6/main/audio/wake_words/afe_wake_word.h
index 6c2bf72..1e641ad 100644
--- a/xiaozhi-esp32-2.2.6/main/audio/wake_words/afe_wake_word.h
+++ b/xiaozhi-esp32-2.2.6/main/audio/wake_words/afe_wake_word.h
@@ -6,6 +6,7 @@
#include <freertos/event_groups.h>
#include <esp_afe_sr_models.h>
+#include <esp_mn_iface.h>
#include <esp_nsn_models.h>
#include <model_path.h>
@@ -27,6 +28,7 @@
bool Initialize(AudioCodec* codec, srmodel_list_t* models_list);
void Feed(const std::vector<int16_t>& data);
void OnWakeWordDetected(std::function<void(const std::string& wake_word)> callback);
+ void OnOfflineCommandDetected(std::function<void(const std::string& command)> callback);
void Start();
void Stop();
size_t GetFeedSize();
@@ -39,12 +41,17 @@
const esp_afe_sr_iface_t* afe_iface_ = nullptr;
esp_afe_sr_data_t* afe_data_ = nullptr;
char* wakenet_model_ = NULL;
+ char* multinet_model_ = NULL;
+ esp_mn_iface_t* multinet_ = nullptr;
+ model_iface_data_t* multinet_data_ = nullptr;
std::vector<std::string> wake_words_;
EventGroupHandle_t event_group_;
std::function<void(const std::string& wake_word)> wake_word_detected_callback_;
+ std::function<void(const std::string& command)> offline_command_detected_callback_;
AudioCodec* codec_ = nullptr;
std::string last_detected_wake_word_;
std::vector<int16_t> input_buffer_;
+ std::vector<int16_t> multinet_input_buffer_;
std::mutex input_buffer_mutex_;
TaskHandle_t wake_word_encode_task_ = nullptr;
--
Gitblit v1.9.1