|
|
@@ -54,6 +54,7 @@ class MovecallMojiESP32S3 : public WifiBoard {
|
|
|
private:
|
|
|
i2c_master_bus_handle_t codec_i2c_bus_;
|
|
|
Button boot_button_;
|
|
|
+ Button asr_button_;
|
|
|
Display* display_;
|
|
|
|
|
|
void InitializeCodecI2c() {
|
|
|
@@ -130,6 +131,10 @@ private:
|
|
|
});
|
|
|
boot_button_.OnPressUp([this]() {
|
|
|
});
|
|
|
+ asr_button_.OnClick([this]() {
|
|
|
+ std::string wake_word="你好小智";
|
|
|
+ Application::GetInstance().WakeWordInvoke(wake_word);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
// 物联网初始化,添加对 AI 可见设备
|
|
|
@@ -140,7 +145,8 @@ private:
|
|
|
}
|
|
|
|
|
|
public:
|
|
|
- MovecallMojiESP32S3() : boot_button_(BOOT_BUTTON_GPIO) {
|
|
|
+ MovecallMojiESP32S3() : boot_button_(BOOT_BUTTON_GPIO),
|
|
|
+ asr_button_(ASR_BUTTON_GPIO){
|
|
|
InitializeCodecI2c();
|
|
|
InitializeSpi();
|
|
|
InitializeGc9a01Display();
|