Build your own AI friend
Go to file
Xiaoxia b7db68457c
Some checks failed
Build Boards / Determine variants to build (push) Has been cancelled
Build Boards / Build ${{ matrix.name }} (push) Has been cancelled
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
.github Refactor: Use esp_video component (#1245) 2025-10-14 10:44:45 +08:00
docs v2.1.0: Upgrade esp-wifi-connect to 3.0; New device state machine (#1528) 2025-12-09 09:24:56 +08:00
main v2.1.0: Upgrade esp-wifi-connect to 3.0; New device state machine (#1528) 2025-12-09 09:24:56 +08:00
partitions feat: build default assets instead of downloading and v2 tables for esp-hi, echoear (#1203) 2025-09-16 15:24:24 +08:00
scripts Revise README for ogg_converter clarity and instructions (#1432) 2025-11-15 13:11:35 +08:00
.gitignore Add esp32c5 configuration (#1258) 2025-10-05 09:59:28 +08:00
CMakeLists.txt v2.1.0: Upgrade esp-wifi-connect to 3.0; New device state machine (#1528) 2025-12-09 09:24:56 +08:00
LICENSE Update LICENSE 2025-07-22 10:06:11 +08:00
README_ja.md Change LCD display layout from grids to layers (#1438) 2025-11-17 22:38:31 +08:00
README_zh.md Change LCD display layout from grids to layers (#1438) 2025-11-17 22:38:31 +08:00
README.md Change LCD display layout from grids to layers (#1438) 2025-11-17 22:38:31 +08:00
sdkconfig.defaults Fix lichuang-dev camera (#1290) 2025-10-14 20:44:44 +08:00
sdkconfig.defaults.esp32 Detect wake word model from index.json (#1211) 2025-09-17 08:31:51 +08:00
sdkconfig.defaults.esp32c3 Switch to 2.0 branch (#1152) 2025-09-04 15:41:28 +08:00
sdkconfig.defaults.esp32c5 feat: add esp-spot c5 (#1462) 2025-11-20 15:52:49 +08:00
sdkconfig.defaults.esp32c6 Switch to 2.0 branch (#1152) 2025-09-04 15:41:28 +08:00
sdkconfig.defaults.esp32p4 feat: support JPEG input (#1455) 2025-11-18 20:34:22 +08:00
sdkconfig.defaults.esp32s3 feat: build default assets instead of downloading and v2 tables for esp-hi, echoear (#1203) 2025-09-16 15:24:24 +08:00

An MCP-based Chatbot

(English | 中文 | 日本語)

Introduction

👉 Human: Give AI a camera vs AI: Instantly finds out the owner hasn't washed hair for three days【bilibili】

👉 Handcraft your AI girlfriend, beginner's guide【bilibili】

As a voice interaction entry, the XiaoZhi AI chatbot leverages the AI capabilities of large models like Qwen / DeepSeek, and achieves multi-terminal control via the MCP protocol.

Control everything via MCP

Version Notes

The current v2 version is incompatible with the v1 partition table, so it is not possible to upgrade from v1 to v2 via OTA. For partition table details, see partitions/v2/README.md.

All hardware running v1 can be upgraded to v2 by manually flashing the firmware.

The stable version of v1 is 1.9.2. You can switch to v1 by running git checkout v1. The v1 branch will be maintained until February 2026.

Features Implemented

  • Wi-Fi / ML307 Cat.1 4G
  • Offline voice wake-up ESP-SR
  • Supports two communication protocols (Websocket or MQTT+UDP)
  • Uses OPUS audio codec
  • Voice interaction based on streaming ASR + LLM + TTS architecture
  • Speaker recognition, identifies the current speaker 3D Speaker
  • OLED / LCD display, supports emoji display
  • Battery display and power management
  • Multi-language support (Chinese, English, Japanese)
  • Supports ESP32-C3, ESP32-S3, ESP32-P4 chip platforms
  • Device-side MCP for device control (Speaker, LED, Servo, GPIO, etc.)
  • Cloud-side MCP to extend large model capabilities (smart home control, PC desktop operation, knowledge search, email, etc.)
  • Customizable wake words, fonts, emojis, and chat backgrounds with online web-based editing (Custom Assets Generator)

Hardware

Breadboard DIY Practice

See the Feishu document tutorial:

👉 "XiaoZhi AI Chatbot Encyclopedia"

Breadboard demo:

Breadboard Demo

Supports 70+ Open Source Hardware (Partial List)

Software

Firmware Flashing

For beginners, it is recommended to use the firmware that can be flashed without setting up a development environment.

The firmware connects to the official xiaozhi.me server by default. Personal users can register an account to use the Qwen real-time model for free.

👉 Beginner's Firmware Flashing Guide

Development Environment

  • Cursor or VSCode
  • Install ESP-IDF plugin, select SDK version 5.4 or above
  • Linux is better than Windows for faster compilation and fewer driver issues
  • This project uses Google C++ code style, please ensure compliance when submitting code

Developer Documentation

Large Model Configuration

If you already have a XiaoZhi AI chatbot device and have connected to the official server, you can log in to the xiaozhi.me console for configuration.

👉 Backend Operation Video Tutorial (Old Interface)

For server deployment on personal computers, refer to the following open-source projects:

Other client projects using the XiaoZhi communication protocol:

Custom Assets Tools:

About the Project

This is an open-source ESP32 project, released under the MIT license, allowing anyone to use it for free, including for commercial purposes.

We hope this project helps everyone understand AI hardware development and apply rapidly evolving large language models to real hardware devices.

If you have any ideas or suggestions, please feel free to raise Issues or join the QQ group: 1011329060

Star History

Star History Chart