Development Guide

XiaoZhi AI Development Documentation

This documentation is intended for developers who want to compile or modify the XiaoZhi AI program themselves. It includes the complete development environment setup process, core communication protocols, and implementation methods for extended functionality.

Development Environment

Communication Protocol Documentation

WebSocket Communication Protocol

Detailed explanation of WebSocket communication implementation between devices and servers, including connection establishment, message formats, audio transmission, and other core functions.

Emoji Emotion Display

Introduction to how large language models use Emoji to express emotional states, as well as related data formats and usage instructions.

Project Source Code Structure

The XiaoZhi AI project consists of the following main components:

  1. Main Control Program: Runs on ESP32 series chips
  2. Server Side: Handles device connections and voice forwarding
  3. Frontend Interface: Network configuration and settings page

Detailed source code structure and function descriptions can be found in the GitHub repository.

Common Development Issues

  • Compilation Error Resolution: Usually related to ESP-IDF version mismatch; please use the specific ESP-IDF version recommended in the documentation
  • Connection Timeout: Check WebSocket server configuration and network connection
  • Insufficient Memory: ESP32-S3 development boards offer higher performance and are recommended

Documentation Index

Document NameDescriptionUpdate Time
ESP-IDF Development Environment SetupESP-IDF development environment setup guide for Windows and XiaoZhi compilation instructions2025-03-06
WebSocket Communication ProtocolWebSocket client and server communication protocol documentation2025-03-06
Emoji Emotion DisplayCommunication protocol for large language models to express emotional states via Emoji2025-03-06