Rdzleo dbdd304905 代码初始化:
本项目为触摸版项目代码复制而来,基于此版本进行按键功能的适配!
2026-03-23 11:14:56 +08:00
..
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00
2026-03-23 11:14:56 +08:00

ESP-Brookesia Xiaozhi Agent

Overview

brookesia_agent_xiaozhi is a XiaoZhi AI agent implementation for the ESP-Brookesia ecosystem, providing:

  • XiaoZhi Platform Integration: Communication with XiaoZhi AI platform based on esp_xiaozhi SDK
  • Real-time Voice Interaction: OPUS audio codec support at 16kHz sample rate and 24kbps bitrate
  • Rich Event Support: Speaking/listening status changes, agent/user text, emote events
  • Manual Listening Control: Manual start/stop listening for Manual chat mode
  • Interrupt Speaking: Support for interrupting agent speech
  • Unified Lifecycle Management: Unified agent lifecycle management based on brookesia_agent_manager framework

Features

Supported General Functions

Function Description
InterruptSpeaking Interrupt agent speaking

Supported General Events

Event Description
SpeakingStatusChanged Speaking status changed
ListeningStatusChanged Listening status changed
AgentSpeakingTextGot Agent speaking text received
UserSpeakingTextGot User speaking text received
EmoteGot Emote event

How to Use

Development Environment Requirements

Before using this library, please ensure the following SDK development environment is installed:

Adding to Project

brookesia_agent_xiaozhi has been uploaded to the Espressif Component Registry. You can add it to your project in the following ways:

  1. Using Command Line

    Run the following command in your project directory:

    idf.py add-dependency "espressif/brookesia_agent_xiaozhi"
    
  2. Modify Configuration File

    Create or modify the idf_component.yml file in your project directory:

    dependencies:
      espressif/brookesia_agent_xiaozhi: "*"
    

Kconfig Options

Option Description Default
BROOKESIA_AGENT_XIAOZHI_ENABLE_AUTO_REGISTER Enable automatic plugin registration y
BROOKESIA_AGENT_XIAOZHI_ENABLE_DEBUG_LOG Enable debug logs n
BROOKESIA_AGENT_XIAOZHI_GET_HTTP_INFO_INTERVAL_MS Activation check interval (ms) 30000
BROOKESIA_AGENT_XIAOZHI_WAKE_WORD Wake word "Hi,ESP"