Files
xiaozhi-esp32/main/boards/esp-box-3
Xiaoxia b7db68457c v2.1.0: Upgrade esp-wifi-connect to 3.0; New device state machine (#1528)
* Upgrade component version

* update fonts component version

* Handle OTA error code

* Update project version to 2.1.0 and add device state machine implementation

- Upgrade  esp-wifi-connect to 3.0.0, allowing reconfiguring wifi without rebooting
- Introduce device state machine with state change notification in new files
- Remove obsolete device state event files
- Update application logic to utilize new state machine
- Minor adjustments in various board implementations for state handling

* fix compile errors

* Refactor power saving mode implementation to use PowerSaveLevel enumeration

- Updated Application class to replace SetPowerSaveMode with SetPowerSaveLevel, allowing for LOW_POWER and PERFORMANCE settings.
- Modified various board implementations to align with the new power save level structure.
- Ensured consistent handling of power save levels across different board files, enhancing code maintainability and clarity.

* Refactor power save level checks across multiple board implementations

- Updated the condition for power save level checks in various board files to ensure that the power save timer only wakes up when the level is not set to LOW_POWER.
- Improved consistency in handling power save levels, enhancing code clarity and maintainability.

* Refactor EnterWifiConfigMode calls in board implementations

- Updated calls to EnterWifiConfigMode to use the appropriate instance reference (self or board) across multiple board files.
- Improved code consistency and clarity in handling device state during WiFi configuration mode entry.

* Add cellular modem event handling and improve network status updates

- Introduced new network events for cellular modem operations, including detecting, registration errors, and timeouts.
- Enhanced the Application class to handle different network states and update the display status accordingly.
- Refactored Ml307Board to implement a callback mechanism for network events, improving modularity and responsiveness.
- Updated dual_network_board and board headers to support new network event callbacks, ensuring consistent handling across board implementations.

* update esp-wifi-connect version

* Update WiFi configuration tool messages across multiple board implementations to clarify user actions
2025-12-09 09:24:56 +08:00
..
2025-01-19 03:57:07 +08:00
2025-10-02 03:29:16 +08:00
2025-10-02 03:29:16 +08:00

ESP-BOX-3

简介

ESP-BOX-3 是乐鑫官方开发的 AIoT 开发套件,搭载 ESP32-S3-WROOM-1 模组,配备 2.4 英寸 320x240 ILI9341 显示屏双麦克风阵列支持离线语音唤醒与设备端回声消除AEC功能。

硬件特性

  • 主控: ESP32-S3-WROOM-1 (16MB Flash, 8MB PSRAM)
  • 显示屏: 2.4 英寸 IPS LCD (320x240, ILI9341)
  • 音频: ES8311 音频 Codec + ES7210 双麦 ADC
  • 音频功能: 支持设备端 AEC (回声消除)
  • 按键: Boot 按键 (单击/双击功能)
  • 其他: USB-C 供电与通信

配置、编译命令

配置编译目标为 ESP32S3

idf.py set-target esp32s3

打开 menuconfig 并配置

idf.py menuconfig

分别配置如下选项:

基本配置

  • Xiaozhi AssistantBoard Type → 选择 ESP BOX 3

UI风格选择

ESP-BOX-3 支持多种不同的 UI 显示风格,通过 menuconfig 配置选择:

  • Xiaozhi AssistantSelect display style → 选择显示风格

可选风格

表情动画风格 (Emote animation style) - 推荐
  • 配置选项: USE_EMOTE_MESSAGE_STYLE
  • 特点: 使用自定义的 EmoteDisplay 表情显示系统
  • 功能: 支持丰富的表情动画、眼睛动画、状态图标显示
  • 适用: 智能助手场景,提供更生动的人机交互体验
  • : emote::EmoteDisplay

⚠️ 重要: 选择此风格需要额外配置自定义资源文件:

  1. Xiaozhi AssistantFlash Assets → 选择 Flash Custom Assets
  2. Xiaozhi AssistantCustom Assets File → 填入资源文件地址:
    https://dl.espressif.com/AE/wn9_nihaoxiaozhi_tts-font_puhui_common_20_4-esp-box-3.bin
    
默认消息风格 (Enable default message style)
  • 配置选项: USE_DEFAULT_MESSAGE_STYLE (默认)
  • 特点: 使用标准的消息显示界面
  • 功能: 传统的文本和图标显示界面
  • 适用: 标准的对话场景
  • : SpiLcdDisplay
微信消息风格 (Enable WeChat Message Style)
  • 配置选项: USE_WECHAT_MESSAGE_STYLE
  • 特点: 仿微信聊天界面风格
  • 功能: 类似微信的消息气泡显示
  • 适用: 喜欢微信风格的用户
  • : SpiLcdDisplay

音频功能配置

设备端回声消除 (AEC)

  • Xiaozhi AssistantEnable Device-Side AEC → 启用

ESP-BOX-3 硬件支持设备端 AEC 功能,可有效消除扬声器播放声音对麦克风的干扰,提升语音识别准确率。

运行时切换: 双击 Boot 按键可在运行时开启/关闭 AEC 功能。

说明: 设备端 AEC 需要干净的扬声器输出参考路径和良好的麦克风与扬声器物理隔离才能正常工作。ESP-BOX-3 硬件已做优化设计。

唤醒词配置

ESP-BOX-3 支持多种唤醒词实现方式:

  • Xiaozhi AssistantWake Word Implementation Type → 选择唤醒词类型

推荐选择:

  • Wakenet model with AFE (USE_AFE_WAKE_WORD) - 支持 AEC 的唤醒词检测

S 保存,按 Q 退出。

编译

idf.py build

烧录

将 ESP-BOX-3 连接至电脑,并运行:

idf.py flash

按键说明

Boot 按键功能

单击

  • 配网状态: 进入 WiFi 配置模式
  • 空闲状态: 开始对话
  • 对话中: 打断或停止当前对话

双击 (需启用设备端 AEC)

  • 空闲状态: 切换 AEC 开启/关闭

常见问题

1. 为什么需要设备端 AEC

设备端 AEC 可以在本地实时消除扬声器播放声音对麦克风的干扰,在播放音乐或 TTS 回复时仍能准确识别语音指令。

2. 表情动画风格无法显示?

请确保已经配置了正确的自定义资源文件地址,并且设备能够访问该 URL 下载资源。

3. 如何恢复出厂设置?

长按 Boot 按键 3 秒以上,设备会清除所有配置并重启。