# 小智 AI 聊天机器人 (XiaoZhi AI Chatbot) (中文 | [English](README_en.md) | [日本語](README_ja.md)) 这是虾哥的第一个硬件作品。 👉 [ESP32+SenseVoice+Qwen72B打造你的AI聊天伴侣!【bilibili】](https://www.bilibili.com/video/BV11msTenEH3/?share_source=copy_web&vd_source=ee1aafe19d6e60cf22e60a93881faeba) 👉 [手工打造你的 AI 女友,新手入门教程【bilibili】](https://www.bilibili.com/video/BV1XnmFYLEJN/) ## 项目目的 本项目基于乐鑫的 ESP-IDF 进行开发。 本项目是一个开源项目,主要用于教学目的。我们希望通过这个项目,能够帮助更多人入门 AI 硬件开发,了解如何将当下飞速发展的大语言模型应用到实际的硬件设备中。无论你是对 AI 感兴趣的学生,还是想要探索新技术的开发者,都可以通过这个项目获得宝贵的学习经验。 欢迎所有人参与到项目的开发和改进中来。如果你有任何想法或建议,请随时提出 Issue 或加入群聊。 学习交流 QQ 群:946599635 ## 已实现功能 - Wi-Fi / ML307 Cat.1 4G - BOOT 键唤醒和打断,支持点击和长按两种触发方式 - 离线语音唤醒 [ESP-SR](https://github.com/espressif/esp-sr) - 流式语音对话(WebSocket 或 UDP 协议) - 支持国语、粤语、英语、日语、韩语 5 种语言识别 [SenseVoice](https://github.com/FunAudioLLM/SenseVoice) - 声纹识别,识别是谁在喊 AI 的名字 [3D Speaker](https://github.com/modelscope/3D-Speaker) - 大模型 TTS(火山引擎 或 CosyVoice) - 大模型 LLM(Qwen2.5 72B 或 豆包 API) - 可配置的提示词和音色(自定义角色) - 短期记忆,每轮对话后自我总结 - OLED / LCD 显示屏,显示信号强弱或对话内容 ## 硬件部分 ### 面包板手工制作实践 详见飞书文档教程: 👉 [《小智 AI 聊天机器人百科全书》](https://ccnphfhqs21z.feishu.cn/wiki/F5krwD16viZoF0kKkvDcrZNYnhb?from=from_copylink) 面包板效果图如下:  ### 已支持的开源硬件 - <a href="https://oshwhub.com/li-chuang-kai-fa-ban/li-chuang-shi-zhan-pai-esp32-s3-kai-fa-ban" target="_blank" title="立创·实战派 ESP32-S3 开发板">立创·实战派 ESP32-S3 开发板</a> - <a href="https://github.com/espressif/esp-box" target="_blank" title="乐鑫 ESP32-S3-BOX3">乐鑫 ESP32-S3-BOX3</a> - <a href="https://docs.m5stack.com/zh_CN/core/CoreS3" target="_blank" title="M5Stack CoreS3">M5Stack CoreS3</a> - <a href="https://docs.m5stack.com/en/atom/Atomic%20Echo%20Base" target="_blank" title="AtomS3R + Echo Base">AtomS3R + Echo Base</a> - 神奇按钮 2.4 - <a href="https://oshwhub.com/tenclass01/xmini_c3" target="_blank" title="虾哥 Mini C3">虾哥 Mini C3</a> - <a href="https://www.waveshare.net/shop/ESP32-S3-Touch-AMOLED-1.8.htm" target="_blank" title="微雪电子 ESP32-S3-Touch-AMOLED-1.8">微雪电子 ESP32-S3-Touch-AMOLED-1.8</a> <div style="display: flex; justify-content: space-between;"> <a href="docs/lichuang-s3.jpg" target="_blank" title="立创·实战派 ESP32-S3 开发板"> <img src="docs/lichuang-s3.jpg" width="240" /> </a> <a href="docs/esp32s3-box3.jpg" target="_blank" title="乐鑫 ESP32-S3-BOX3"> <img src="docs/esp32s3-box3.jpg" width="240" /> </a> <a href="docs/m5stack-cores3.jpg" target="_blank" title="M5Stack CoreS3"> <img src="docs/m5stack-cores3.jpg" width="240" /> </a> <a href="docs/atoms3r-echo-base.jpg" target="_blank" title="AtomS3R + Echo Base"> <img src="docs/atoms3r-echo-base.jpg" width="240" /> </a> <a href="docs/magiclick-2p4.jpg" target="_blank" title="神奇按钮 2.4"> <img src="docs/magiclick-2p4.jpg" width="240" /> </a> <a href="docs/xmini-c3.jpg" target="_blank" title="虾哥 Mini C3"> <img src="docs/xmini-c3.jpg" width="240" /> </a> </div> ## 固件部分 ### 免开发环境烧录 新手第一次操作建议先不要搭建开发环境,直接使用免开发环境烧录的固件。固件使用的是作者友情提供的测试服,目前开放免费使用,请勿用于商业用途。 👉 [Flash烧录固件(无IDF开发环境)](https://ccnphfhqs21z.feishu.cn/wiki/Zpz4wXBtdimBrLk25WdcXzxcnNS) ### 开发环境 - Cursor 或 VSCode - 安装 ESP-IDF 插件,选择 SDK 版本 5.3 或以上 - Linux 比 Windows 更好,编译速度快,也免去驱动问题的困扰 ## AI 角色配置 如果你已经拥有一个小智 AI 聊天机器人,可以参考 👉 [后台操作视频教程](https://www.bilibili.com/video/BV1jUCUY2EKM/) 详细的使用说明以及测试服的注意事项,请参考 👉 [小智测试服的帮助说明](https://xiaozhi.me/help)。 ## Star History <a href="https://star-history.com/#78/xiaozhi-esp32&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=78/xiaozhi-esp32&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=78/xiaozhi-esp32&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=78/xiaozhi-esp32&type=Date" /> </picture> </a>
# XiaoZhi AI Chatbot ([中文](README.md) | English | [日本語](README_ja.md)) This is Terrence's first hardware project. 👉 [Build your AI chat companion with ESP32+SenseVoice+Qwen72B! [bilibili]](https://www.bilibili.com/video/BV11msTenEH3/?share_source=copy_web&vd_source=ee1aafe19d6e60cf22e60a93881faeba) 👉 [DIY Your AI Companion - Beginner's Tutorial [bilibili]](https://www.bilibili.com/video/BV1XnmFYLEJN/) ## Project Purpose This project is developed based on Espressif's ESP-IDF. This is an open-source project primarily for educational purposes. Through this project, we aim to help more people get started with AI hardware development and understand how to integrate rapidly evolving large language models into actual hardware devices. Whether you're a student interested in AI or a developer looking to explore new technologies, this project offers valuable learning experiences. Everyone is welcome to participate in the project's development and improvement. If you have any ideas or suggestions, please feel free to raise an Issue or join our chat group. Learning & Discussion QQ Group: 946599635 ## Implemented Features - Wi-Fi / ML307 Cat.1 4G - BOOT button wake-up and interrupt, supporting both click and long-press triggers - Offline voice wake-up [ESP-SR](https://github.com/espressif/esp-sr) - Streaming voice dialogue (WebSocket or UDP protocol) - Support for 5 languages: Mandarin, Cantonese, English, Japanese, Korean [SenseVoice](https://github.com/FunAudioLLM/SenseVoice) - Voice print recognition to identify who's calling AI's name [3D Speaker](https://github.com/modelscope/3D-Speaker) - Large model TTS (Volcengine or CosyVoice) - Large Language Model (Qwen2.5 72B or Doubao API) - Configurable prompts and voice tones (custom characters) - Short-term memory with self-summary after each conversation round - OLED / LCD display showing signal strength or conversation content ## Hardware Section ### Breadboard Practice For detailed tutorial, see the Feishu document: 👉 [XiaoZhi AI Chatbot Encyclopedia](https://ccnphfhqs21z.feishu.cn/wiki/F5krwD16viZoF0kKkvDcrZNYnhb?from=from_copylink) Breadboard setup shown below:  ### Supported Open-Source Hardware - <a href="https://oshwhub.com/li-chuang-kai-fa-ban/li-chuang-shi-zhan-pai-esp32-s3-kai-fa-ban" target="_blank" title="LiChuang ESP32-S3 Development Board">LiChuang ESP32-S3 Development Board</a> - <a href="https://github.com/espressif/esp-box" target="_blank" title="Espressif ESP32-S3-BOX3">Espressif ESP32-S3-BOX3</a> - <a href="https://docs.m5stack.com/zh_CN/core/CoreS3" target="_blank" title="M5Stack CoreS3">M5Stack CoreS3</a> - <a href="https://docs.m5stack.com/en/atom/Atomic%20Echo%20Base" target="_blank" title="AtomS3R + Echo Base">AtomS3R + Echo Base</a> - MagiClick 2.4 - <a href="https://oshwhub.com/tenclass01/xmini_c3" target="_blank" title="Xmini C3">Xmini C3</a> - <a href="https://www.waveshare.com/esp32-s3-touch-amoled-1.8.htm" target="_blank" title="Waveshare ESP32-S3-Touch-AMOLED-1.8">Waveshare ESP32-S3-Touch-AMOLED-1.8</a> <div style="display: flex; justify-content: space-between;"> <a href="docs/lichuang-s3.jpg" target="_blank" title="LiChuang ESP32-S3 Development Board"> <img src="docs/lichuang-s3.jpg" width="240" /> </a> <a href="docs/esp32s3-box3.jpg" target="_blank" title="Espressif ESP32-S3-BOX3"> <img src="docs/esp32s3-box3.jpg" width="240" /> </a> <a href="docs/m5stack-cores3.jpg" target="_blank" title="M5Stack CoreS3"> <img src="docs/m5stack-cores3.jpg" width="240" /> </a> <a href="docs/atoms3r-echo-base.jpg" target="_blank" title="AtomS3R + Echo Base"> <img src="docs/atoms3r-echo-base.jpg" width="240" /> </a> <a href="docs/magiclick-2p4.jpg" target="_blank" title="MagiClick 2.4"> <img src="docs/magiclick-2p4.jpg" width="240" /> </a> <a href="docs/xmini-c3.jpg" target="_blank" title="Xmini C3"> <img src="docs/xmini-c3.jpg" width="240" /> </a> </div> ## Firmware Section ### Flashing Without Development Environment For beginners, it's recommended to first try flashing the firmware without setting up a development environment. The firmware uses a test server provided by the author, currently available for free use (not for commercial purposes). 👉 [Flash Firmware Guide (No IDF Environment Required)](https://ccnphfhqs21z.feishu.cn/wiki/Zpz4wXBtdimBrLk25WdcXzxcnNS) ### Development Environment - Cursor or VSCode - Install ESP-IDF plugin, select SDK version 5.3 or above - Linux is preferred over Windows for faster compilation and fewer driver issues ## AI Character Configuration If you already have a XiaoZhi AI chatbot, please refer to 👉 [Backend Operation Video Tutorial](https://www.bilibili.com/video/BV1jUCUY2EKM/) For detailed usage instructions and test server notes, please refer to 👉 [XiaoZhi Test Server Help Guide](https://xiaozhi.me/help). ## Star History <a href="https://star-history.com/#78/xiaozhi-esp32&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=78/xiaozhi-esp32&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=78/xiaozhi-esp32&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=78/xiaozhi-esp32&type=Date" /> </picture> </a>
No README_JA available for this version.
idf.py add-dependency "zhoukes/emoji_font_test^0.0.1"