xiaozhi-esp32-server/docs/readme
zhenglieAllen 0d7180d898
fix(config): 给 mem_report_only 补上 Memory 配置块 (#3547)
* fix(config): 给 mem_report_only 补上 Memory 配置块

现象
把 selected_module.Memory 设成 mem_report_only 后,服务在连接初始化阶段
直接崩:

    KeyError: 'mem_report_only'

原因
core/providers/memory/mem_report_only/ 下有完整的 provider 实现,
core/connection.py 的 _initialize_memory 里也显式处理了它
(`if memory_type == "nomem" or memory_type == "mem_report_only"`),
但 config.yaml 的 Memory 段只配了 mem0ai / powermem / nomem /
mem_local_short 四项,没有 mem_report_only。

而 core/connection.py 取配置的方式是直接下标:

    memory_type = self.config["Memory"][self.config["selected_module"]["Memory"]]["type"]

于是只要在 selected_module 里选了 mem_report_only,这个下标就取不到,
连接初始化阶段 KeyError。data/.config.yaml 那边也是整段替换
(self.config["Memory"] = private_config["Memory"]),用户光改
selected_module 而不重复声明一遍 Memory 段,一样会炸。

改法
在 config.yaml 的 Memory 段补上 mem_report_only 配置块(type:
mem_report_only),让出厂配置自洽 —— 选了就能直接用,不需要用户自己
再补一段配置。

测试
新增 tests/config/test_provider_registry.py,钉死两条不变量:
- selected_module 里选中的 provider 必须在对应配置段里存在(防启动期 KeyError);
- 每个 provider 段的每个键,type 字段都必须指向真实存在的实现
  (防「配置有、实现没有」);
- Memory 这类一一对应的模块,实现里有的 provider 配置里必须有(防本次
  这种「实现有、配置没有」)。

修复前 test_every_implemented_provider_is_configured[Memory] 失败,
修复后通过。本地全量:5 failed / 99 passed / 33 skipped / 8 errors,
失败项与改动前完全一致(本地缺 portalocker / pytest-asyncio / edge_tts,
CI 由 requirements.txt 提供),无回归。

* docs(readme): 组件列表补齐 mem_report_only 与科大讯飞视觉模型

现象
README 的「本项目支持的平台/组件列表」有两处和实际出厂配置对不上:

1. VLLM 视觉模型表只列了「阿里百炼、智谱ChatGLMVLLM」,但 config.yaml 的
   VLLM 段出厂就带了 XunfeiSparkLLM(讯飞星火)这个 provider。
2. Memory 记忆存储表只列了 mem0ai / powermem / mem_local_short / nomem,
   没有 mem_report_only —— 而 core/providers/memory/mem_report_only/ 里有
   实现,core/connection.py 里也显式处理了它。

原因
这两个表是手工维护的,新增 provider 时没有同步。VLLM 段的讯飞星火尤其
隐蔽:它的 base_url 还被误填成了火山方舟的地址(ark.cn-beijing.volces.com),
看起来像是没在用,于是没人往表里补。

改法
6 份 README(README.md + docs/readme/ 下的 en/de/es/vi/pt_BR)同步更新:

- VLLM 视觉模型表的「支持平台」列补上科大讯飞 / iFLYTEK。免费平台列不动 ——
  讯飞星火虽有免费额度,但每个模型要单独开通服务后才能用,不属于开箱免费。
- Memory 记忆存储表补上 mem_report_only 一行(使用方式「仅上报」,
  备注「只上报聊天记录,不做记忆总结」,取自 provider 自身的 docstring)。

测试
纯文档改动,无代码路径变化。本次一并把 VLLM 表和 Memory 表跟 config.yaml
的实际内容对齐,避免再出现「文档列的组件在配置里选不到」的情况。

---------

Co-authored-by: Allen <zljtx2008@gmail.com>
2026-11-13 16:31:17 +08:00
..
README_de.md fix(config): 给 mem_report_only 补上 Memory 配置块 (#3547) 2026-11-13 16:31:17 +08:00
README_en.md fix(config): 给 mem_report_only 补上 Memory 配置块 (#3547) 2026-11-13 16:31:17 +08:00
README_es.md fix(config): 给 mem_report_only 补上 Memory 配置块 (#3547) 2026-11-13 16:31:17 +08:00
README_pt_BR.md fix(config): 给 mem_report_only 补上 Memory 配置块 (#3547) 2026-11-13 16:31:17 +08:00
README_vi.md fix(config): 给 mem_report_only 补上 Memory 配置块 (#3547) 2026-11-13 16:31:17 +08:00

Banners

Xiaozhi Backend Service xiaozhi-esp32-server

This project is based on human-machine symbiotic intelligence theory and technology to develop intelligent terminal hardware and software systems
providing backend services for the open-source intelligent hardware project xiaozhi-esp32
Implemented using Python, Java, and Vue according to the Xiaozhi Communication Protocol
Support for MQTT+UDP protocol, Websocket protocol, MCP access point, voiceprint recognition, and knowledge base

FAQ · Report Issues · Deployment Docs · Release Notes

简体中文版自述文件 README in English Tiếng Việt Deutsch Português (Brasil) Español GitHub Contributors GitHub pull requests stars

Spearheaded by Professor Siyuan Liu's Team (South China University of Technology)
刘思源教授团队主导研发(华南理工大学)
South China University of Technology


Target Users 👥

This project requires ESP32 hardware devices to work. If you have purchased ESP32-related hardware, successfully connected to Brother Xia's deployed backend service, and want to build your own xiaozhi-esp32 backend service independently, then this project is perfect for you.

Want to see the usage effects? Click the videos below 🎥

The feel of the response speed The secret to speeding things up Xiaozhi digital human with voice wake-up Device-to-device calling A complex medical scenario
Play music, check the weather, and read the news Real-time interruption Take a photo to identify objects Turn home appliances on and off Multi-command tasks
MCP access point MQTT command delivery Voiceprint recognition Custom voice timbre Talking in Cantonese

Warnings ⚠️

  1. This project is open-source software. This software has no commercial partnership with any third-party API service providers (including but not limited to speech recognition, large models, speech synthesis, and other platforms) that it interfaces with, and does not provide any form of guarantee for their service quality or financial security. It is recommended that users prioritize service providers with relevant business licenses and carefully read their service agreements and privacy policies. This software does not host any account keys, does not participate in fund flows, and does not bear the risk of recharge fund losses.

  2. The functionality of this project is not complete and has not passed network security assessment. Please do not use it in production environments. If you deploy this project for learning purposes in a public network environment, please ensure necessary protection measures are in place.


Deployment Documentation

Banners

This project provides two deployment methods. Please choose based on your specific needs:

🚀 Deployment Method Selection

Deployment Method Features Applicable Scenarios Deployment Docs Configuration Requirements Video Tutorials
Simplified Installation Intelligent dialogue, single agent management Low-configuration environments, data stored in config files, no database required ①Docker Version / ②Source Code Deployment Local FunASR needs more memory; using APIs for everything keeps resource usage low -
Full Module Installation Intelligent dialogue, multi-user management, multi-agent management, intelligent console interface operation Complete functionality experience, data stored in database ①Docker Version / ②Source Code Deployment / ③Source Code Deployment Auto-Update Tutorial Local FunASR needs more memory plus database resources; using APIs for everything keeps resource usage low Local Source Code Startup Video Tutorial

For frequently asked questions and related tutorials, please refer to this link

💡 Note: Below is a test platform deployed with the latest code. You can burn and test if needed. Concurrent users: 6, data will be cleared daily.

Intelligent Control Console Address: https://2662r3426b.vicp.fun
Intelligent Control Console Address (H5): https://2662r3426b.vicp.fun/h5/index.html

Service Test Tool: https://2662r3426b.vicp.fun/test/
OTA Interface Address: https://2662r3426b.vicp.fun/xiaozhi/ota/
Websocket Interface Address: wss://2662r3426b.vicp.fun/xiaozhi/v1/

🚩 Configuration Description and Recommendations

Note

This project provides two configuration schemes:

  1. Entry Level Free Settings: Suitable for personal and home use, all components use free solutions, no additional payment required.

  2. Streaming Configuration: Suitable for demonstrations, training, scenarios with more than 2 concurrent users, etc. Uses streaming processing technology for faster response speed and better experience.

Starting from version 0.5.2, the project supports streaming configuration. Compared to earlier versions, response speed is improved by approximately 2.5 seconds, significantly improving user experience.

Module Name Entry Level Free Settings Streaming Configuration
ASR(Speech Recognition) FunASR(Local) 👍XunfeiStreamASR(Xunfei Streaming)
LLM(Large Model) glm-4-flash(Zhipu) 👍qwen-flash(Alibaba Bailian)
VLLM(Vision Large Model) glm-4v-flash(Zhipu) 👍qwen3.5-flash(Alibaba Bailian)
TTS(Speech Synthesis) EdgeTTS(Microsoft) 👍HuoshanDoubleStreamTTS(Volcano Streaming)
Intent(Intent Recognition) function_call(Function calling) function_call(Function calling)
Memory(Memory function) mem_local_short(Local short-term memory) mem_local_short(Local short-term memory)

If you are concerned about the latency of each component, please refer to the Xiaozhi Component Performance Test Report, and test in your own environment following the test methods in the report.

🔧 Testing Tools

This project provides the following testing tools to help you verify the system and choose suitable models:

Tool Name Location Usage Method Function Description
Audio Interaction Test Tool main》digital-human》index.html In main/digital-human, install dependencies as its README says, then run python start.py and open http://127.0.0.1:8006/index.html Tests audio playback and reception functions, verifies if Python-side audio processing is normal
Model Response Test Tool main》xiaozhi-server》performance_tester.py Execute python performance_tester.py Tests response speed of core modules such as ASR(speech recognition), LLM(large model), VLLM(vision model), TTS(speech synthesis)

💡 Note: When testing model speed, only models with configured keys will be tested.


Feature List ✨

Implemented ✅

Full-module installation architecture diagram

Feature Module Description
Core Architecture Based on MQTT+UDP gateway, WebSocket and HTTP servers, provides complete console management and authentication system
Voice Interaction Supports streaming ASR(speech recognition), streaming TTS(speech synthesis), VAD(voice activity detection), supports multi-language recognition and voice processing
Voiceprint Recognition Supports multi-user voiceprint registration, management, and recognition, processes in parallel with ASR, real-time speaker identity recognition and passes to LLM for personalized responses
Intelligent Dialogue Supports multiple LLM(large language models), implements intelligent dialogue
Visual Perception Supports multiple VLLM(vision large models), implements multimodal interaction
Intent Recognition Supports pluggable external LLM intent recognition and autonomous LLM function calling, provides plugin-based intent processing mechanism
Memory System Supports local short-term memory, mem0ai interface memory, PowerMem intelligent memory, with memory summarization functionality
Knowledge Base Supports RAGFlow knowledge base, enabling LLM to judge whether to schedule the knowledge base after receiving the user's question, and then answer the question
Tool Calling Supports client IOT protocol, client MCP protocol, server MCP protocol, MCP access point protocol, custom tool functions
Command Delivery Supports MCP command delivery to ESP32 devices via MQTT protocol from Smart Console
Management Backend Provides Web management interface, supports user management, system configuration and device management; Supports Simplified Chinese, Traditional Chinese, English, German, Vietnamese and Brazilian Portuguese display
Testing Tools Provides model response performance testing tools and audio interaction testing tools
Deployment Support Supports Docker deployment and local deployment, provides complete configuration file management
Plugin System Supports functional plugin extensions and custom plugin development; newly added plugin files are loaded on the next device connection, code changes to already loaded plugins require a service restart

Under Development 🚧

To learn about specific development plan progress, click here. For frequently asked questions and related tutorials, please refer to this link

If you are a software developer, here is an Open Letter to Developers. Welcome to join!


Product Ecosystem 👬

Xiaozhi is an ecosystem. When using this product, you can also check out other excellent projects in this ecosystem


Supported Platforms/Components List 📋

LLM Language Models

Usage Method Supported Platforms Free Platforms
OpenAI interface calls Alibaba Bailian, Volcano Engine, DeepSeek, Zhipu, Gemini, iFLYTEK, LM Studio Zhipu, Gemini
Ollama interface calls Ollama -
Dify interface calls Dify -
FastGPT interface calls FastGPT -
Coze interface calls Coze -
Xinference interface calls Xinference -
HomeAssistant interface calls HomeAssistant -

In fact, any LLM that supports OpenAI interface calls can be integrated and used.


VLLM Vision Models

Usage Method Supported Platforms Free Platforms
OpenAI interface calls Alibaba Bailian, Zhipu ChatGLMVLLM, iFLYTEK Zhipu ChatGLMVLLM

In fact, any VLLM that supports OpenAI interface calls can be integrated and used.


TTS Speech Synthesis

Usage Method Supported Platforms Free Platforms
Interface calls EdgeTTS, iFLYTEK, Volcano Engine, Tencent Cloud, Alibaba Cloud and Bailian, CosyVoiceSiliconflow, TTS302AI, CozeCnTTS, CustomTTS, OpenAITTS, MinimaxTTS EdgeTTS, CosyVoiceSiliconflow(partial)
Local services FishSpeech, GPT_SOVITS_V2, GPT_SOVITS_V3, IndexStreamTTS, PaddleSpeechTTS IndexStreamTTS, PaddleSpeechTTS, FishSpeech, GPT_SOVITS_V2, GPT_SOVITS_V3

VAD Voice Activity Detection

Type Platform Name Usage Method Pricing Model Notes
VAD SileroVAD Local use Free

ASR Speech Recognition

Usage Method Supported Platforms Free Platforms
Local use FunASR, SherpaASR, SherpaParaformerASR, VoskASR FunASR, SherpaASR, SherpaParaformerASR, VoskASR
Interface calls FunASRServer, Volcano Engine, iFLYTEK, Tencent Cloud, Alibaba Cloud and Bailian, Baidu Cloud, OpenAI ASR, GroqASR, Qwen3ASRFlash FunASRServer

Voiceprint Recognition

Usage Method Supported Platforms Free Platforms
Interface calls Voiceprint service (voiceprint-api) -

Voiceprint recognition requires a separately deployed voiceprint-api service (based on 3D-Speaker) and MySQL. See the voiceprint integration guide.


Memory Storage

Type Platform Name Usage Method Pricing Model Notes
Memory mem0ai Interface calls 1000 times/month quota
Memory powermem Local summarization Depends on LLM and DB OceanBase open source, supports intelligent retrieval
Memory mem_local_short Local summarization Free
Memory nomem No memory mode Free
Memory mem_report_only Report only Free Only reports chat records, no memory summarization

Intent Recognition

Type Platform Name Usage Method Pricing Model Notes
Intent intent_llm Interface calls Based on LLM pricing Recognizes intent through large models, strong generalization
Intent function_call Interface calls Based on LLM pricing Completes intent through large model function calling, fast speed, good effect
Intent nointent No intent mode Free Does not perform intent recognition, directly returns dialogue result

Rag Retrieval-Augmented Generation

Type Platform Name Usage Method Pricing Model Notes
Rag ragflow Interface calls Charged based on tokens consumed for slicing and word segmentation Utilizes RagFlow's retrieval-augmented generation feature to provide more accurate dialog responses

Acknowledgments 🙏

Logo Project/Company Description
Bailing Voice Dialogue Robot This project is inspired by Bailing Voice Dialogue Robot and implemented on its basis
Tenclass Thanks to Tenclass for formulating standard communication protocols, multi-device compatibility solutions, and high-concurrency scenario practice demonstrations for the Xiaozhi ecosystem; providing full-link technical documentation support for this project
Xuanfeng Technology Thanks to Xuanfeng Technology for contributing function calling framework, MCP communication protocol, and plugin-based calling mechanism implementation code. Through standardized instruction scheduling system and dynamic expansion capabilities, it significantly improves the interaction efficiency and functional extensibility of frontend devices (IoT)
huangjunsen Thanks to huangjunsen for contributing the Smart Control Console Mobile module, which enables efficient control and real-time interaction across mobile devices, significantly enhancing the system's operational convenience and management efficiency in mobile scenarios.
Huiyuan Design Thanks to Huiyuan Design for providing professional visual solutions for this project, using their design practical experience serving over a thousand enterprises to empower this project's product user experience
Xi'an Qinren Information Technology Thanks to Xi'an Qinren Information Technology for deepening this project's visual system, ensuring consistency and extensibility of overall design style in multi-scenario applications
Code Contributors Thanks to all code contributors, your efforts have made the project more robust and powerful.
Star History Chart