Detect wake word model from index.json (#1211)
* detect wake word model from index.json * update wait time before entering wifi configure mode
This commit is contained in:
@ -18,18 +18,6 @@ idf.py menuconfig
|
||||
Xiaozhi Assistant -> Board Type -> AtomMatrix + Echo Base
|
||||
```
|
||||
|
||||
**修改 flash 大小:**
|
||||
|
||||
```
|
||||
Serial flasher config -> Flash size -> 4 MB
|
||||
```
|
||||
|
||||
**修改分区表:**
|
||||
|
||||
```
|
||||
Partition Table -> Custom partition CSV file -> partitions/v1/4m.csv
|
||||
```
|
||||
|
||||
**编译:**
|
||||
|
||||
```bash
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
{
|
||||
"name": "atommatrix-echo-base",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/4m.csv\""
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
"name": "atoms3-echo-base",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM=n",
|
||||
"CONFIG_USE_AFE=n",
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v2/8m.csv\""
|
||||
]
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
{
|
||||
"name": "bread-compact-esp32-lcd",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/4m.csv\"",
|
||||
"LCD_ST7789_240X240_7PIN=y"
|
||||
]
|
||||
}
|
||||
|
||||
@ -18,18 +18,6 @@ idf.py menuconfig
|
||||
Xiaozhi Assistant -> Board Type -> 面包板 ESP32 DevKit
|
||||
```
|
||||
|
||||
**修改 flash 大小:**
|
||||
|
||||
```
|
||||
Serial flasher config -> Flash size -> 4 MB
|
||||
```
|
||||
|
||||
**修改分区表:**
|
||||
|
||||
```
|
||||
Partition Table -> Custom partition CSV file -> partitions/v1/4m.csv
|
||||
```
|
||||
|
||||
**编译:**
|
||||
|
||||
```bash
|
||||
|
||||
@ -4,16 +4,12 @@
|
||||
{
|
||||
"name": "bread-compact-esp32",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/4m.csv\"",
|
||||
"CONFIG_OLED_SSD1306_128X64=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bread-compact-esp32-128x32",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/4m.csv\"",
|
||||
"CONFIG_OLED_SSD1306_128X32=y"
|
||||
]
|
||||
}
|
||||
|
||||
@ -41,8 +41,8 @@ void WifiBoard::EnterWifiConfigMode() {
|
||||
wifi_ap.SetSsidPrefix("Xiaozhi");
|
||||
wifi_ap.Start();
|
||||
|
||||
// 等待 1 秒显示开发板信息
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
// 等待 1.5 秒显示开发板信息
|
||||
vTaskDelay(pdMS_TO_TICKS(1500));
|
||||
|
||||
// 显示 WiFi 配置 AP 的 SSID 和 Web 服务器 URL
|
||||
std::string hint = Lang::Strings::CONNECT_TO_HOTSPOT;
|
||||
|
||||
@ -23,18 +23,6 @@ idf.py menuconfig
|
||||
Xiaozhi Assistant -> Board Type -> ESP32 CGC 144
|
||||
```
|
||||
|
||||
**修改 flash 大小:**
|
||||
|
||||
```
|
||||
Serial flasher config -> Flash size -> 4 MB
|
||||
```
|
||||
|
||||
**修改分区表:**
|
||||
|
||||
```
|
||||
Partition Table -> Custom partition CSV file -> partitions/v1/4m.csv
|
||||
```
|
||||
|
||||
**编译:**
|
||||
|
||||
```bash
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
{
|
||||
"name": "esp32-cgc-144",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/4m.csv\""
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -29,18 +29,6 @@ Xiaozhi Assistant -> Board Type -> ESP32 CGC
|
||||
Xiaozhi Assistant -> LCD Type -> "ST7735, 分辨率128*128"
|
||||
```
|
||||
|
||||
**修改 flash 大小:**
|
||||
|
||||
```
|
||||
Serial flasher config -> Flash size -> 4 MB
|
||||
```
|
||||
|
||||
**修改分区表:**
|
||||
|
||||
```
|
||||
Partition Table -> Custom partition CSV file -> partitions/v1/4m.csv
|
||||
```
|
||||
|
||||
**编译:**
|
||||
|
||||
```bash
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
{
|
||||
"name": "esp32-cgc",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/4m.csv\"",
|
||||
"CONFIG_LCD_ST7735_128X128=y"
|
||||
]
|
||||
}
|
||||
|
||||
@ -43,11 +43,8 @@ private:
|
||||
}
|
||||
|
||||
void InitializePowerSaveTimer() {
|
||||
#if CONFIG_USE_ESP_WAKE_WORD
|
||||
sleep_timer_ = new SleepTimer(300);
|
||||
#else
|
||||
// Wake word detection will be disabled in light sleep mode
|
||||
sleep_timer_ = new SleepTimer(30);
|
||||
#endif
|
||||
sleep_timer_->OnEnterLightSleepMode([this]() {
|
||||
ESP_LOGI(TAG, "Enabling sleep mode");
|
||||
// Show the standby screen
|
||||
|
||||
@ -43,11 +43,7 @@ private:
|
||||
}
|
||||
|
||||
void InitializePowerSaveTimer() {
|
||||
#if CONFIG_USE_ESP_WAKE_WORD
|
||||
power_save_timer_ = new PowerSaveTimer(160, 300);
|
||||
#else
|
||||
power_save_timer_ = new PowerSaveTimer(160, 60);
|
||||
#endif
|
||||
power_save_timer_->OnEnterSleepMode([this]() {
|
||||
GetDisplay()->SetPowerSaveMode(true);
|
||||
});
|
||||
|
||||
@ -30,11 +30,7 @@ private:
|
||||
PressToTalkMcpTool* press_to_talk_tool_ = nullptr;
|
||||
|
||||
void InitializePowerSaveTimer() {
|
||||
#if CONFIG_USE_ESP_WAKE_WORD
|
||||
power_save_timer_ = new PowerSaveTimer(160, 300);
|
||||
#else
|
||||
power_save_timer_ = new PowerSaveTimer(160, 60);
|
||||
#endif
|
||||
power_save_timer_->OnEnterSleepMode([this]() {
|
||||
GetDisplay()->SetPowerSaveMode(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user