{"id":25209116,"url":"https://github.com/xinnan-tech/xiaozhi-esp32-server","last_synced_at":"2025-05-13T17:11:30.481Z","repository":{"id":275446501,"uuid":"926087200","full_name":"xinnan-tech/xiaozhi-esp32-server","owner":"xinnan-tech","description":"本项目为xiaozhi-esp32提供后端服务，帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.","archived":false,"fork":false,"pushed_at":"2025-05-12T13:55:13.000Z","size":57449,"stargazers_count":4320,"open_issues_count":185,"forks_count":1532,"subscribers_count":59,"default_branch":"main","last_synced_at":"2025-05-12T15:01:16.812Z","etag":null,"topics":["dify","esp32","xiaozhi-esp32"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xinnan-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-02T14:25:16.000Z","updated_at":"2025-05-12T12:57:26.000Z","dependencies_parsed_at":"2025-02-24T14:25:54.911Z","dependency_job_id":"efcb948a-d387-4f28-87e4-abc87aec60c3","html_url":"https://github.com/xinnan-tech/xiaozhi-esp32-server","commit_stats":null,"previous_names":["xinnan-tech/xiaozhi-esp32-server"],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinnan-tech%2Fxiaozhi-esp32-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinnan-tech%2Fxiaozhi-esp32-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinnan-tech%2Fxiaozhi-esp32-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinnan-tech%2Fxiaozhi-esp32-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xinnan-tech","download_url":"https://codeload.github.com/xinnan-tech/xiaozhi-esp32-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990470,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dify","esp32","xiaozhi-esp32"],"created_at":"2025-02-10T13:15:20.474Z","updated_at":"2025-05-13T17:11:25.466Z","avatar_url":"https://github.com/xinnan-tech.png","language":"Python","funding_links":[],"categories":["📚 Projects (1974 total)","Python","硬件_其他","Containerised MCP Servers"],"sub_categories":["MCP Servers","资源传输下载","AI \u0026 Machine Learning"],"readme":"[![Banners](docs/images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server)\n\n\n\u003ch1 align=\"center\"\u003e小智后端服务xiaozhi-esp32-server\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n本项目为开源智能硬件项目\n\u003ca href=\"https://github.com/78/xiaozhi-esp32\"\u003exiaozhi-esp32\u003c/a\u003e提供后端服务\u003cbr/\u003e\n根据\u003ca href=\"https://ccnphfhqs21z.feishu.cn/wiki/M0XiwldO9iJwHikpXD5cEx71nKh\"\u003e小智通信协议\u003c/a\u003e使用Python、Java、Vue实现\u003cbr/\u003e\n帮助您快速搭建小智服务器\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"./README.md\"\u003eEnglish\u003c/a\u003e\n· 简体中文\n· \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server/releases\"\u003e更新日志\u003c/a\u003e\n· \u003ca href=\"./README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3\"\u003e部署文档\u003c/a\u003e\n· \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server/issues\"\u003e反馈问题\u003c/a\u003e\n· \u003ca href=\"./docs/FAQ.md\"\u003e常见问题\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server/releases\"\u003e\n    \u003cimg alt=\"GitHub Contributors\" src=\"https://img.shields.io/github/v/release/xinnan-tech/xiaozhi-esp32-server?logo=docker\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors\"\u003e\n    \u003cimg alt=\"GitHub Contributors\" src=\"https://img.shields.io/github/contributors/xinnan-tech/xiaozhi-esp32-server?logo=github\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server/issues\"\u003e\n    \u003cimg alt=\"Issues\" src=\"https://img.shields.io/github/issues/xinnan-tech/xiaozhi-esp32-server?color=0088ff\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server/pulls\"\u003e\n    \u003cimg alt=\"GitHub pull requests\" src=\"https://img.shields.io/github/issues-pr/xinnan-tech/xiaozhi-esp32-server?color=0088ff\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"GitHub pull requests\" src=\"https://img.shields.io/badge/license-MIT-white?labelColor=black\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/xinnan-tech/xiaozhi-esp32-server\"\u003e\n    \u003cimg alt=\"stars\" src=\"https://img.shields.io/github/stars/xinnan-tech/xiaozhi-esp32-server?color=ffcb47\u0026labelColor=black\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 适用人群 👥\n\n本项目需要配合 ESP32 硬件设备使用。如果您已经购买了 ESP32 相关硬件，且成功对接过虾哥部署的后端服务，并希望独立搭建自己的\n`xiaozhi-esp32` 后端服务，那么本项目非常适合您。\n\n想看使用效果？请猛戳视频 🎥\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV1FMFyejExX\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"小智esp32连接自己的后台模型\" src=\"docs/images/demo1.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV1CDKWemEU6\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"自定义音色\" src=\"docs/images/demo2.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV12yA2egEaC\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"使用粤语交流\" src=\"docs/images/demo3.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV1pNXWYGEx1\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"控制家电开关\" src=\"docs/images/demo5.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV1kgA2eYEQ9\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"成本最低配置\" src=\"docs/images/demo4.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV1Vy96YCE3R\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"自定义音色\" src=\"docs/images/demo6.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV1VC96Y5EMH\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"播放音乐\" src=\"docs/images/demo7.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV1Z8XuYZEAS\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"天气插件\" src=\"docs/images/demo8.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV178XuYfEpi\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"IOT指令控制设备\" src=\"docs/images/demo9.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.bilibili.com/video/BV17LXWYvENb\" target=\"_blank\"\u003e\n         \u003cpicture\u003e\n           \u003cimg alt=\"播报新闻\" src=\"docs/images/demo0.png\" /\u003e\n         \u003c/picture\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## 警告 ⚠️\n\n1、本项目为开源软件，本软件与对接的任何第三方API服务商（包括但不限于语音识别、大模型、语音合成等平台）均不存在商业合作关系，不为其服务质量及资金安全提供任何形式的担保。\n建议使用者优先选择持有相关业务牌照的服务商，并仔细阅读其服务协议及隐私政策。本软件不托管任何账户密钥、不参与资金流转、不承担充值资金损失风险。\n\n2、本项目成立时间较短，还未通过网络安全测评，请勿在生产环境中使用。 如果您在公网环境中部署学习本项目，请务必在配置文件\n`config.yaml` 中开启防护：\n\n```yaml\nserver:\n  auth:\n    # 开启防护\n    enabled: true  \n```\n\n开启防护后，您需要根据实际情况校验机器的 token 或 mac 地址，详细请参见配置说明。\n\n---\n\n## 部署文档\n\n![Banners](docs/images/banner2.png)\n\n本项目提供两种部署方式，请根据您的具体需求选择：\n\n#### 🚀 部署方式选择\n\n| 部署方式 | 特点 | 适用场景 | Docker部署文档 | 源码部署文档 |\n|---------|------|---------|---------|---------|\n| **最简化安装** | 智能对话、IOT功能，数据存储在配置文件 | 低配置环境，无需数据库，仅支持虾哥1.6.0及以下固件版本 | [Docker只运行Server](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) | [本地源码只运行Server](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%BA%8C%E6%9C%AC%E5%9C%B0%E6%BA%90%E7%A0%81%E5%8F%AA%E8%BF%90%E8%A1%8Cserver)|\n| **全模块安装** | 智能对话、IOT、OTA、智控台，数据存储在数据库 | 完整功能体验，支持虾哥最新固件 |[Docker运行全模块](./docs/Deployment_all.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E8%BF%90%E8%A1%8C%E5%85%A8%E6%A8%A1%E5%9D%97) | [本地源码运行全模块](./docs/Deployment_all.md#%E6%96%B9%E5%BC%8F%E4%BA%8C%E6%9C%AC%E5%9C%B0%E6%BA%90%E7%A0%81%E8%BF%90%E8%A1%8C%E5%85%A8%E6%A8%A1%E5%9D%97) |\n\n\u003e 💡 提示：以下是按最新代码部署后的测试平台，有需要可烧录测试，并发为6个，每天会清空数据\n\n```\n智控台地址: https://2662r3426b.vicp.fun\nOTA接口地址: https://2662r3426b.vicp.fun/xiaozhi/ota/\nWebsocket接口地址: wss://2662r3426b.vicp.fun/xiaozhi/v1/\n```\n---\n\n## 常见问题 ❓\n\n如遇到问题或产品建议反馈[点这里](docs/FAQ.md)。\n\n---\n## 功能清单 ✨\n\n### 已实现 ✅\n\n| 功能模块 | 描述 |\n|---------|------|\n| 通信协议 | 基于 `xiaozhi-esp32` 协议，通过 WebSocket 实现数据交互 |\n| 对话交互 | 支持唤醒对话、手动对话及实时打断。长时间无对话时自动休眠 |\n| 意图识别 | 支持使用LLM意图识别、function call函数调用，减少硬编码意图判断 |\n| 多语言识别 | 支持国语、粤语、英语、日语、韩语（默认使用 FunASR） |\n| LLM 模块 | 支持灵活切换 LLM 模块，默认使用 ChatGLMLLM，也可选用阿里百炼、DeepSeek、Ollama 等接口 |\n| TTS 模块 | 支持 EdgeTTS（默认）、火山引擎豆包 TTS 等多种 TTS 接口，满足语音合成需求 |\n| 记忆功能 | 支持超长记忆、本地总结记忆、无记忆三种模式，满足不同场景需求 |\n| IOT功能 | 支持管理注册设备IOT功能，支持基于对话上下文语境下的智能物联网控制 |\n| 智控台 | 提供Web管理界面，支持智能体管理、用户管理、系统配置等功能，方便管理员和用户进行管理 |\n\n### 正在开发 🚧\n\n想了解具体开发计划进度，[请点击这里](https://github.com/users/xinnan-tech/projects/3)\n\n如果你是一名软件开发者，这里有一份[《致开发者的公开信》](docs/contributor_open_letter.md)，欢迎加入！\n\n---\n\n## 产品生态 👬\n小智是一个生态，当你使用这个产品时，也可以看看其他在这个生态圈的优秀项目\n\n| 项目名称  | 项目地址 | 项目描述 |\n|:---------------------|:--------|:--------|\n| 小智安卓客户端  | [xiaozhi-android-client](https://github.com/TOM88812/xiaozhi-android-client) | 一个基于xiaozhi-server的Android、IOS语音对话应用,支持实时语音交互和文字对话。\u003cbr/\u003e现在是flutter版本，打通IOS、Android端。 |\n| 小智电脑客户端  | [py-xiaozhi](https://github.com/Huang-junsen/py-xiaozhi) | 该项目提供了一个基于 Python 实现的小白 AI 客户端，使得在不具备实体硬件条件的情况下，\u003cbr/\u003e依然能够体过代码体验小智 AI 的功能。 |\n| 小智Java服务端  | [xiaozhi-esp32-server-java](https://github.com/joey-zhou/xiaozhi-esp32-server-java) | 小智开源后端服务 Java 版本是一个基于 Java 的开源项目。\u003cbr/\u003e它包括前后端的服务，旨在为用户提供一个完整的后端服务解决方案。 |\n\n---\n\n## 本项目支持的平台/组件列表 📋\n\n### LLM 语言模型\n\n| 使用方式 | 支持平台 | 免费平台 |\n|:---:|:---:|:---:|\n| openai 接口调用 | 阿里百炼、火山引擎豆包、深度求索、智谱ChatGLM、Gemini | 智谱ChatGLM、Gemini |\n| ollama 接口调用 | Ollama | - |\n| dify 接口调用 | Dify | - |\n| fastgpt 接口调用 | Fastgpt | - |\n| coze 接口调用 | Coze | - |\n\n实际上，任何支持 openai 接口调用的 LLM 均可接入使用。\n\n---\n\n### TTS 语音合成\n\n| 使用方式 | 支持平台 | 免费平台 |\n|:---:|:---:|:---:|\n| 接口调用 | EdgeTTS、火山引擎豆包TTS、腾讯云、阿里云TTS、CosyVoiceSiliconflow、TTS302AI、CozeCnTTS、GizwitsTTS、ACGNTTS、OpenAITTS | EdgeTTS、CosyVoiceSiliconflow(部分) |\n| 本地服务 | FishSpeech、GPT_SOVITS_V2、GPT_SOVITS_V3、MinimaxTTS | FishSpeech、GPT_SOVITS_V2、GPT_SOVITS_V3、MinimaxTTS |\n\n---\n\n### VAD 语音活动检测\n\n| 类型  |   平台名称    | 使用方式 | 收费模式 | 备注 |\n|:---:|:---------:|:----:|:----:|:--:|\n| VAD | SileroVAD | 本地使用 |  免费  |    |\n\n---\n\n### ASR 语音识别\n\n| 使用方式 | 支持平台 | 免费平台 |\n|:---:|:---:|:---:|\n| 本地使用 | FunASR、SherpaASR | FunASR、SherpaASR |\n| 接口调用 | DoubaoASR | - |\n\n---\n\n### Memory 记忆存储\n\n|   类型   |      平台名称       | 使用方式 |   收费模式    | 备注 |\n|:------:|:---------------:|:----:|:---------:|:--:|\n| Memory |     mem0ai      | 接口调用 | 1000次/月额度 |    |\n| Memory | mem_local_short | 本地总结 |    免费     |    |\n\n---\n\n### Intent 意图识别\n\n|   类型   |     平台名称      | 使用方式 |  收费模式   |          备注           |\n|:------:|:-------------:|:----:|:-------:|:---------------------:|\n| Intent |  intent_llm   | 接口调用 | 根据LLM收费 |    通过大模型识别意图，通用性强     |\n| Intent | function_call | 接口调用 | 根据LLM收费 | 通过大模型函数调用完成意图，速度快，效果好 |\n\n---\n\n## 鸣谢 🙏\n\n| Logo | 项目/公司 | 说明 |\n|:---:|:---:|:---|\n| \u003cimg src=\"./docs/images/logo_bailing.png\" width=\"160\"\u003e | [百聆语音对话机器人](https://github.com/wwbin2017/bailing) | 本项目受[百聆语音对话机器人](https://github.com/wwbin2017/bailing)启发，并在其基础上实现 |\n| \u003cimg src=\"./docs/images/logo_tenclass.png\" width=\"160\"\u003e | [十方融海](https://www.tenclass.com/) | 感谢[十方融海](https://www.tenclass.com/)为小智生态制定了标准的通讯协议、多设备兼容性方案及高并发场景实践示范；为本项目提供了全链路技术文档支持 |\n| \u003cimg src=\"./docs/images/logo_xuanfeng.png\" width=\"160\"\u003e | [玄凤科技](https://github.com/Eric0308) | 感谢[玄凤科技](https://github.com/Eric0308)贡献函数调用框架、MCP通信协议及插件化调用机制的实现代码，通过标准化的指令调度体系与动态扩展能力，显著提升了前端设备(IoT)的交互效率和功能延展性 |\n| \u003cimg src=\"./docs/images/logo_huiyuan.png\" width=\"160\"\u003e | [汇远设计](http://ui.kwd988.net/) | 感谢[汇远设计](http://ui.kwd988.net/)为本项目提供专业视觉解决方案，用其服务超千家企业的设计实战经验，赋能本项目产品用户体验 |\n| \u003cimg src=\"./docs/images/logo_qinren.png\" width=\"160\"\u003e | [西安勤人信息科技](https://www.029app.com/) | 感谢[西安勤人信息科技](https://www.029app.com/)深化本项目视觉体系，确保整体设计风格在多场景应用中的一致性和扩展性 |\n\n\n\u003ca href=\"https://star-history.com/#xinnan-tech/xiaozhi-esp32-server\u0026Date\"\u003e\n\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=xinnan-tech/xiaozhi-esp32-server\u0026type=Date\u0026theme=dark\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=xinnan-tech/xiaozhi-esp32-server\u0026type=Date\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=xinnan-tech/xiaozhi-esp32-server\u0026type=Date\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinnan-tech%2Fxiaozhi-esp32-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxinnan-tech%2Fxiaozhi-esp32-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinnan-tech%2Fxiaozhi-esp32-server/lists"}