+This project provides backend services for the open-source smart hardware project
+xiaozhi-esp32
+Implemented in Python according to the Xiaozhi Communication Protocol
+Helping you quickly set up your Xiaozhi server
+
-# XiaoZhi ESP-32 Backend Service (xiaozhi-esp32-server)
-
-([中文](README.md) | English)
-
-This project provides the backend service for the open source smart hardware project [xiaozhi-esp32](https://github.com/78/xiaozhi-esp32). It is implemented in `Python` based on the [XiaoZhi Communication Protocol](https://ccnphfhqs21z.feishu.cn/wiki/M0XiwldO9iJwHikpXD5cEx71nKh).
-
---
-## Target Audience 👥
+## Target Users 👥
-This project is designed to be used in conjunction with ESP32 hardware devices. If you have already purchased an ESP32 device, successfully connected to the backend service deployed by XieGe, and now wish to set up your own `xiaozhi-esp32` backend service, then this project is perfect for you.
+This project requires ESP32 hardware devices. If you have purchased ESP32-related hardware, successfully connected to Brother Xia's backend service, and wish to set up your own `xiaozhi-esp32` backend service, then this project is perfect for you.
-Want to see it in action? Check out the videos 🎥
+Want to see it in action? Check out these videos 🎥
---
-## System Requirements and Deployment Prerequisites 🖥️
+## System Requirements and Prerequisites 🖥️
-- **Hardware**: A set of devices compatible with `xiaozhi-esp32` (for specific models, please refer to [this link](https://rcnv1t9vps13.feishu.cn/wiki/DdgIw4BUgivWDPkhMj1cGIYCnRf)).
-- **Server**: A computer with at least a 4-core CPU and 8GB of memory.
-- **Firmware Compilation**: Please update the backend service API endpoint in the `xiaozhi-esp32` project, then recompile the firmware and flash it to your device.
+- **Computer or Server**: Recommended 4-core CPU, 8GB RAM computer. If using ASR with API, can run on a 2-core CPU, 2GB RAM server.
+- **Update Client Interface**: Please update the backend service interface address in the client.
---
## Warning ⚠️
-This project is relatively new and has not yet undergone network security evaluations. **Do not use it in a production environment.**
+1. This is open-source software. This software and any third-party API service providers it interfaces with (including but not limited to speech recognition, large language models, speech synthesis, and other platforms) have no commercial partnership. We do not provide any form of guarantee for their service quality or financial security.
+We recommend 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 transfers, and does not bear the risk of recharge fund losses.
-If you deploy this project on a public network for learning purposes, be sure to enable protection in the configuration file `config.yaml`:
+2. This project is relatively new and has not yet passed network security testing. Please do not use it in production environments. If you deploy this project for learning purposes in a public network environment, please make sure to enable protection in the `config.yaml` configuration file:
```yaml
server:
@@ -91,202 +147,150 @@ server:
enabled: true
```
-Once protection is enabled, you will need to validate the machine's token or MAC address based on your actual situation. Please refer to the configuration documentation for details.
+After enabling protection, you need to verify the machine's token or MAC address according to actual circumstances. Please refer to the configuration documentation for details.
---
+## Deployment Methods 🚀
+
+### I. [Deployment Guide](./docs/Deployment.md)
+
+This project supports three deployment methods. You can choose based on your actual needs.
+
+1. [Quick Docker Deployment](./docs/Deployment.md)
+
+Suitable for regular users who want to quickly experience without much environment configuration. The downside is that pulling the image can be slow. Video tutorial available: [Beautiful expert teaches Docker deployment](https://www.bilibili.com/video/BV1RNQnYDE5t)
+
+2. [Deploy Using Docker Environment](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%BA%8C%E5%80%9F%E5%8A%A9docker%E7%8E%AF%E5%A2%83%E8%BF%90%E8%A1%8C%E9%83%A8%E7%BD%B2)
+
+For software engineers who have Docker installed and want to make custom code modifications.
+
+3. [Local Source Code Run](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%89%E6%9C%AC%E5%9C%B0%E6%BA%90%E7%A0%81%E8%BF%90%E8%A1%8C)
+
+Suitable for users familiar with `Conda` environment or who want to build the running environment from scratch.
+
+For scenarios requiring higher response speed, we recommend using the local source code run method to reduce additional overhead. Video tutorial available: [Handsome expert teaches source code deployment](https://www.bilibili.com/video/BV1GvQWYZEd2)
+
+### II. [Firmware Compilation](./docs/firmware-build.md)
+
+Click here to view the detailed process of [firmware compilation](./docs/firmware-build.md).
+
+After successful flashing and network connection, wake up Xiaozhi using the wake word and pay attention to the console output on the server side.
+
+---
+
+## Common Questions ❓
+
+For issues or product suggestions, please [click here](docs/FAQ.md).
+
+---
+
+## Product Ecosystem 👬
+Xiaozhi is an ecosystem. When using this product, you might want to check out other excellent projects in this ecosystem:
+
+- [Xiaozhi Android Client](https://github.com/TOM88812/xiaozhi-android-client)
+ A voice dialogue application based on xiaozhi-server for Android and iOS, supporting real-time voice interaction and text dialogue. Now in Flutter version, supporting both iOS and Android.
+- [Xiaozhi PC Client](https://github.com/Huang-junsen/py-xiaozhi)
+ This project provides a Python-based Xiaobai AI client, allowing you to experience Xiaozhi AI features through code even without physical hardware. Main features include AI voice interaction, visual multimodal recognition, IoT device integration, online music playback, voice wake-up, automatic dialogue mode, graphical interface, command-line mode, cross-platform support, volume control, session management, encrypted audio transmission, automatic verification code processing, etc.
+- [Xiaozhi Java Server](https://github.com/Huang-junsen/xiaozhi-java)
+ The Xiaozhi open-source backend service Java version is a Java-based open-source project that includes both frontend and backend services, aiming to provide users with a complete backend service solution.
+---
## Feature List ✨
### Implemented ✅
- **Communication Protocol**
- Based on the `xiaozhi-esp32` protocol, data exchange is implemented via WebSocket.
+ Based on `xiaozhi-esp32` protocol, implementing data interaction through WebSocket.
- **Dialogue Interaction**
- Supports wake-up dialogues, manual conversations, and real-time interruptions. Automatically enters sleep mode after long periods of inactivity.
-- **Multilingual Recognition**
- Supports Mandarin, Cantonese, English, Japanese, and Korean (default using FunASR).
+ Supports wake-up dialogue, manual dialogue, and real-time interruption. Automatically sleeps after long periods without dialogue
+- **Intent Recognition**
+ Supports LLM intent recognition and function call, reducing hard-coded intent judgment
+- **Multi-language Recognition**
+ Supports Mandarin, Cantonese, English, Japanese, Korean (default using FunASR).
- **LLM Module**
- Allows flexible switching of LLM modules. The default is ChatGLMLLM, with options to use AliLLM, DeepSeek, Ollama, and others.
+ Supports flexible switching of LLM modules, default using ChatGLMLLM, can also use Alibaba Bailian, DeepSeek, Ollama, and other interfaces.
- **TTS Module**
- Supports multiple TTS interfaces including EdgeTTS (default) and Volcano Engine Doubao TTS to meet speech synthesis requirements.
+ Supports EdgeTTS (default), Volcano Engine Doubao TTS, and other TTS interfaces to meet speech synthesis needs.
+- **Memory Function**
+ Supports ultra-long memory, local summary memory, and no memory modes to meet different scenario needs.
+- **IOT Function**
+ Supports managing registered device IOT functions, supporting intelligent IoT control based on dialogue context.
-### In Development 🚧
+### Under Development 🚧
-- Conversation Memory Feature
-- Multiple Mood Modes
-- Smart Control Panel Web UI
+- Multiple mood modes
+- Smart control panel webui
-
+To learn about specific development progress, [click here](https://github.com/users/xinnan-tech/projects/3)
+
+If you are a software developer, here's an [Open Letter to Developers](docs/contributor_open_letter.md), welcome to join!
---
-## Supported Platforms/Components 📋
+## Supported Platforms/Components List 📋
-### LLM
+### LLM Language Models
-| Type | Platform Name | Usage Method | Pricing Model | Remarks |
-|:----:|:-----------------------------:|:-----------------------------:|:-----------------:|:-------------------------------------------------------------------------:|
-| LLM | AliLLM (阿里百炼) | OpenAI API call | Token consumption | [Click to apply for API key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) |
-| LLM | DeepSeekLLM (深度求索) | OpenAI API call | Token consumption | [Click to apply for API key](https://platform.deepseek.com/) |
-| LLM | ChatGLMLLM (智谱) | OpenAI API call | Free | Although free, you still need to [click to apply for an API key](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) |
-| LLM | OllamaLLM | Ollama API call | Free/Custom | Requires pre-downloading the model (`ollama pull`); service URL: `http://localhost:11434` |
-| LLM | DifyLLM | Dify API call | Token consumption | For local deployment. Note that prompt configuration must be set in the Dify console. |
-| LLM | GeminiLLM | Gemini API call | Free | [Click to apply for API key](https://aistudio.google.com/apikey) |
-| LLM | CozeLLM | Coze API call | Token consumption | Requires providing bot_id, user_id, and personal token. |
-| LLM | Home Assistant | Home Assistant voice assistant API call | Free | Requires providing a Home Assistant token. |
+| Usage Method | Supported Platforms | Free Platforms |
+|:---:|:---:|:---:|
+| openai interface call | Alibaba Bailian, Volcano Engine Doubao, DeepSeek, Zhipu ChatGLM, Gemini | Zhipu ChatGLM, Gemini |
+| ollama interface call | Ollama | - |
+| dify interface call | Dify | - |
+| fastgpt interface call | Fastgpt | - |
+| coze interface call | Coze | - |
-In fact, any LLM that supports OpenAI API calls can be integrated.
+In fact, any LLM supporting openai interface calls can be integrated.
---
-### TTS
+### TTS Speech Synthesis
-| Type | Platform Name | Usage Method | Pricing Model | Remarks |
-|:----:|:--------------------------------------:|:------------:|:-----------------:|:--------------------------------------------------------------------------------------:|
-| TTS | EdgeTTS | API call | Free | Default TTS based on Microsoft's speech synthesis technology. |
-| TTS | DoubaoTTS (火山引擎豆包 TTS) | API call | Token consumption | [Click to create an API key](https://console.volcengine.com/speech/service/8); it is recommended to use the paid version for higher concurrency. |
-| TTS | CosyVoiceSiliconflow | API call | Token consumption | Requires application for the Siliconflow API key; output format is WAV. |
-| TTS | CozeCnTTS | API call | Token consumption | Requires providing a Coze API key; output format is WAV. |
-| TTS | FishSpeech | API call | Free/Custom | Starts a local TTS service; see the configuration file for startup instructions. |
-| TTS | GPT_SOVITS_V2 | API call | Free/Custom | Starts a local TTS service, suitable for personalized speech synthesis scenarios. |
+| Usage Method | Supported Platforms | Free Platforms |
+|:---:|:---:|:---:|
+| Interface Call | EdgeTTS, Volcano Engine Doubao TTS, Tencent Cloud, Alibaba Cloud TTS, CosyVoiceSiliconflow, TTS302AI, CozeCnTTS, GizwitsTTS, ACGNTTS, OpenAITTS | EdgeTTS, CosyVoiceSiliconflow(partial) |
+| Local Service | FishSpeech, GPT_SOVITS_V2, GPT_SOVITS_V3, MinimaxTTS | FishSpeech, GPT_SOVITS_V2, GPT_SOVITS_V3, MinimaxTTS |
---
-### VAD
+### VAD Voice Activity Detection
-| Type | Platform Name | Usage Method | Pricing Model | Remarks |
-|:----:|:-------------------:|:------------:|:-------------:|:-------:|
-| VAD | SileroVAD | Local | Free | |
+| Type | Platform Name | Usage Method | Pricing Model | Notes |
+|:---:|:---------:|:----:|:----:|:--:|
+| VAD | SileroVAD | Local Use | Free | |
---
-### ASR
+### ASR Speech Recognition
-| Type | Platform Name | Usage Method | Pricing Model | Remarks |
-|:----:|:-------------------:|:------------:|:-------------:|:-------:|
-| ASR | FunASR | Local | Free | |
-| ASR | SherpaASR | Local | Free | |
-| ASR | DoubaoASR | API call | Paid | |
+| Usage Method | Supported Platforms | Free Platforms |
+|:---:|:---:|:---:|
+| Local Use | FunASR, SherpaASR | FunASR, SherpaASR |
+| Interface Call | DoubaoASR | - |
---
-## Usage 🚀
+### Memory Storage
-### 1. [Deployment Documentation](./docs/Deployment.md)
-
-This project supports three deployment methods. Choose the one that best fits your needs.
-
-The documentation provided here is a **written tutorial**. If you prefer a **video tutorial**, you can refer to [this expert's hands-on guide](https://www.bilibili.com/video/BV1gePuejEvT).
-
-Combining both the written and video tutorials can help you get started more quickly.
-
-1. [Docker Quick Deployment](./docs/Deployment.md)
- Suitable for general users who want a quick experience without extensive environment configuration. The only downside is that pulling the image can be a bit slow.
-
-2. [Deployment Using Docker Environment](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%BA%8C%E5%80%9F%E5%8A%A9docker%E7%8E%AF%E5%A2%83%E8%BF%90%E8%A1%8C%E9%83%A8%E7%BD%B2)
- Ideal for software engineers who already have Docker installed and wish to customize the code.
-
-3. [Running from Local Source Code](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%89%E6%9C%AC%E5%9C%B0%E6%BA%90%E7%A0%81%E8%BF%90%E8%A1%8C)
- Suitable for users familiar with the `Conda` environment or those who wish to build the runtime environment from scratch.
-
-For scenarios requiring higher response speeds, running from the local source code is recommended to reduce additional overhead.
-
-### 2. [Firmware Compilation](./docs/firmware-build.md)
-
-Click [here](./docs/firmware-build.md) for a detailed guide on firmware compilation.
-
-After successful compilation and network connection, wake up XiaoZhi using the wake-up word and monitor the server console for output.
+| Type | Platform Name | Usage Method | Pricing Model | Notes |
+|:------:|:---------------:|:----:|:---------:|:--:|
+| Memory | mem0ai | Interface Call | 1000 times/month quota | |
+| Memory | mem_local_short | Local Summary | Free | |
---
-## Frequently Asked Questions ❓
+### Intent Recognition
-### 1. TTS often fails and times out ⏰
-
-**Suggestion:**
-If `EdgeTTS` frequently fails, please first check whether you are using a proxy (VPN). If so, try disabling the proxy and try again. If you are using Volcano Engine Doubao TTS and it often fails, it is recommended to use the paid version since the trial only supports 2 concurrent requests.
-
-### 2. I want to control lights, air conditioners, remote power on/off, etc. with XiaoZhi 💡
-
-**Suggestion:**
-Set the `LLM` to `HomeAssistant` in the configuration file and use the `HomeAssistant` API to perform the relevant controls.
-
-### 3. I speak slowly, and XiaoZhi always interrupts during pauses 🗣️
-
-**Suggestion:**
-Locate the following section in the configuration file and increase the value of `min_silence_duration_ms` (for example, change it to `1000`):
-
-```yaml
-VAD:
- SileroVAD:
- threshold: 0.5
- model_dir: models/snakers4_silero-vad
- min_silence_duration_ms: 700 # If your pauses are longer, increase this value
-```
-
-### 4. Why does XiaoZhi recognize a lot of Korean, Japanese, and English in what I say? 🇰🇷
-
-**Suggestion:**
-Check whether the `model.pt` file exists in the `models/SenseVoiceSmall` directory. If it does not, please download it. See [Download ASR Model Files](docs/Deployment.md#模型文件) for details.
-
-### 5. Why does the error “TTS task error: file does not exist” occur? 📁
-
-**Suggestion:**
-Verify that you have correctly installed the `libopus` and `ffmpeg` libraries using `conda`. If not, install them using:
-
-```
-conda install conda-forge::libopus
-conda install conda-forge::ffmpeg
-```
-
-### 6. How can I improve XiaoZhi's dialogue response speed? ⚡
-
-The default configuration of this project is designed to be cost-effective. It is recommended that beginners first use the default free models to ensure that the system runs smoothly, then optimize for faster response times.
-To improve response speed, you can try replacing individual components. Below are the response time test results for each component (for reference only, not a guarantee):
-
-**LLM Performance Ranking:**
-
-| Module Name | Average First Token Time | Average Total Response Time |
-|--------------|--------------------------|-----------------------------|
-| AliLLM | 0.547s | 1.485s |
-| ChatGLMLLM | 0.677s | 3.057s |
-| OllamaLLM | 0.003s | 0.003s |
-
-**TTS Performance Ranking:**
-
-| Module Name | Average Synthesis Time |
-|----------------------------|------------------------|
-| EdgeTTS | 1.019s |
-| DoubaoTTS | 0.503s |
-| CosyVoiceSiliconflow | 3.732s |
-
-**Recommended Configuration Combination (Overall Response Speed):**
-
-| Combination Scheme | Overall Score | LLM First Token | TTS Synthesis |
-|-----------------------------------|---------------|-----------------|---------------|
-| AliLLM + DoubaoTTS | 0.539 | 0.547s | 0.503s |
-| AliLLM + EdgeTTS | 0.642 | 0.547s | 1.019s |
-| ChatGLMLLM + DoubaoTTS | 0.642 | 0.677s | 0.503s |
-| ChatGLMLLM + EdgeTTS | 0.745 | 0.677s | 1.019s |
-| AliLLM + CosyVoiceSiliconflow | 1.184 | 0.547s | 3.732s |
-
-**Conclusion 🔍**
-
-_As of February 19, 2025, if my computer were located in Haizhu District, Guangzhou, Guangdong Province, and connected via China Unicom, I would prioritize using:_
-
-- **LLM:** `AliLLM`
-- **TTS:** `DoubaoTTS`
-
-### 7. For more questions, feel free to contact us for feedback 💬
-
-Our contact information is in [Baidu Netdisk](https://pan.baidu.com/s/1x6USjvP1nTRsZ45XlJu65Q),The extraction code is`223y`。
+| Type | Platform Name | Usage Method | Pricing Model | Notes |
+|:------:|:-------------:|:----:|:-------:|:---------------------:|
+| Intent | intent_llm | Interface Call | Based on LLM pricing | Intent recognition through large models, highly generalizable |
+| Intent | function_call | Interface Call | Based on LLM pricing | Intent completion through large model function calls, fast and effective |
---
-## Acknowledgements 🙏
+## Acknowledgments 🙏
-- This project was inspired by the [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) and implemented based on it.
-- Many thanks to [Tenclass](https://www.tenclass.com/) for providing detailed documentation support for the XiaoZhi communication protocol.
+- This project was inspired by [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) and implemented based on it.
+- Thanks to [Tenclass](https://www.tenclass.com/) for providing detailed documentation support for the Xiaozhi communication protocol.
@@ -294,4 +298,4 @@ Our contact information is in [Baidu Netdisk](https://pan.baidu.com/s/1x6USjvP1n
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/Deployment.md b/docs/Deployment.md
index cb64e604..7338a981 100644
--- a/docs/Deployment.md
+++ b/docs/Deployment.md
@@ -328,14 +328,14 @@ LLM:
以下是一些常见问题,供参考:
-[1、为什么我说的话,小智识别出来很多韩文、日文、英文](../README.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
+[1、为什么我说的话,小智识别出来很多韩文、日文、英文](./FAQ.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
-[2、为什么会出现“TTS 任务出错 文件不存在”?](../README.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
+[2、为什么会出现“TTS 任务出错 文件不存在”?](./FAQ.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
-[3、TTS 经常失败,经常超时](../README.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
+[3、TTS 经常失败,经常超时](./FAQ.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
-[4、如何提高小智对话响应速度?](../README.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
+[4、如何提高小智对话响应速度?](./FAQ.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
-[5、我说话很慢,停顿时小智老是抢话](../README.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
+[5、我说话很慢,停顿时小智老是抢话](./FAQ.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
-[6、我想通过小智控制电灯、空调、远程开关机等操作](../README.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
+[6、我想通过小智控制电灯、空调、远程开关机等操作](./FAQ.md#1%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AF%B4%E7%9A%84%E8%AF%9D%E5%B0%8F%E6%99%BA%E8%AF%86%E5%88%AB%E5%87%BA%E6%9D%A5%E5%BE%88%E5%A4%9A%E9%9F%A9%E6%96%87%E6%97%A5%E6%96%87%E8%8B%B1%E6%96%87)
diff --git a/docs/FAQ.md b/docs/FAQ.md
new file mode 100644
index 00000000..8acdb1a0
--- /dev/null
+++ b/docs/FAQ.md
@@ -0,0 +1,139 @@
+# 常见问题 ❓
+
+### 1、为什么我说的话,小智识别出来很多韩文、日文、英文?🇰🇷
+
+建议:检查一下`models/SenseVoiceSmall`是否已经有`model.pt`
+文件,如果没有就要下载,查看这里[下载语音识别模型文件](Deployment.md#模型文件)
+
+### 2、为什么会出现"TTS 任务出错 文件不存在"?📁
+
+建议:检查一下是否正确使用`conda` 安装了`libopus`和`ffmpeg`库。
+
+如果没有安装,就安装
+
+```
+conda install conda-forge::libopus
+conda install conda-forge::ffmpeg
+```
+
+### 3、TTS 经常失败,经常超时 ⏰
+
+建议:如果 `EdgeTTS` 经常失败,请先检查是否使用了代理(梯子)。如果使用了,请尝试关闭代理后再试;
+如果用的是火山引擎的豆包 TTS,经常失败时建议使用付费版本,因为测试版本仅支持 2 个并发。
+
+### 4、如何提高小智对话响应速度? ⚡
+
+本项目默认配置为低成本方案,建议初学者先使用默认免费模型,解决"跑得动"的问题,再优化"跑得快"。
+如需提升响应速度,可尝试更换各组件。以下为各组件的响应速度测试数据(仅供参考,不构成承诺):
+
+| 影响因素 | 因素值 |
+|:-----:|:----------------:|
+| 测试地点 | 广东省广州市海珠区 |
+| 测试时间 | 2025年2月19日 12:52 |
+| 宽带运营商 | 中国联通 |
+
+测试方法:
+
+1、把各组件的密钥配置上去,只有配置了密钥的组件才参与测试。
+
+2、配置完密钥后,执行以下方法
+
+```
+# 进入项目根目录,执行以下命令:
+conda activate xiaozhi-esp32-server
+python performance_tester.py
+```
+
+生成报告如下
+
+LLM 性能排行:
+
+| 模块名称 | 平均首Token时间 | 平均总响应时间 |
+|:-----------|:-----------|:--------|
+| AliLLM | 0.547s | 1.485s |
+| ChatGLMLLM | 0.677s | 3.057s |
+
+TTS 性能排行:
+
+| 模块名称 | 平均合成时间 |
+|----------------------|--------|
+| EdgeTTS | 1.019s |
+| DoubaoTTS | 0.503s |
+| CosyVoiceSiliconflow | 3.732s |
+
+推荐配置组合 (综合响应速度):
+
+| 组合方案 | 综合得分 | LLM首Token | TTS合成 |
+|-------------------------------|-------|-----------|--------|
+| AliLLM + DoubaoTTS | 0.539 | 0.547s | 0.503s |
+| AliLLM + EdgeTTS | 0.642 | 0.547s | 1.019s |
+| ChatGLMLLM + DoubaoTTS | 0.642 | 0.677s | 0.503s |
+| ChatGLMLLM + EdgeTTS | 0.745 | 0.677s | 1.019s |
+| AliLLM + CosyVoiceSiliconflow | 1.184 | 0.547s | 3.732s |
+
+### 结论 🔍
+
+`2025年2月19日`,如果我的电脑在`广东省广州市海珠区`,且使用的是`中国联通`网络,我会优先使用:
+
+- LLM:`AliLLM`
+- TTS:`DoubaoTTS`
+
+### 5、我说话很慢,停顿时小智老是抢话 🗣️
+
+建议:在配置文件中找到如下部分,将 `min_silence_duration_ms` 的值调大(例如改为 `1000`):
+
+```yaml
+VAD:
+ SileroVAD:
+ threshold: 0.5
+ model_dir: models/snakers4_silero-vad
+ min_silence_duration_ms: 700 # 如果说话停顿较长,可将此值调大
+```
+
+### 6、我想通过小智控制电灯、空调、远程开关机等操作 💡
+
+本项目,支持以工具调用的方式控制HomeAssistant设备
+
+1、首先选择一款支持function call支持的LLM,例如`ChatGLMLLM`。
+
+2、在配置文件中,将 `selected_module.Intent` 设置为 `function_call`。
+
+3、登录`HomeAssistant`,点击`左下角个人`,切换`安全`导航栏,划到底部`长期访问令牌`生成api_key。
+
+在配置文件中,配置好你的home assistant的`devices`(被控制的设备)和`api_key`和`base_url`等信息。例如:
+
+``` yaml
+plugins
+ home_assistant:
+ devices:
+ - 客厅,玩具灯,switch.cuco_cn_460494544_cp1_on_p_2_1
+ - 卧室,台灯,switch.iot_cn_831898993_socn1_on_p_2_1
+ base_url: http://你的homeassistant地址:8123
+ api_key: 你的home assistant api访问令牌
+```
+
+最后,允许function_call 插件在配置文件中启用`hass_get_state`(必须)、`hass_set_state`(必须)、`hass_play_music`(不想用ha听音乐可以不启动),例如:
+
+``` yaml
+Intent:
+ ...
+ function_call:
+ type: nointent
+ functions:
+ - change_role
+ - get_weather
+ - get_news
+ - hass_get_state
+ - hass_set_state
+ - hass_play_music
+```
+
+### 7、更多问题,可联系我们反馈 💬
+
+我们的联系方式放在[百度网盘中,点击前往](https://pan.baidu.com/s/1x6USjvP1nTRsZ45XlJu65Q),提取码是`223y`。
+
+网盘里有"硬件烧录QQ群"、"开源服务端交流群"、"产品建议联系人" 三张图片,请根据需要选择加入。
+
+- 硬件烧录QQ群:适用于硬件烧录问题
+- 开源服务端交流群:适用于服务端问题
+- 产品建议联系人:适用于产品功能、产品设计等建议
\ No newline at end of file
diff --git a/docs/firmware-build.md b/docs/firmware-build.md
index b726826c..78a90ae8 100644
--- a/docs/firmware-build.md
+++ b/docs/firmware-build.md
@@ -92,14 +92,14 @@ https://espressif.github.io/esp-launchpad/
以下是一些常见问题,供参考:
-[1、为什么我说的话,小智识别出来很多韩文、日文、英文](../README.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
+[1、为什么我说的话,小智识别出来很多韩文、日文、英文](./FAQ.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
-[2、为什么会出现“TTS 任务出错 文件不存在”?](../README.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
+[2、为什么会出现“TTS 任务出错 文件不存在”?](./FAQ.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
-[3、TTS 经常失败,经常超时](../README.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
+[3、TTS 经常失败,经常超时](./FAQ.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
-[4、如何提高小智对话响应速度?](../README.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
+[4、如何提高小智对话响应速度?](./FAQ.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
-[5、我说话很慢,停顿时小智老是抢话](../README.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
+[5、我说话很慢,停顿时小智老是抢话](./FAQ.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
-[6、我想通过小智控制电灯、空调、远程开关机等操作](../README.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
+[6、我想通过小智控制电灯、空调、远程开关机等操作](./FAQ.md#1tts-%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5%E7%BB%8F%E5%B8%B8%E8%B6%85%E6%97%B6-)
diff --git a/docs/images/banner1.png b/docs/images/banner1.png
new file mode 100644
index 00000000..974ddaf3
Binary files /dev/null and b/docs/images/banner1.png differ
diff --git a/docs/images/webui.png b/docs/images/webui.png
deleted file mode 100644
index 4d4ae599..00000000
Binary files a/docs/images/webui.png and /dev/null differ
diff --git a/main/README.md b/main/README.md
index 741a626b..9dc57ee3 100644
--- a/main/README.md
+++ b/main/README.md
@@ -1,4 +1,4 @@
-本文档是开发类文档,如需部署小智服务端,[点击这里查看部署教程](../README.md#%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F-)
+本文档是开发类文档,如需部署小智服务端,[点击这里查看部署教程](./FAQ.md#%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F-)
# 项目目录介绍
当你看到这份文件的时候,这个这个项目还没完善好。我们还有很多东西要做。
diff --git a/main/manager-api/README.md b/main/manager-api/README.md
index 98010c62..5f7fda86 100644
--- a/main/manager-api/README.md
+++ b/main/manager-api/README.md
@@ -1,4 +1,4 @@
-本文档是开发类文档,如需部署小智服务端,[点击这里查看部署教程](../../README.md#%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F-)
+本文档是开发类文档,如需部署小智服务端,[点击这里查看部署教程](.././FAQ.md#%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F-)
# 项目介绍
manager-api 该项目基于SpringBoot框架开发。
diff --git a/main/manager-web/README.md b/main/manager-web/README.md
index 945ea29d..3d26f25e 100644
--- a/main/manager-web/README.md
+++ b/main/manager-web/README.md
@@ -1,4 +1,4 @@
-本文档是开发类文档,如需部署小智服务端,[点击这里查看部署教程](../../README.md#%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F-)
+本文档是开发类文档,如需部署小智服务端,[点击这里查看部署教程](.././FAQ.md#%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F-)
# xiaozhi