Compare commits

..
120 Commits
Author SHA1 Message Date
欣南科技andGitHub 5fcfc529c0 Merge pull request #3201 from xinnan-tech/0.9.4
Bump to 0.9.4
2026-06-03 09:08:43 +08:00
hrz 370d148a4e Bump to 0.9.4 2026-06-03 09:07:39 +08:00
欣南科技andGitHub 3088ddce38 Merge pull request #3200 from xinnan-tech/update_doc
update:补充设备间通话开启备注
2026-06-02 18:23:49 +08:00
hrz 8e3faf20d3 update:补充设备间通话开启备注 2026-06-02 18:22:31 +08:00
欣南科技andGitHub f42088eff4 Merge pull request #3199 from xinnan-tech/py-device-calling
update:如果通讯权限 alias 为空,就用默认使用设备名称
2026-06-01 23:53:29 +08:00
hrz a0181cc723 update:如果通讯权限 alias 为空,就用默认使用设备名称 2026-06-01 23:52:38 +08:00
欣南科技andGitHub 941aaf10ce Merge pull request #3198 from xinnan-tech/py-device-calling
fix:用户别名缺失bug
2026-06-01 22:57:24 +08:00
hrz 235ec8a25d update:更换通讯录图标 2026-06-01 22:55:03 +08:00
hrz effe95ba8f fix:用户别名缺失bug 2026-06-01 22:54:34 +08:00
CGDandGitHub 4c4ba0aa08 Merge pull request #3196 from xinnan-tech/py-device-calling
Py device calling
2026-06-01 16:34:02 +08:00
3030332422 7af4b41881 update:设备呼叫工具的接听触发提示词约束 2026-06-01 16:25:52 +08:00
hrz cfcf68d4ce Merge branch 'py-device-calling' of https://github.com/xinnan-tech/xiaozhi-esp32-server into py-device-calling 2026-05-31 10:30:54 +08:00
hrz 7f2675f9df update:增加设备呼叫使用条件 2026-05-31 10:30:10 +08:00
Sakura-RanChen 69fd5a1ea8 不开启通讯录功能时不显示相关工具
关闭通讯录功能清除相关状态
2026-05-29 17:34:21 +08:00
Sakura-RanChen 4392edf27d 调整相关说明文档 2026-05-29 15:56:52 +08:00
zhuoqinglian e4ea9c8eff Merge branch 'style-device-calling' into py-device-calling 2026-05-29 14:37:55 +08:00
zhuoqinglian 2adf51ddf9 fix: 修复顶部导航栏遮挡的问题 2026-05-29 14:36:14 +08:00
CGDandGitHub 3d1b133162 Merge pull request #3195 from xinnan-tech/fix-timezone-unify
fix:修复时区导致的设备状态不同步的问题
2026-05-29 10:29:02 +08:00
DaGou12138andGitHub f539d46de3 Merge pull request #3194 from xinnan-tech/fix(model-config)
fix(model-config): 修复合并JSON时的类型异常并添加日志
2026-05-29 10:10:21 +08:00
baigao 1701bfbfca fix(model-config): 修复合并JSON时的类型异常并添加日志
1. 为mergeJson方法添加空值检查和类型校验逻辑
2. 增加日志打印便于排查问题
3. 优化代码换行和注释格式
4. 修复原有代码中潜在的类型转换异常问题
2026-05-29 10:07:11 +08:00
zhuoqinglian bb48e7efab Merge branch 'style-device-calling' into py-device-calling 2026-05-29 10:05:24 +08:00
zhuoqinglian 9ea67d4306 update: 通讯录页面样式调整 2026-05-29 10:04:54 +08:00
rainv123 3a0ce6998e fix:修复设备型号不显示的问题 2026-05-29 09:50:09 +08:00
hrz 0678521b16 update:优化addressBook配置的的存储方式 2026-05-28 19:36:26 +08:00
hrz 84187d4e68 update:优化翻译 2026-05-28 15:18:54 +08:00
hrz 38958b2d06 add:通讯录i18n行数对齐 2026-05-28 15:02:20 +08:00
hrz 1e17e5ac8a fixed:当数据库的就数据不支持新特性时,增加新特性 2026-05-28 14:41:06 +08:00
rainv123 ec5063f050 fix: 设备最后连接时间返回 UTC 时间戳,修复时区显示问题 2026-05-27 17:35:10 +08:00
Sakura-RanChen d03583f493 增加工具配置说明 2026-05-27 17:28:58 +08:00
Sakura-RanChen 4a55662e91 fix: 修复智能体在线状态获取
补充相关国际化
2026-05-27 16:57:48 +08:00
Sakura-RanChen de78e87c77 调整逻辑使用java端作为中转发送 2026-05-27 15:34:17 +08:00
wengzhandGitHub ff011d3c44 Merge pull request #3192 from xinnan-tech/fix_rag_page_size
fix:修复知识库文档切片的分页显示问题
2026-05-27 10:30:13 +08:00
rainv123 a90229a22a fix:修复知识库文档切片的分页显示问题 2026-05-27 10:26:50 +08:00
wengzhandGitHub 559d47a229 Merge pull request #3189 from xinnan-tech/digital-human_prompt
update:根据数字人 emoji 开关动态渲染系统提示词
2026-05-26 16:38:46 +08:00
Sakura-RanChen ce68c83eea feat: 新增设备互相通讯功能
feat: 新增通讯录页面
2026-05-26 16:37:39 +08:00
3030332422 7e63b7e852 update:根据数字人 emoji 开关动态渲染系统提示词 2026-05-26 11:43:18 +08:00
wengzhandGitHub 7f73dae1bf Merge pull request #3183 from xinnan-tech/digital-human_fix_emoji
fix:情绪表情默认改为false
2026-05-20 17:49:02 +08:00
3030332422 48e8839a1e fix:情绪表情默认改为false 2026-05-20 17:43:55 +08:00
wengzhandGitHub 73f20ed9b0 Merge pull request #3182 from xinnan-tech/perf-tool-add-online-search
fix:修复deepseek模型下工具名重复导致错误问题
2026-05-20 15:03:26 +08:00
DaGou12138 48a2bd5a5a fix:修复deepseek模型下工具名重复导致错误问题 2026-05-20 14:52:21 +08:00
wengzhandGitHub fb7e2e17a8 Merge pull request #3176 from xinnan-tech/perf-tool-add-online-search
Perf:新增联网搜索工具类、修复新闻描述配置获取源问题
2026-05-14 10:51:23 +08:00
欣南科技andGitHub bcce6a4ebe Merge pull request #3174 from xinnan-tech/faq-digital-human
add:faq增加数字人相关链接
2026-05-13 17:24:01 +08:00
hrz 7ef86eb3c6 add:faq增加数字人相关链接 2026-05-13 17:20:21 +08:00
wengzhandGitHub 789b207a94 Merge pull request #3173 from xinnan-tech/chore-move-multilingual-readmes-to-docs
chore:迁移多语言 README 到 docs/readme
2026-05-12 15:20:06 +08:00
DaGou12138 db14d08c7b perf:
1、新增联网搜索工具类(web_search)
2、修复新闻描述配置获取源问题,改为从连接配置获取
3、新增web_search所需配置项数据集
2026-05-12 15:16:31 +08:00
DaGou12138 46e7f8508d perf:
1、新增联网搜索工具类(web_search)
2、修复新闻描述配置获取源问题,改为从连接配置获取
3、新增web_search所需配置项数据集
2026-05-12 15:16:08 +08:00
3030332422 f3583742c7 chore:迁移多语言 README 到 docs/readme 2026-05-12 15:15:08 +08:00
wengzhandGitHub 27de4c40ea Merge pull request #3111 from xinnan-tech/py-test-wake
test测试页面唤醒功能
2026-05-12 11:00:58 +08:00
3030332422 98ba86d4a6 update:对文档的补充说明 2026-05-12 10:49:02 +08:00
3030332422 2aa1a8d590 update:补充 2026-05-12 10:24:19 +08:00
3030332422 a2c3da55cd update:关于对digital-human的markdown文档的修改 2026-05-12 09:45:43 +08:00
3030332422 41ad57ad4f update:test迁移重命名为digital-human 2026-05-12 09:27:39 +08:00
hrz 6e1ed9fa4d update:简化说明;默认开启唤醒词 2026-05-10 20:26:40 +08:00
wengzhandGitHub 1b5c00231a Merge pull request #3165 from xinnan-tech/fix-chat-total
fix: 修复聊天记录左侧会话数量统计
2026-05-09 15:56:05 +08:00
zhuoqinglian 95acba1126 fix: 修复聊天记录左侧会话数量统计 2026-05-09 15:54:53 +08:00
wengzhandGitHub 1e6f0fd1be Merge pull request #3162 from xinnan-tech/perf-tool-call-optimization
fix:修复音乐播放工具TTS上报记录问题
2026-05-08 16:40:37 +08:00
DaGou12138 eb571fae57 fix:修复音乐播放工具TTS上报记录问题 2026-05-08 16:38:23 +08:00
wengzhandGitHub 2946be7284 Merge pull request #3161 from xinnan-tech/perf-tool-call-optimization
fix:优化天气工具调用提示词
2026-05-08 14:23:11 +08:00
DaGou12138 425cb1d6bd fix:优化天气工具调用提示词,本地上下文存在当前所在地的天气信息无需再度查询工具 2026-05-08 14:20:52 +08:00
wengzhandGitHub cf9b0ec712 Merge pull request #3160 from xinnan-tech/fix-chat-title
fix: 修复聊天记录标题过长展示异常的问题
2026-05-08 11:08:23 +08:00
zhuoqinglian 1b053dc9c8 fix: 修复聊天记录标题过长展示异常的问题 2026-05-08 11:05:20 +08:00
wengzhandGitHub d7ad656bd0 Merge pull request #3159 from xinnan-tech/perf-tool-call-optimization
fix:优化对话过程中JSON闭合符号清理的问题
2026-05-08 10:48:58 +08:00
DaGou12138 7dae67a57b fix:优化对话过程中JSON闭合符号清理的问题 2026-05-08 10:46:37 +08:00
wengzhandGitHub 7b0f59a747 Merge pull request #3158 from xinnan-tech/chore/cleanup
chore: 暂时移除近期不可用或不稳定的TTS供应器及相关配置
2026-05-08 10:38:53 +08:00
DaGou12138 2eaa5bbb11 fix:优化对话过程中异常符号记录的问题 2026-05-08 10:29:50 +08:00
FAN-yeB c693ff1564 update:linkerai 近期多次测试,linkerai接口无法提供稳定服务,先暂时下架这个供应器 2026-05-08 10:18:26 +08:00
DaGou12138andGitHub e9bf006d9d Merge pull request #3154 from haixinke/Bug-get-user-prifile-null
fix:当打开用户画像开关时,修复获取用户画像为空的问题
2026-05-07 16:01:57 +08:00
wengzhandGitHub bef96f36e2 Merge pull request #3157 from xinnan-tech/fix-streaming-tts-original-text
Fix streaming tts original text
2026-05-07 15:36:56 +08:00
wengzhandGitHub bebb7eac69 Merge pull request #3156 from xinnan-tech/perf-tool-call-optimization
perf:优化新闻工具新闻源配置获取的逻辑
2026-05-07 11:43:17 +08:00
DaGou12138 a787130b74 perf:
1、优化新闻工具新闻源获取的逻辑
2、调整新闻工具描述内容
2026-05-07 11:41:17 +08:00
FAN-yeB 8b7f16b9c2 update:TTS_GizwitsTTS 近期机智云语音合成不成功,先暂时下架这个供应器 2026-05-07 11:27:32 +08:00
FAN-yeB 9ed66ec013 update:TTS_ACGNTTS 海豚配音截止5月7日未找到token入口,先暂时下架这个供应器 2026-05-07 10:54:03 +08:00
FAN-yeB 05c22cdf2a update:更新 .gitignore忽略.claude目录 2026-05-07 10:23:02 +08:00
FAN-yeB 4bc0b67cd7 update:去除无用的.claude目录 2026-05-07 10:20:48 +08:00
Sakura-RanChen 0a6f811448 fix: 修复流式情况下替换词失败 2026-05-07 10:20:10 +08:00
wengzhandGitHub 5aeb55fffd Merge pull request #3155 from xinnan-tech/perf-tool-call-optimization
perf:优化工具调用问题、调整后端智能体搜索条件逻辑
2026-05-06 17:01:15 +08:00
DaGou12138 c33ee9442e perf:
1、优化小智后端智能体搜索条件逻辑
2、优化工具调用准确率问题,修改工具提示词,去除非必要的few-shot逻辑
3、优化工具描述内容
2026-05-06 16:53:06 +08:00
minwang 4670ad2925 delete log 2026-05-01 16:03:02 +08:00
minwangandClaude Sonnet 4.6 b542388053 🐛 修复PowerMem用户画像查询返回空的问题
修复 get_user_profile() 方法在缓存未命中时主动从 SDK 获取用户画
像,支持 profile_content 和 topics 两种格式,解决新对话中用户画像无法显示的问题

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 14:57:36 +08:00
3030332422 ba68c3d423 update:修改文档示例密码 2026-04-30 19:54:09 +08:00
3030332422 c30cd5ca79 update:添加“一体机数字人”配置说明 2026-04-30 18:04:44 +08:00
rainv123 a71ce53a68 fix:修复使用替换词时,火山引擎双向流式tts的文本显示/上报问题 2026-04-30 17:33:40 +08:00
rainv123 dd88107131 Revert "fix: 修复流式TTS替换词显示/上报问题"
This reverts commit 8b847a3826.
2026-04-30 15:57:03 +08:00
rainv123 8b847a3826 fix: 修复流式TTS替换词显示/上报问题 2026-04-30 14:32:36 +08:00
wengzhandGitHub 036b89f24e Merge pull request #3151 from xinnan-tech/py-refactor-asr-tts
调整配置
2026-04-30 11:42:36 +08:00
Sakura-RanChen 354280d430 调整配置 2026-04-30 11:41:16 +08:00
hrzandGitHub e2d16ec8d4 Merge pull request #3150 from Mirrorium227/main
Closes #Issue3149 修复文档序号
2026-04-30 11:27:15 +08:00
Radar SongandGitHub 6a0192de27 Closes #Issue3149 修复文档序号 2026-04-29 20:18:17 +08:00
hrzandGitHub ac6eeb5c1f Merge pull request #3145 from haixinke/fix-bug_prompt_cache_key_wrong
Fix:【设备快速提示词缓存key错误】
2026-04-29 14:32:42 +08:00
minwang 23e213f6ea 修复设备快速提示词缓存key错误 2026-04-28 15:52:23 +08:00
wengzhandGitHub 382c948482 Merge pull request #3144 from xinnan-tech/fix-memory-config
fix:修复记忆模型配置保存字段未删除问题
2026-04-28 15:25:49 +08:00
DaGou12138 a67d938523 fix:修复记忆模型配置保存字段未删除问题 2026-04-28 15:23:57 +08:00
wengzhandGitHub 26aca54f4b Merge pull request #3141 from xinnan-tech/add-correct-word
fix修复 asyncio.gather 吞掉业务异常的问题
2026-04-27 17:31:47 +08:00
rainv123 4717b8beac fix修复 asyncio.gather 吞掉业务异常的问题 2026-04-27 17:29:41 +08:00
wengzhandGitHub cd580b6f81 Merge pull request #3139 from xinnan-tech/py-fix-mem0ai
fix: 修复Mem0AI记忆模式工具调用时保存记忆400错误
2026-04-27 16:57:26 +08:00
3030332422 70740af7a6 fix: 修复Mem0AI记忆模式工具调用时保存记忆400错误 2026-04-27 16:25:05 +08:00
wengzhandGitHub 7b30c25923 Merge pull request #3132 from xinnan-tech/replacement-word
feat: 新增替换词管理功能
2026-04-27 16:23:54 +08:00
wengzhandGitHub 7db13b8be2 Merge pull request #3130 from xinnan-tech/add-correct-word
add:替换词功能
2026-04-27 16:23:33 +08:00
wengzhandGitHub a0df41ac24 Merge pull request #3136 from xinnan-tech/performance_tester
update:解决base类修改后测速工具兼容性问题
2026-04-27 15:08:26 +08:00
FAN-yeB a432c295d3 update:解决base类修改后测速工具兼容性问题 2026-04-27 15:06:40 +08:00
wengzhandGitHub ab8a35e233 Merge pull request #3135 from xinnan-tech/perf-tool-call-optimization
Perf:优化工具调用准确性、禁用标题总结与记忆模型思考模式、拆分动态上下文
2026-04-27 14:54:16 +08:00
DaGou12138 160b67197f Merge branch 'refs/heads/main' into perf-tool-call-optimization 2026-04-27 14:23:28 +08:00
DaGou12138 151a0c1b99 perf:
1、优化工具调用相关提示词,拆分静态system-prompt和动态上下文。
2、新增few-shot示例,使用"调用→结果→回复"流程闭环,显著提高多次会话后工具调用准确性。
3、去除对话标题总结和记忆的模型思考模式。
2026-04-27 11:08:25 +08:00
zhuoqinglian 52af722463 update: 更新替换词数量限制 2026-04-24 14:54:37 +08:00
rainv123 606a42cfb2 update:替换词功能 2026-04-24 10:06:26 +08:00
zhuoqinglian f85e863144 feat: 新增替换词管理功能 2026-04-23 17:50:57 +08:00
3030332422 44587985dd fix: 优化唤醒词音频采集 2026-04-22 11:42:22 +08:00
3030332422 db73faeec4 fix: 优化唤醒词音频采集,使用队列解耦回调与推理处理 2026-04-22 10:35:48 +08:00
DaGou12138 8c0899415a Merge branch 'refs/heads/main' into perf-tool-call-optimization 2026-04-21 15:02:31 +08:00
DaGou12138 3736a5845a perf:
1、优化提示词context动态变化导致的缓存失效问题,拆分静态system-prompt和动态上下文
2026-04-21 15:01:57 +08:00
DaGou12138 90888de0ba perf:
1、新增工具调用Action枚举RECORD,通过完整的三段式 assistant(tool_calls) → tool → assistant(response)让模型准确学习到工具调用的正确行为,优化play_music的工具调用枚举NONE变更为RECORD,优化解决音乐播放工具调用缺陷问题。
2、处理悬空 tool_calls问题。
3、去除工具提示词强化注入逻辑。
2026-04-21 11:36:06 +08:00
3030332422 96f0412f94 update:测试页面支持关闭情绪表情功能 2026-04-21 11:15:31 +08:00
3030332422 dc2094ea8b update:说明文档的补充 2026-04-17 17:30:18 +08:00
3030332422 b0e24732de update:更改说明文档 2026-04-17 16:12:02 +08:00
3030332422 fb469a3ee3 fix:唤醒词服务启动失败不阻塞测试页面 2026-04-17 15:09:57 +08:00
3030332422 725c562aa1 update:对齐测试页面唤醒流程与硬件设备 2026-04-17 11:33:28 +08:00
3030332422 36ea5c5e13 fix:修复多个问题 2026-04-15 17:53:51 +08:00
3030332422 4225f1525f fix: 移除 RuntimeInstanceLock 锁文件机制 2026-04-14 17:59:29 +08:00
3030332422 d5b883817c update:前端增加可配置的本地唤醒词运行时 2026-04-14 16:54:37 +08:00
3030332422 705b5732a6 update:为 test 页面增加可配置的本地唤醒词运行时 2026-04-10 09:17:22 +08:00
256 changed files with 10053 additions and 1120 deletions
+5
View File
@@ -149,6 +149,7 @@ tmp
.history .history
.DS_Store .DS_Store
main/xiaozhi-server/data main/xiaozhi-server/data
main/xiaozhi-server/.claude
main/manager-web/node_modules main/manager-web/node_modules
.config.yaml .config.yaml
@@ -187,3 +188,7 @@ uploadfile
!main/manager-mobile/**/.env* !main/manager-mobile/**/.env*
!main/manager-mobile/**/*.json !main/manager-mobile/**/*.json
!main/xiaozhi-server/**/*.json !main/xiaozhi-server/**/*.json
!main/digital-human/**/*.json
main/digital-human/wakeword_runtime/models
main/digital-human/wakeword_runtime/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01
sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2
+5 -5
View File
@@ -18,10 +18,10 @@
<p align="center"> <p align="center">
<a href="./README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DBEDFA"></a> <a href="./README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DBEDFA"></a>
<a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a> <a href="./docs/readme/README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a>
<a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a> <a href="./docs/readme/README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a>
<a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a> <a href="./docs/readme/README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a>
<a href="./README_pt_BR.md"><img alt="Português (Brasil)" src="https://img.shields.io/badge/Português (Brasil)-DFE0E5"></a> <a href="./docs/readme/README_pt_BR.md"><img alt="Português (Brasil)" src="https://img.shields.io/badge/Português (Brasil)-DFE0E5"></a>
<a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases"> <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">
<img alt="GitHub Contributors" src="https://img.shields.io/github/v/release/xinnan-tech/xiaozhi-esp32-server?logo=docker" /> <img alt="GitHub Contributors" src="https://img.shields.io/github/v/release/xinnan-tech/xiaozhi-esp32-server?logo=docker" />
</a> </a>
@@ -226,7 +226,7 @@ Websocket接口地址: wss://2662r3426b.vicp.fun/xiaozhi/v1/
| 工具名称 | 位置 | 使用方法 | 功能说明 | | 工具名称 | 位置 | 使用方法 | 功能说明 |
|:---:|:---|:---:|:---:| |:---:|:---|:---:|:---:|
| 音频交互测试工具 | main》xiaozhi-server》test》test_page.html | 使用谷歌浏览器直接打开 | 测试音频播放和接收功能,验证Python端音频处理是否正常 | | 音频交互测试工具 | main》digital-human》index.html | 在 `main/digital-human` 执行 `python start.py` 后访问 `http://127.0.0.1:8006/index.html` | 测试音频播放和接收功能,验证Python端音频处理是否正常 |
| 模型响应测试工具 | main》xiaozhi-server》performance_tester.py | 执行 `python performance_tester.py` | 测试ASR(语音识别)、LLM(大模型)、VLLM(视觉模型)、TTS(语音合成)三个核心模块的响应速度 | | 模型响应测试工具 | main》xiaozhi-server》performance_tester.py | 执行 `python performance_tester.py` | 测试ASR(语音识别)、LLM(大模型)、VLLM(视觉模型)、TTS(语音合成)三个核心模块的响应速度 |
> 💡 提示:测试模型速度时,只会测试配置了密钥的模型。 > 💡 提示:测试模型速度时,只会测试配置了密钥的模型。
+1 -1
View File
@@ -241,7 +241,7 @@ LLM:
250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-OTA接口是 http://192.168.4.123:8003/xiaozhi/ota/ 250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-OTA接口是 http://192.168.4.123:8003/xiaozhi/ota/
250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-Websocket地址是 ws://192.168.4.123:8000/xiaozhi/v1/ 250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-Websocket地址是 ws://192.168.4.123:8000/xiaozhi/v1/
250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-=======上面的地址是websocket协议地址,请勿用浏览器访问======= 250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-=======上面的地址是websocket协议地址,请勿用浏览器访问=======
250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-如想测试websocket请用谷歌浏览器打开test目录下的test_page.html 250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-如想测试websocket请启动digital-human模块,打开浏览器交互测试
250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-======================================================= 250427 13:04:20[0.3.11_SiFuChTTnofu][__main__]-INFO-=======================================================
``` ```
+3 -3
View File
@@ -198,7 +198,7 @@ docker logs -f xiaozhi-esp32-server
``` ```
25-02-23 12:01:09[core.websocket_server] - INFO - Websocket地址是 ws://xxx.xx.xx.xx:8000/xiaozhi/v1/ 25-02-23 12:01:09[core.websocket_server] - INFO - Websocket地址是 ws://xxx.xx.xx.xx:8000/xiaozhi/v1/
25-02-23 12:01:09[core.websocket_server] - INFO - =======上面的地址是websocket协议地址,请勿用浏览器访问======= 25-02-23 12:01:09[core.websocket_server] - INFO - =======上面的地址是websocket协议地址,请勿用浏览器访问=======
25-02-23 12:01:09[core.websocket_server] - INFO - 如想测试websocket请用谷歌浏览器打开test目录下的test_page.html 25-02-23 12:01:09[core.websocket_server] - INFO - 如想测试websocket请启动digital-human模块,打开浏览器交互测试
25-02-23 12:01:09[core.websocket_server] - INFO - ======================================================= 25-02-23 12:01:09[core.websocket_server] - INFO - =======================================================
``` ```
@@ -418,7 +418,7 @@ manager-api:
secret: 12345678-xxxx-xxxx-xxxx-123456789000 secret: 12345678-xxxx-xxxx-xxxx-123456789000
``` ```
## 5.运行项目 ## 9.运行项目
``` ```
# 确保在xiaozhi-server目录下执行 # 确保在xiaozhi-server目录下执行
@@ -431,7 +431,7 @@ python app.py
``` ```
25-02-23 12:01:09[core.websocket_server] - INFO - Server is running at ws://xxx.xx.xx.xx:8000/xiaozhi/v1/ 25-02-23 12:01:09[core.websocket_server] - INFO - Server is running at ws://xxx.xx.xx.xx:8000/xiaozhi/v1/
25-02-23 12:01:09[core.websocket_server] - INFO - =======上面的地址是websocket协议地址,请勿用浏览器访问======= 25-02-23 12:01:09[core.websocket_server] - INFO - =======上面的地址是websocket协议地址,请勿用浏览器访问=======
25-02-23 12:01:09[core.websocket_server] - INFO - 如想测试websocket请用谷歌浏览器打开test目录下的test_page.html 25-02-23 12:01:09[core.websocket_server] - INFO - 如想测试websocket请启动digital-human模块,打开浏览器交互测试
25-02-23 12:01:09[core.websocket_server] - INFO - ======================================================= 25-02-23 12:01:09[core.websocket_server] - INFO - =======================================================
``` ```
+7 -2
View File
@@ -66,12 +66,12 @@ VAD:
4、[如何自动拉取本项目最新代码自动编译和启动](./dev-ops-integration.md)<br/> 4、[如何自动拉取本项目最新代码自动编译和启动](./dev-ops-integration.md)<br/>
5、[如何与Nginx集成](https://github.com/xinnan-tech/xiaozhi-esp32-server/issues/791)<br/> 5、[如何与Nginx集成](https://github.com/xinnan-tech/xiaozhi-esp32-server/issues/791)<br/>
### 9、编译固件相关教程 ### 8、编译固件相关教程
1、[如何自己编译小智固件](./firmware-build.md)<br/> 1、[如何自己编译小智固件](./firmware-build.md)<br/>
2、[如何基于虾哥编译好的固件修改OTA地址](./firmware-setting.md)<br/> 2、[如何基于虾哥编译好的固件修改OTA地址](./firmware-setting.md)<br/>
3、[单模块部署如何配置固件OTA自动升级](./ota-upgrade-guide.md)<br/> 3、[单模块部署如何配置固件OTA自动升级](./ota-upgrade-guide.md)<br/>
### 10、拓展相关教程 ### 9、拓展相关教程
1、[如何开启手机号码注册智控台](./ali-sms-integration.md)<br/> 1、[如何开启手机号码注册智控台](./ali-sms-integration.md)<br/>
2、[如何集成HomeAssistant实现智能家居控制](./homeassistant-integration.md)<br/> 2、[如何集成HomeAssistant实现智能家居控制](./homeassistant-integration.md)<br/>
3、[如何开启视觉模型实现拍照识物](./mcp-vision-integration.md)<br/> 3、[如何开启视觉模型实现拍照识物](./mcp-vision-integration.md)<br/>
@@ -84,6 +84,11 @@ VAD:
10、[如何部署上下文源](./context-provider-integration.md)<br/> 10、[如何部署上下文源](./context-provider-integration.md)<br/>
11、[如何集成PowerMem智能记忆](./powermem-integration.md)<br/> 11、[如何集成PowerMem智能记忆](./powermem-integration.md)<br/>
12、[如何配置天气插件查询天气](./weather-integration.md)<br/> 12、[如何配置天气插件查询天气](./weather-integration.md)<br/>
13、[如何开启设备呼叫插件](./device-call-guide.md)<br/>
### 10、数字人相关教程
1、[数字人digital-human启动方法](./digital-human-wakeword.md)<br/>
2、[如何在N100迷你主机上部署数字人digital-human](./all-in-one-digital-human-setup.md)<br/>
### 11、语音克隆、本地语音部署相关教程 ### 11、语音克隆、本地语音部署相关教程
1、[如何在智控台克隆音色](./huoshan-streamTTS-voice-cloning.md)<br/> 1、[如何在智控台克隆音色](./huoshan-streamTTS-voice-cloning.md)<br/>
+442
View File
@@ -0,0 +1,442 @@
# 一体机数字人配置指南
本项目用于在 x86 架构设备(如迷你主机、工控机、普通电脑等)上部署一套完整的数字人展示系统,实现以下功能:
- 开机自动进入 Kiosk 全屏浏览器,展示指定网页
- 后台运行唤醒词检测服务,支持语音交互
> **说明**:本文档以 **Intel N100 迷你主机(天虹 QN10-100B4)** 为例进行部署演示,其他 x86 设备可参考调整(注意网络配置和声卡设备差异)。
## 适用环境
| 项目 | 说明 |
|------|------|
| 示例硬件 | 天虹 QN10-100B4Intel N100 |
| 操作系统 | Ubuntu 24.04 LTS (Noble Numbat) |
| 示例用户 | xz(请根据实际情况替换) |
| 网络 | Wi-Fi 连接,固定 IP(可按需改为有线) |
## 部署流程
1. 系统初始化(换源、连网)
2. 安装图形组件与 Kiosk 浏览器
3. 配置自动登录与图形界面
4. 部署唤醒词服务(Python 环境 + 麦克风)
5. 优化开机速度与隐藏启动信息
---
### 系统初始化(换源、连网)
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo tee /etc/apt/sources.list > /dev/null <<EOF
deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
EOF
echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
```
安装网络管理工具(若已存在可忽略)
Bash
```
sudo apt update
sudo apt install network-manager -y
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
```
设置wifi密码,固定ip
> **提醒**:以下命令中的 Wi-Fi 名称、密码、IP 地址均为示例,请务必替换为你自己的实际信息。
Bash
```
sudo nmcli device wifi connect "MERCURY_1812" password "12345678"
sudo nmcli connection modify "MERCURY_1812" ipv4.addresses "192.168.0.86/24" ipv4.gateway "192.168.0.1" ipv4.dns "8.8.8.8,114.114.114.114" ipv4.method "manual"
sudo nmcli connection up "MERCURY_1812"
```
### 第一步:安装核心图形组件与浏览器
这里我们坚持“极简主义”,坚决不装多余的桌面环境(如 GNOME/KDE),只装底层驱动、最轻量的窗口管理器(Openbox)、隐藏鼠标工具以及 Chromium 浏览器。
Bash
```
sudo timedatectl set-timezone Asia/Shanghai
sudo apt install net-tools vim fonts-wqy-microhei fonts-wqy-zenhei alsa-utils pulseaudio -y
sudo apt install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox unclutter -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb -y
rm google-chrome-stable_current_amd64.deb
sudo apt purge snapd -y
```
### 第二步:配置 TTY1 开机免密自动登录
为了避免手动输入账号密码的尴尬,我们通过修改 systemd 服务,让系统一开机就自动以 `xz` 的身份登录。这里使用一键写入命令,彻底避开由于 `nano``vi` 操作不当导致的保存失败问题。
**1. 创建配置目录:**
Bash
```
sudo mkdir -p /etc/systemd/system/getty@tty1.service.d/
```
**2. 写入自动登录规则:**
Bash
```
echo -e "[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin xz --noclear %I \$TERM" | sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf
```
**3. 重载服务并设置默认启动目标:**
Bash
```
sudo systemctl daemon-reload
sudo systemctl set-default multi-user.target
```
### 第三步:配置登录后自动启动图形界面
系统自动登录后默认停留在黑底白字的命令行,我们需要配置脚本,让它一旦登录立马启动 X11 图形环境。
**1. 触发 `startx` 的启动逻辑:**
直接将触发代码追加写入你的个人环境配置文件中:
Bash
```
cat << 'EOF' >> ~/.bash_profile
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx
fi
EOF
```
**2. 告诉 `startx` 去启动 Openbox**
Bash
```
echo "exec openbox-session" > ~/.xinitrc
```
### 第四步:配置“铜墙铁壁”的 Openbox 与浏览器
这是最核心的一步:关闭屏幕休眠、隐藏鼠标、全屏锁定浏览器,并写一个“死循环”保证浏览器被意外关闭后也能瞬间复活。
**1. 创建 Openbox 配置目录:**
Bash
```
mkdir -p ~/.config/openbox
```
**2. 写入自启动脚本 (`autostart`)**
复制以下整段代码并回车(这会自动把所有保护规则写进文件里):
Bash
```
cat << 'EOF' > ~/.config/openbox/autostart
# 关闭屏幕保护
xset -dpms
xset s noblank
xset s off
# 隐藏鼠标
unclutter -idle 0.1 -root &
# 死循环启动 Chromium(崩溃或被关也能秒重启)
while true; do
google-chrome \
--kiosk \
--no-first-run \
--no-default-browser-check \
--disable-infobars \
--disable-session-crashed-bubble \
--disable-translate \
--disable-external-intent-requests \
--autoplay-policy=no-user-gesture-required \
--use-fake-ui-for-media-stream \
"https://www.douyin.com"
sleep 2
done &
EOF
```
**3. 屏蔽 `Alt+F4` 退出快捷键:**
为了防止别人插上键盘强行关掉窗口,我们把 Openbox 默认的系统快捷键干掉。
Bash
```
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/
sed -i '/<keybind key="A-F4">/,/<\/keybind>/d' ~/.config/openbox/rc.xml
```
### 第五步:重启验收成果
如果拔掉网线或不需要等待所有网络上线,可禁用网络等待服务,避免开机卡顿
Bash
```
sudo systemctl mask systemd-networkd-wait-online.service
sudo systemctl mask NetworkManager-wait-online.service
```
隐藏开机信息(GRUB
Bash
```
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 systemd.show_status=false vt.global_cursor_default=0"/g' /etc/default/grub
echo 'GRUB_TIMEOUT_STYLE="hidden"' | sudo tee -a /etc/default/grub
echo 'GRUB_RECORDFAIL_TIMEOUT=0' | sudo tee -a /etc/default/grub
sudo update-grub
```
声音设置成100%,然后 重启:
Bash
```
amixer -q sset Master 100% unmute
sudo reboot
```
### 部署唤醒词服务
在一体机上部署唤醒词检测服务,需要安装 Python 环境、上传项目文件、配置 Camera 麦克风和开机自启。
#### 1. 安装 Miniconda
```bash
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda3
~/miniconda3/bin/conda init bash
source ~/.bashrc
rm Miniconda3-latest-Linux-x86_64.sh
```
确保登录时自动进入conda环境
```bash
if ! grep -q '.bashrc' ~/.bash_profile; then
cat << 'EOF' >> ~/.bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
EOF
fi
```
#### 2. 创建 Python 虚拟环境
```bash
conda create -n test python=3.10 -y
conda activate test
```
若出现 Terms of Service have not been accepted 错误,执行:
```bash
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
```
#### 3. 上传项目文件
将开发机上的 `main/digital-human/` 整个目录上传到一体机的 `~/digital-human/` 目录:
```bash
# 在开发机上执行(将 <一体机IP> 替换为实际 IP
scp -r main/digital-human/ xz@<一体机IP>:~/digital-human/
```
#### 4. 安装系统依赖
唤醒词服务需要音频采集库和 ALSA PulseAudio 插件:
```bash
sudo apt install libportaudio2 portaudio19-dev libasound2-plugins -y
```
#### 5. 安装 Python 依赖
```bash
cd ~/digital-human/wakeword_runtime
pip install numpy
pip install -r requirements.txt
```
#### 6. 下载唤醒词模型
模型文件不包含在项目中,需要单独下载配置,详见 [docs/digital-human-wakeword.md](digital-human-wakeword.md) 中的“模型下载”章节。
#### 7. 修改 Openbox 自启动脚本
需要在 autostart 中加上 PulseAudio 和 Camera 麦克风配置,并将 Chrome 地址改为测试页面。
先确认 Camera 麦克风在 PulseAudio 中的设备名:
```bash
pulseaudio --start
pactl list sources short
```
找到包含 `USB_Camera` 的那一行,记下完整名称,例如:
```
alsa_input.usb-SN0002_2K_USB_Camera_46435000_P030D00_SN0002-02.mono-fallback
```
然后用完整内容覆盖 autostart(将 `TARGET_MIC` 替换为你的实际设备名):
```bash
cat << 'EOF' > ~/.config/openbox/autostart
# 1. 启动声音服务并稍作等待
pulseaudio --start
sleep 1
# 2. 锁定 Camera 的麦克风(请替换为你的实际设备名)
TARGET_MIC="alsa_input.usb-SN0002_2K_USB_Camera_46435000_P030D00_SN0002-02.mono-fallback"
# 3. 设为系统默认麦克风
pactl set-default-source "$TARGET_MIC"
# 4. 解除静音
pactl set-source-mute "$TARGET_MIC" 0
# 5. 音量拉到 100%
pactl set-source-volume "$TARGET_MIC" 100%
# --- 极简桌面与浏览器环境配置 ---
# 关闭屏幕保护
xset -dpms
xset s noblank
xset s off
# 隐藏鼠标
unclutter -idle 0.1 -root &
# 死循环启动浏览器(崩溃或被关也能秒重启)
while true; do
google-chrome \
--kiosk \
--no-first-run \
--no-default-browser-check \
--disable-infobars \
--disable-session-crashed-bubble \
--disable-translate \
--disable-external-intent-requests \
--autoplay-policy=no-user-gesture-required \
--use-fake-ui-for-media-stream \
"http://127.0.0.1:8006/index.html"
sleep 2
done &
EOF
```
#### 8. 配置唤醒词服务开机自启
创建 systemd 服务文件,让唤醒词服务开机自动运行。
先确认当前用户的 UID
```bash
id -u $(whoami)
```
然后用查到的 UID 替换下面 `1000`(通常第一个用户就是 1000):
```bash
sudo tee /etc/systemd/system/digital-human.service << 'EOF'
[Unit]
Description=Digital Human Runtime
After=network.target sound.target
[Service]
Type=simple
User=xz
Environment=XDG_RUNTIME_DIR=/run/user/1000
Environment=PULSE_SERVER=unix:/run/user/1000/pulse/native
WorkingDirectory=/home/xz/digital-human
ExecStartPre=/bin/sleep 10
ExecStart=/home/xz/miniconda3/envs/test/bin/python start.py
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
```
> **重要说明**
> - `User=xz` — 替换为你的实际用户名
> - `/run/user/1000` — 替换为你实际的 UID
> - `WorkingDirectory` 和 `ExecStart` 中的路径 — 替换为你的实际部署路径
> - `Environment` 中的 PulseAudio 环境变量**必须保留**,否则唤醒词服务和浏览器无法同时使用 Camera 麦克风
启用并启动服务:
```bash
sudo systemctl daemon-reload
sudo systemctl enable digital-human
sudo systemctl start digital-human
```
#### 9. 常用服务管理命令
```bash
sudo systemctl start digital-human # 立即启动
sudo systemctl stop digital-human # 停止
sudo systemctl restart digital-human # 重启
sudo systemctl status digital-human # 查看状态
journalctl -u digital-human -f # 查看实时日志
```
+148
View File
@@ -0,0 +1,148 @@
# 设备间相互呼叫插件使用指南
## 概述
设备呼叫功能允许两个已配置设备之间通过语音/数据通道进行双向通信。设备A呼叫设备B时,系统通过以下流程实现:
```
设备A → 授权校验 → MQTT网关 → 设备B远程唤醒 → 建立连接 → 通话建立
```
## 使用这个功能的前提条件
1. 你必须要有至少两个设备,每个设备型号必须是`ESP32-S3`,因为只有`ESP32-S3`才支持远程唤醒功能。
2. 你的设备必须要有`两个麦克风`。但是如果你的设备只有`单个麦克风`,你只是想体验一下这个功能,也是可以的,但是会有强烈的卡顿感。
3. 你必须使用[全模块部署](Deployment_all.md)本项目,因为你需要`智控台`来管理设备的权限和通信。
4. 你必须安装并配置好`2026年5月27日`以后的[MQTT网关服务](mqtt-gateway-integration.md),如果你已经部署了MQTT网关服务,请确认代码的版本是`2026年5月27日`之后的版本。
以上是使用这个功能的硬性条件,接下来会详细介绍。
## 配置步骤
### 第一步:开启通讯录功能
1. 确认你的智控台版本是`0.9.4`或以上版本。
2. 登录智控台后台
3. 进入 **系统功能配置**
4. 在左侧功能列表中勾选 **通讯录**
5. 点击 **保存配置** 确认
### 第二步:配置设备间呼叫权限
1. 在智控台顶部菜单点击 **通讯录**
2. 在左侧智能体下,设备列表中选择你的设备A(支持按 MAC地址 或 备注名 搜索)
3. 在右侧详情面板中,找到目标设备B的称呼设置,例如 **"小王"**
4. 勾选设备B的 **呼叫权限** 复选框
5. 点击 **保存**
**双向授权说明:** 如需设备A和设备B互相通信,必须在两侧智控台分别配置对方权限。例如:
- 在设备A的配置中勾选设备B → 设备A可与设备B通信
- 在设备B的配置中勾选设备A → 设备B可与设备A通信
### 第三步:在智能体配置添加呼叫工具
1. 在智控台顶部菜单点击 **智能体管理**
2. 在刚刚配置设备联系人的相关智能体中点击 **编辑角色**
3. 在右侧详情面板中,点击 **编辑功能**
4. 勾选 **设备呼叫设备** 工具
5. 点击 **保存配置** 确认
6. 在外侧再次点击 **保存配置** ,随即重启设备
### 第四步:固件端添加远程唤醒工具
1. 在[xiaozhi-esp32](https://github.com/78/xiaozhi-esp32) 代码的基础上增加远程唤醒工具MCP,版本支持为2.1.0至2.2.62026年5月29日的版本)
2. 在application.h文件中添加远程唤醒函数声明
```cpp
void RemoteWakeup(const std::string& reason);
```
3. 在application.cc文件中添加远程唤醒函数
```cpp
void Application::RemoteWakeup(const std::string& reason){
if (!protocol_) {
return;
}
auto state = GetDeviceState();
if (state == kDeviceStateIdle) {
audio_service_.EncodeWakeWord();
if (!protocol_->IsAudioChannelOpened()) {
SetDeviceState(kDeviceStateConnecting);
if (!protocol_->OpenAudioChannel()) {
audio_service_.EnableWakeWordDetection(true);
return;
}
}
std::string wake_word = reason;
#if CONFIG_USE_AFE_WAKE_WORD || CONFIG_USE_CUSTOM_WAKE_WORD
// Encode and send the wake word data to the server
while (auto packet = audio_service_.PopWakeWordPacket()) {
protocol_->SendAudio(std::move(packet));
}
// Set the chat state to wake word detected
protocol_->SendWakeWordDetected(wake_word);
SetListeningMode(aec_mode_ == kAecOff ? kListeningModeAutoStop : kListeningModeRealtime);
#else
// Set flag to play popup sound after state changes to listening
// (PlaySound here would be cleared by ResetDecoder in EnableVoiceProcessing)
play_popup_on_listening_ = true;
SetListeningMode(aec_mode_ == kAecOff ? kListeningModeAutoStop : kListeningModeRealtime);
#endif
} else if (state == kDeviceStateSpeaking) {
AbortSpeaking(kAbortReasonWakeWordDetected);
SetDeviceState(kDeviceStateIdle);
} else if (state == kDeviceStateActivating) {
SetDeviceState(kDeviceStateIdle);
}
}
```
4. 在mcp_server.cc文件中添加远程唤醒工具
```cpp
AddUserOnlyTool("self.remote_wakeup", "Remote wakeup function with configurable parameters",
PropertyList({
Property("reason", kPropertyTypeString, "Wakeup reason"),
}),
[this](const PropertyList& properties) -> ReturnValue {
std::string reason = properties["reason"].value<std::string>();
ESP_LOGI(TAG, "Wakeup reason=%s", reason.c_str());
auto& app = Application::GetInstance();
app.RemoteWakeup(reason);
return true;
```
5. 按照 [固件编译烧录指南](firmware-build.md) 完成固件烧录
6. 无论你的设备是单麦还是双麦,请在编译环节,勾选开启AEC功能!
7. 无论你的设备是单麦还是双麦,请在编译环节,勾选开启AEC功能!
8. 无论你的设备是单麦还是双麦,请在编译环节,勾选开启AEC功能!
### 第五步:配置MQTT网关服务
1. 部署MQTT网关服务,参考 [MQTT网关集成文档](mqtt-gateway-integration.md)
2. 如果已经部署请确认代码的版本是2026年5月27日的版本
## 呼叫流程说明
准备两个设备,在智控台上面配置好通讯权限和在智能体中添加呼叫工具之后,在其中一个小智对话那里对他说:”呼叫XXX“,观察设备B是否响应。
## 常见问题
### Q: 设备B没有响应呼叫?
- 检查设备B是否在线(智控台设备状态)
- 确认设备B的固件已正确集成远程唤醒工具
- 检查MQTT网关连接是否正常
- 验证双向权限配置是否完整
### Q: 提示"无呼叫权限"
- 在智控台确认设备A已勾选设备B的呼叫权限
- 确认配置已保存(非仅修改未保存)
### Q: 如何确认通讯录功能已开启?
- 智控台顶部菜单如显示"通讯录"入口,则表示已开启
### Q: 我叫他呼叫"张山",但是他老是识别成"张三",怎么办?
- 可以查阅你使用的asr服务的文档,确认是否支持热词识别。
- 如果你用的是`FunASRServer`,可以在容器里的`热词文件`里添加"张山",然后重启容器。
- 如果你用的是`火山引擎`的服务,可以在`火山引擎的控制台`里添加`热词文件`,然后回到智控台的`模型配置页面`,把`热词文件名称`配置在`火山引擎的tts`上去。
+220
View File
@@ -0,0 +1,220 @@
# 数字人digital-human启动方法
## 概述
测试页面集成了基于 **Sherpa-ONNX** 的高精度语音唤醒功能,支持自定义唤醒词和实时检测。使用轻量级关键词检测模型,提供毫秒级响应速度。
## 唤醒词模型
### 模型下载(必需)
**重要说明**: 项目不包含模型文件,需要提前下载配置。
### 官方模型下载地址
- **官方模型列表**: <https://csukuangfj.github.io/sherpa/onnx/kws/pretrained_models/index.html>
- **推荐模型**: `sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01`
### 下载和配置步骤
#### 1. 下载模型包
```bash
# 方法1:直接下载(推荐)
cd main/digital-human/wakeword_runtime/
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/kws-models/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2
# 解压
tar xvf sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2
# 方法2:使用ModelScope
pip install modelscope
python -c "
from modelscope import snapshot_download
snapshot_download('pkufool/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01', cache_dir='./models')
"
```
#### 2. 配置模型文件
模型包下载后包含以下文件:
```
sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01/
├── encoder-epoch-12-avg-2-chunk-16-left-64.int8.onnx # 速度优先
├── encoder-epoch-12-avg-2-chunk-16-left-64.onnx
├── encoder-epoch-99-avg-1-chunk-16-left-64.int8.onnx # 速度优先
├── encoder-epoch-99-avg-1-chunk-16-left-64.onnx # 精度优先
├── decoder-epoch-12-avg-2-chunk-16-left-64.onnx
├── decoder-epoch-99-avg-1-chunk-16-left-64.onnx # 精度优先
├── joiner-epoch-12-avg-2-chunk-16-left-64.int8.onnx # 速度优先
├── joiner-epoch-12-avg-2-chunk-16-left-64.onnx
├── joiner-epoch-99-avg-1-chunk-16-left-64.int8.onnx # 速度优先
├── joiner-epoch-99-avg-1-chunk-16-left-64.onnx # 精度优先
├── tokens.txt # Token映射表(必需)
├── keywords_raw.txt # 模型包里可能附带(可选,runtime 不依赖)
├── keywords.txt # 现成的
├── test_wavs/ # 测试音频(可选)
├── configuration.json # 模型元信息(可选)
└── README.md # 说明文档(可选)
```
#### 3. 选择配置方案
**方案一:精度优先(推荐)**
```bash
cd sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01
# 创建模型目录
mkdir -p ../models
# 复制精度优先的epoch-99 fp32三件套
cp encoder-epoch-99-avg-1-chunk-16-left-64.onnx ../models/encoder.onnx
cp decoder-epoch-99-avg-1-chunk-16-left-64.onnx ../models/decoder.onnx
cp joiner-epoch-99-avg-1-chunk-16-left-64.onnx ../models/joiner.onnx
# 复制配套文件
cp tokens.txt ../models/tokens.txt
# keywords_raw.txt 如果模型包里附带,可自行保留;runtime 不依赖它
```
**方案二:速度优先**
```bash
cd sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01
# 创建模型目录
mkdir -p ../models
# 复制速度优先的epoch-99 int8三件套
cp encoder-epoch-99-avg-1-chunk-16-left-64.int8.onnx ../models/encoder.onnx
cp decoder-epoch-99-avg-1-chunk-16-left-64.onnx ../models/decoder.onnx
cp joiner-epoch-99-avg-1-chunk-16-left-64.int8.onnx ../models/joiner.onnx
# 复制配套文件
cp tokens.txt ../models/tokens.txt
```
**注意事项**:
- **不要混用 fp32 与 int8**:三个模型文件必须保持一致的精度
- **优先选择 epoch-99**:比 epoch-12 训练更充分,精度更高
- **必需文件**`encoder.onnx` + `decoder.onnx` + `joiner.onnx` + `tokens.txt` + `keywords.txt`
### 最终模型文件结构
配置完成后,模型文件应放在 `wakeword_runtime/models/` 目录下,完整路径为 `main/digital-human/wakeword_runtime/models/`
```
wakeword_runtime/models/
├── encoder.onnx # 编码器模型(重命名后)
├── decoder.onnx # 解码器模型(重命名后)
├── joiner.onnx # 连接器模型(重命名后)
├── tokens.txt # 拼音 Token 映射表(228行版本)
├── keywords.txt # 关键词配置文件(首次启动自动生成)
└── keywords_raw.txt # 可选,runtime 不依赖
```
## 启动方式
`main/digital-human` 目录执行:
```bash
pip install -r wakeword_runtime/requirements.txt
python start.py
```
启动后默认地址:
- 页面地址:`http://127.0.0.1:8006/index.html`
- 事件桥地址:`ws://127.0.0.1:8006/wakeword-ws`
- 健康检查:`http://127.0.0.1:8006/health`
停止方式:
- 在运行终端按 `Ctrl+C`
- 会同时停止静态页面服务、事件桥和唤醒词检测流程
## 配置文件说明
配置文件位于 [main/digital-human/wakeword_runtime/config.json](../main/digital-human/wakeword_runtime/config.json)。
当前主要配置项:
```json
{
"wakeword": {
"enabled": true
},
"model_dir": "models",
"audio": {
"input_device": null,
"sample_rate": 16000,
"channels": 1
},
"detector": {
"num_threads": 4,
"provider": "cpu",
"max_active_paths": 2,
"keywords_score": 1.8,
"keywords_threshold": 0.1,
"num_trailing_blanks": 1,
"cooldown_seconds": 1.5
},
"logging": {
"level": "INFO",
"dir": "logs",
"file": "wakeword-runtime.log"
}
}
```
各字段含义:
| 参数 | 说明 |
| --- | --- |
| `wakeword.enabled` | 是否启用本地唤醒词检测 |
| `model_dir` | 模型和词表所在目录 |
| `audio.input_device` | 麦克风输入设备,默认使用系统默认设备 |
| `audio.sample_rate` | 采样率,默认 `16000` |
| `audio.channels` | 声道数,默认 `1` |
| `detector.num_threads` | 检测器线程数 |
| `detector.provider` | 推理 provider,当前通常为 `cpu` |
| `detector.max_active_paths` | 搜索路径数 |
| `detector.keywords_score` | 关键词增强分数 |
| `detector.keywords_threshold` | 检测阈值 |
| `detector.num_trailing_blanks` | 尾随空白数量 |
| `detector.cooldown_seconds` | 连续触发冷却时间 |
| `logging.level` | 日志等级 |
| `logging.dir` | 日志目录 |
| `logging.file` | 日志文件名 |
## 推荐使用流程
### 首次使用
1. 准备 `models/` 目录下的模型文件和 `tokens.txt`
2. 确认 `models/keywords.txt` 存在
3.`digital-human` 目录运行 `python start.py`
4. 浏览器打开 `http://127.0.0.1:8006/index.html`
5. 进入设置页检查“唤醒词”配置
### 修改唤醒词
1. 打开数字人页面设置
2. 切到“唤醒词”页签
3. 修改启用状态或唤醒词列表
4. 点击“应用唤醒词”
5. 根据提示决定是否立即重启
### 禁用唤醒词
1. 将“启用本地唤醒词”改成禁用
2. 点击“应用唤醒词”
3. 建议立即重启一次
禁用后:
- 页面与事件桥仍然可用
- 唤醒词检测不会继续运行
+2 -2
View File
@@ -13,9 +13,9 @@ http://192.168.1.25:8003/xiaozhi/ota/
``` ```
如果显示“OTA接口运行正常,向设备发送的websocket地址是:ws://xxx:8000/xiaozhi/v1/ 如果显示“OTA接口运行正常,向设备发送的websocket地址是:ws://xxx:8000/xiaozhi/v1/
你可以使用项目自带的`test_page.html`测试一下,是否能连上ota页面输出的websocket地址。 你可以启动`digital-human`模块后打开`index.html`测试一下,是否能连上ota页面输出的websocket地址。
如果访问不到,你需要到配置文件`.config.yaml`里修改`server.websocket`的地址,重启后再重新测试,直到`test_page.html`能正常访问。 如果访问不到,你需要到配置文件`.config.yaml`里修改`server.websocket`的地址,重启后再重新测试,直到`index.html`能正常访问。
成功后,请往下进行第2步 成功后,请往下进行第2步
+1 -1
View File
@@ -118,7 +118,7 @@ mcp_endpoint: ws://192.168.1.25:8004/mcp_endpoint/mcp/?token=def
250705[__main__]-INFO-mcp接入点是 ws://192.168.1.25:8004/mcp_endpoint/mcp/?token=abc 250705[__main__]-INFO-mcp接入点是 ws://192.168.1.25:8004/mcp_endpoint/mcp/?token=abc
250705[__main__]-INFO-Websocket地址是 ws://192.168.1.25:8000/xiaozhi/v1/ 250705[__main__]-INFO-Websocket地址是 ws://192.168.1.25:8000/xiaozhi/v1/
250705[__main__]-INFO-=======上面的地址是websocket协议地址,请勿用浏览器访问======= 250705[__main__]-INFO-=======上面的地址是websocket协议地址,请勿用浏览器访问=======
250705[__main__]-INFO-如想测试websocket请用谷歌浏览器打开test目录下的test_page.html 250705[__main__]-INFO-如想测试websocket请启动digital-human模块,打开浏览器交互测试
250705[__main__]-INFO-============================================================= 250705[__main__]-INFO-=============================================================
``` ```
+1 -1
View File
@@ -23,7 +23,7 @@
250705[__main__]-INFO-mcp接入点是 ws://192.168.1.25:8004/mcp_endpoint/mcp/?token=abc 250705[__main__]-INFO-mcp接入点是 ws://192.168.1.25:8004/mcp_endpoint/mcp/?token=abc
250705[__main__]-INFO-Websocket地址是 ws://192.168.1.25:8000/xiaozhi/v1/ 250705[__main__]-INFO-Websocket地址是 ws://192.168.1.25:8000/xiaozhi/v1/
250705[__main__]-INFO-=======上面的地址是websocket协议地址,请勿用浏览器访问======= 250705[__main__]-INFO-=======上面的地址是websocket协议地址,请勿用浏览器访问=======
250705[__main__]-INFO-如想测试websocket请用谷歌浏览器打开test目录下的test_page.html 250705[__main__]-INFO-如想测试websocket请启动digital-human模块,打开浏览器交互测试
250705[__main__]-INFO-============================================================= 250705[__main__]-INFO-=============================================================
``` ```
+2 -2
View File
@@ -58,7 +58,7 @@ docker restart xiaozhi-esp32-server
2025-06-01 **** - 视觉分析接口是 http://192.168.4.7:8003/mcp/vision/explain 2025-06-01 **** - 视觉分析接口是 http://192.168.4.7:8003/mcp/vision/explain
2025-06-01 **** - Websocket地址是 ws://192.168.4.7:8000/xiaozhi/v1/ 2025-06-01 **** - Websocket地址是 ws://192.168.4.7:8000/xiaozhi/v1/
2025-06-01 **** - =======上面的地址是websocket协议地址,请勿用浏览器访问======= 2025-06-01 **** - =======上面的地址是websocket协议地址,请勿用浏览器访问=======
2025-06-01 **** - 如想测试websocket请用谷歌浏览器打开test目录下的test_page.html 2025-06-01 **** - 如想测试websocket请启动digital-human模块,打开浏览器交互测试
2025-06-01 **** - ============================================================= 2025-06-01 **** - =============================================================
``` ```
@@ -133,7 +133,7 @@ docker restart xiaozhi-esp32-server
2025-06-01 **** - 视觉分析接口是 http://192.168.4.7:8003/mcp/vision/explain 2025-06-01 **** - 视觉分析接口是 http://192.168.4.7:8003/mcp/vision/explain
2025-06-01 **** - Websocket地址是 ws://192.168.4.7:8000/xiaozhi/v1/ 2025-06-01 **** - Websocket地址是 ws://192.168.4.7:8000/xiaozhi/v1/
2025-06-01 **** - =======上面的地址是websocket协议地址,请勿用浏览器访问======= 2025-06-01 **** - =======上面的地址是websocket协议地址,请勿用浏览器访问=======
2025-06-01 **** - 如想测试websocket请用谷歌浏览器打开test目录下的test_page.html 2025-06-01 **** - 如想测试websocket请启动digital-human模块,打开浏览器交互测试
2025-06-01 **** - ============================================================= 2025-06-01 **** - =============================================================
``` ```
+1 -1
View File
@@ -91,7 +91,7 @@ TTS:
```py ```py
python app.py python app.py
``` ```
打开test目录下的test_page.html,测试连接和发送消息时paddlespeech端是否有输出日志 启动`main/digital-human`下的`python start.py`后,打开`http://127.0.0.1:8006/index.html`,测试连接和发送消息时paddlespeech端是否有输出日志
输出日志参考: 输出日志参考:
``` ```
+36 -36
View File
@@ -1,4 +1,4 @@
[![Banners](docs/images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server) [![Banners](../images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server)
<h1 align="center">Xiaozhi Backend-Service xiaozhi-esp32-server</h1> <h1 align="center">Xiaozhi Backend-Service xiaozhi-esp32-server</h1>
@@ -10,14 +10,14 @@ Unterstützt MQTT+UDP-Protokoll, Websocket-Protokoll, MCP-Endpunkte und Stimmabd
</p> </p>
<p align="center"> <p align="center">
<a href="./docs/FAQ.md">Häufige Fragen</a> <a href="../FAQ.md">Häufige Fragen</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Probleme melden</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Probleme melden</a>
· <a href="./README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Deployment-Dokumentation</a> · <a href="../../README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Deployment-Dokumentation</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Release-Hinweise</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Release-Hinweise</a>
</p> </p>
<p align="center"> <p align="center">
<a href="./README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a> <a href="../../README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a>
<a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a> <a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a>
<a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a> <a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a>
<a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DBEDFA"></a> <a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DBEDFA"></a>
@@ -38,7 +38,7 @@ Geleitet vom Team von Professor Siyuan Liu (South China University of Technology
</br> </br>
刘思源教授团队主导研发(华南理工大学) 刘思源教授团队主导研发(华南理工大学)
</br> </br>
<img src="./docs/images/hnlg.jpg" alt="South China University of Technology" width="50%"> <img src="../images/hnlg.jpg" alt="South China University of Technology" width="50%">
</p> </p>
--- ---
@@ -54,35 +54,35 @@ Möchten Sie die Nutzungseffekte sehen? Klicken Sie auf die Videos unten 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank"> <a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank">
<picture> <picture>
<img alt="响应速度感受" src="docs/images/demo9.png" /> <img alt="响应速度感受" src="../images/demo9.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank"> <a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank">
<picture> <picture>
<img alt="速度优化秘诀" src="docs/images/demo6.png" /> <img alt="速度优化秘诀" src="../images/demo6.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank"> <a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank">
<picture> <picture>
<img alt="复杂医疗场景" src="docs/images/demo1.png" /> <img alt="复杂医疗场景" src="../images/demo1.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank"> <a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank">
<picture> <picture>
<img alt="MQTT指令下发" src="docs/images/demo4.png" /> <img alt="MQTT指令下发" src="../images/demo4.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank"> <a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank">
<picture> <picture>
<img alt="声纹识别" src="docs/images/demo14.png" /> <img alt="声纹识别" src="../images/demo14.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -91,35 +91,35 @@ Möchten Sie die Nutzungseffekte sehen? Klicken Sie auf die Videos unten 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank"> <a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank">
<picture> <picture>
<img alt="控制家电开关" src="docs/images/demo5.png" /> <img alt="控制家电开关" src="../images/demo5.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank"> <a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank">
<picture> <picture>
<img alt="MCP接入点" src="docs/images/demo13.png" /> <img alt="MCP接入点" src="../images/demo13.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank"> <a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank">
<picture> <picture>
<img alt="多指令任务" src="docs/images/demo11.png" /> <img alt="多指令任务" src="../images/demo11.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank"> <a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank">
<picture> <picture>
<img alt="播放音乐" src="docs/images/demo7.png" /> <img alt="播放音乐" src="../images/demo7.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank"> <a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank">
<picture> <picture>
<img alt="天气插件" src="docs/images/demo8.png" /> <img alt="天气插件" src="../images/demo8.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -128,35 +128,35 @@ Möchten Sie die Nutzungseffekte sehen? Klicken Sie auf die Videos unten 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank"> <a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank">
<picture> <picture>
<img alt="实时打断" src="docs/images/demo10.png" /> <img alt="实时打断" src="../images/demo10.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank"> <a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank">
<picture> <picture>
<img alt="拍照识物品" src="docs/images/demo12.png" /> <img alt="拍照识物品" src="../images/demo12.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank"> <a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank">
<picture> <picture>
<img alt="自定义音色" src="docs/images/demo2.png" /> <img alt="自定义音色" src="../images/demo2.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank"> <a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank">
<picture> <picture>
<img alt="使用粤语交流" src="docs/images/demo3.png" /> <img alt="使用粤语交流" src="../images/demo3.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank"> <a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank">
<picture> <picture>
<img alt="播报新闻" src="docs/images/demo0.png" /> <img alt="播报新闻" src="../images/demo0.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -175,17 +175,17 @@ Möchten Sie die Nutzungseffekte sehen? Klicken Sie auf die Videos unten 🎥
## Deployment-Dokumentation ## Deployment-Dokumentation
![Banners](docs/images/banner2.png) ![Banners](../images/banner2.png)
Dieses Projekt bietet zwei Bereitstellungsmethoden. Bitte wählen Sie basierend auf Ihren spezifischen Anforderungen: Dieses Projekt bietet zwei Bereitstellungsmethoden. Bitte wählen Sie basierend auf Ihren spezifischen Anforderungen:
#### 🚀 Auswahl der Bereitstellungsmethode #### 🚀 Auswahl der Bereitstellungsmethode
| Bereitstellungsmethode | Funktionen | Anwendungsszenarien | Deployment-Dokumente | Konfigurationsanforderungen | Video-Tutorials | | Bereitstellungsmethode | Funktionen | Anwendungsszenarien | Deployment-Dokumente | Konfigurationsanforderungen | Video-Tutorials |
|---------|------|---------|---------|---------|---------| |---------|------|---------|---------|---------|---------|
| **Vereinfachte Installation** | Intelligenter Dialog, Einzel-Agenten-Verwaltung | Umgebungen mit geringer Konfiguration, Daten in Konfigurationsdateien gespeichert, keine Datenbank erforderlich | [①Docker-Version](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Quellcode-Deployment](./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)| 2 Kerne 4GB bei Verwendung von `FunASR`, 2 Kerne 2GB bei allen APIs | - | | **Vereinfachte Installation** | Intelligenter Dialog, Einzel-Agenten-Verwaltung | Umgebungen mit geringer Konfiguration, Daten in Konfigurationsdateien gespeichert, keine Datenbank erforderlich | [①Docker-Version](../Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Quellcode-Deployment](../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)| 2 Kerne 4GB bei Verwendung von `FunASR`, 2 Kerne 2GB bei allen APIs | - |
| **Vollständige Modulinstallation** | Intelligenter Dialog, Mehrbenutzerverwaltung, Mehr-Agenten-Verwaltung, Intelligente Steuerkonsole-Bedienung | Vollständige Funktionserfahrung, Daten in Datenbank gespeichert |[①Docker-Version](./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) / [②Quellcode-Deployment](./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) / [③Quellcode-Deployment Auto-Update-Tutorial](./docs/dev-ops-integration.md) | 4 Kerne 8GB bei Verwendung von `FunASR`, 2 Kerne 4GB bei allen APIs| [Video-Tutorial für lokalen Quellcode-Start](https://www.bilibili.com/video/BV1wBJhz4Ewe) | | **Vollständige Modulinstallation** | Intelligenter Dialog, Mehrbenutzerverwaltung, Mehr-Agenten-Verwaltung, Intelligente Steuerkonsole-Bedienung | Vollständige Funktionserfahrung, Daten in Datenbank gespeichert |[①Docker-Version](../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) / [②Quellcode-Deployment](../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) / [③Quellcode-Deployment Auto-Update-Tutorial](../dev-ops-integration.md) | 4 Kerne 8GB bei Verwendung von `FunASR`, 2 Kerne 4GB bei allen APIs| [Video-Tutorial für lokalen Quellcode-Start](https://www.bilibili.com/video/BV1wBJhz4Ewe) |
Häufige Fragen und entsprechende Tutorials finden Sie unter [diesem Link](./docs/FAQ.md) Häufige Fragen und entsprechende Tutorials finden Sie unter [diesem Link](../FAQ.md)
> 💡 Hinweis: Unten ist eine Testplattform, die mit dem neuesten Code bereitgestellt wurde. Sie können bei Bedarf brennen und testen. Gleichzeitige Benutzer: 6, Daten werden täglich gelöscht. > 💡 Hinweis: Unten ist eine Testplattform, die mit dem neuesten Code bereitgestellt wurde. Sie können bei Bedarf brennen und testen. Gleichzeitige Benutzer: 6, Daten werden täglich gelöscht.
@@ -224,7 +224,7 @@ Dieses Projekt bietet die folgenden Testwerkzeuge, um Ihnen bei der Überprüfun
| Werkzeugname | Standort | Verwendungsmethode | Funktionsbeschreibung | | Werkzeugname | Standort | Verwendungsmethode | Funktionsbeschreibung |
|:---:|:---|:---:|:---:| |:---:|:---|:---:|:---:|
| Audio-Interaktionstesttool | main》xiaozhi-server》test》test_page.html | Direkt mit Google Chrome öffnen | Testet Audio-Wiedergabe- und Empfangsfunktionen, überprüft, ob die Python-seitige Audioverarbeitung normal ist | | Audio-Interaktionstesttool | main》digital-human》index.html | In `main/digital-human` `python start.py` ausführen und dann `http://127.0.0.1:8006/index.html` öffnen | Testet Audio-Wiedergabe- und Empfangsfunktionen, überprüft, ob die Python-seitige Audioverarbeitung normal ist |
| Modell-Reaktionstesttool | main》xiaozhi-server》performance_tester.py | Ausführen `python performance_tester.py` | Testet die Reaktionsgeschwindigkeit von ASR (Spracherkennung), LLM (großes Modell), VLLM (Vision-Modell), TTS (Sprachsynthese) drei Kernmodulen | | Modell-Reaktionstesttool | main》xiaozhi-server》performance_tester.py | Ausführen `python performance_tester.py` | Testet die Reaktionsgeschwindigkeit von ASR (Spracherkennung), LLM (großes Modell), VLLM (Vision-Modell), TTS (Sprachsynthese) drei Kernmodulen |
> 💡 Hinweis: Beim Testen der Modellgeschwindigkeit werden nur Modelle mit konfigurierten Schlüsseln getestet. > 💡 Hinweis: Beim Testen der Modellgeschwindigkeit werden nur Modelle mit konfigurierten Schlüsseln getestet.
@@ -232,7 +232,7 @@ Dieses Projekt bietet die folgenden Testwerkzeuge, um Ihnen bei der Überprüfun
--- ---
## Funktionsliste ✨ ## Funktionsliste ✨
### Implementiert ✅ ### Implementiert ✅
![请参考-全模块安装架构图](docs/images/deploy2.png) ![请参考-全模块安装架构图](../images/deploy2.png)
| Funktionsmodul | Beschreibung | | Funktionsmodul | Beschreibung |
|:---:|:---| |:---:|:---|
| Kernarchitektur | Basierend auf [MQTT+UDP-Gateway](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), WebSocket und HTTP-Servern, bietet vollständiges Konsolenverwaltungs- und Authentifizierungssystem | | Kernarchitektur | Basierend auf [MQTT+UDP-Gateway](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), WebSocket und HTTP-Servern, bietet vollständiges Konsolenverwaltungs- und Authentifizierungssystem |
@@ -252,9 +252,9 @@ Dieses Projekt bietet die folgenden Testwerkzeuge, um Ihnen bei der Überprüfun
### In Entwicklung 🚧 ### In Entwicklung 🚧
Um über spezifische Entwicklungsplanfortschritte zu erfahren, [klicken Sie hier](https://github.com/users/xinnan-tech/projects/3). Häufige Fragen und entsprechende Tutorials finden Sie unter [diesem Link](./docs/FAQ.md) Um über spezifische Entwicklungsplanfortschritte zu erfahren, [klicken Sie hier](https://github.com/users/xinnan-tech/projects/3). Häufige Fragen und entsprechende Tutorials finden Sie unter [diesem Link](../FAQ.md)
Wenn Sie ein Softwareentwickler sind, finden Sie hier einen [Offenen Brief an Entwickler](docs/contributor_open_letter.md). Willkommen beim Beitritt! Wenn Sie ein Softwareentwickler sind, finden Sie hier einen [Offenen Brief an Entwickler](../contributor_open_letter.md). Willkommen beim Beitritt!
--- ---
@@ -329,7 +329,7 @@ Tatsächlich kann jedes VLLM, das OpenAI-Schnittstellenaufrufe unterstützt, int
| Typ | Plattformname | Verwendungsmethode | Preismodell | Hinweise | | Typ | Plattformname | Verwendungsmethode | Preismodell | Hinweise |
|:------:|:---------------:|:----:|:---------:|:--:| |:------:|:---------------:|:----:|:---------:|:--:|
| Memory | mem0ai | Schnittstellenaufrufe | 1000 Mal/Monat Kontingent | | | Memory | mem0ai | Schnittstellenaufrufe | 1000 Mal/Monat Kontingent | |
| Memory | [powermem](./docs/powermem-integration.md) | Lokale Zusammenfassung | Abhängig von LLM und DB | OceanBase Open Source, unterstützt intelligente Abfrage | | Memory | [powermem](../powermem-integration.md) | Lokale Zusammenfassung | Abhängig von LLM und DB | OceanBase Open Source, unterstützt intelligente Abfrage |
| Memory | mem_local_short | Lokale Zusammenfassung | Kostenlos | | | Memory | mem_local_short | Lokale Zusammenfassung | Kostenlos | |
| Memory | nomem | Kein Gedächtnismodus | Kostenlos | | | Memory | nomem | Kein Gedächtnismodus | Kostenlos | |
@@ -357,13 +357,13 @@ Tatsächlich kann jedes VLLM, das OpenAI-Schnittstellenaufrufe unterstützt, int
| Logo | Projekt/Unternehmen | Beschreibung | | Logo | Projekt/Unternehmen | Beschreibung |
|:---:|:---:|:---| |:---:|:---:|:---|
| <img src="./docs/images/logo_bailing.png" width="160"> | [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) | Dieses Projekt wurde von [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) inspiriert und auf dessen Basis implementiert | | <img src="../images/logo_bailing.png" width="160"> | [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) | Dieses Projekt wurde von [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) inspiriert und auf dessen Basis implementiert |
| <img src="./docs/images/logo_tenclass.png" width="160"> | [Tenclass](https://www.tenclass.com/) | Dank an [Tenclass](https://www.tenclass.com/) für die Formulierung von Standardkommunikationsprotokollen, Multi-Geräte-Kompatibilitätslösungen und High-Concurrency-Szenario-Praxisdemonstrationen für das Xiaozhi-Ökosystem; für die Bereitstellung vollständiger technischer Dokumentationsunterstützung für dieses Projekt | | <img src="../images/logo_tenclass.png" width="160"> | [Tenclass](https://www.tenclass.com/) | Dank an [Tenclass](https://www.tenclass.com/) für die Formulierung von Standardkommunikationsprotokollen, Multi-Geräte-Kompatibilitätslösungen und High-Concurrency-Szenario-Praxisdemonstrationen für das Xiaozhi-Ökosystem; für die Bereitstellung vollständiger technischer Dokumentationsunterstützung für dieses Projekt |
| <img src="./docs/images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology](https://github.com/Eric0308) | Dank an [Xuanfeng Technology](https://github.com/Eric0308) für den Beitrag des Funktionsaufruf-Frameworks, des MCP-Kommunikationsprotokolls und der plugin-basierten Aufrufmechanismus-Implementierungscode. Durch standardisiertes Befehlsplanungssystem und dynamische Erweiterungsfähigkeiten wird die Interaktionseffizienz und funktionale Erweiterbarkeit von Frontend-Geräten (IoT) erheblich verbessert | | <img src="../images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology](https://github.com/Eric0308) | Dank an [Xuanfeng Technology](https://github.com/Eric0308) für den Beitrag des Funktionsaufruf-Frameworks, des MCP-Kommunikationsprotokolls und der plugin-basierten Aufrufmechanismus-Implementierungscode. Durch standardisiertes Befehlsplanungssystem und dynamische Erweiterungsfähigkeiten wird die Interaktionseffizienz und funktionale Erweiterbarkeit von Frontend-Geräten (IoT) erheblich verbessert |
| <img src="./docs/images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Dank an [huangjunsen](https://github.com/huangjunsen0406) für den Beitrag des `Smart Control Console Mobile`-Moduls, das eine effiziente Steuerung und Echtzeit-Interaktion über mobile Geräte ermöglicht und die Betriebsbequemlichkeit und Verwaltungseffizienz des Systems in mobilen Szenarien erheblich verbessert | | <img src="../images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Dank an [huangjunsen](https://github.com/huangjunsen0406) für den Beitrag des `Smart Control Console Mobile`-Moduls, das eine effiziente Steuerung und Echtzeit-Interaktion über mobile Geräte ermöglicht und die Betriebsbequemlichkeit und Verwaltungseffizienz des Systems in mobilen Szenarien erheblich verbessert |
| <img src="./docs/images/logo_huiyuan.png" width="160"> | [Huiyuan Design](http://ui.kwd988.net/) | Dank an [Huiyuan Design](http://ui.kwd988.net/) für die Bereitstellung professioneller visueller Lösungen für dieses Projekt, unter Verwendung ihrer Design-Praxiserfahrung im Dienst von über tausend Unternehmen, um die Produktbenutzererfahrung dieses Projekts zu stärken | | <img src="../images/logo_huiyuan.png" width="160"> | [Huiyuan Design](http://ui.kwd988.net/) | Dank an [Huiyuan Design](http://ui.kwd988.net/) für die Bereitstellung professioneller visueller Lösungen für dieses Projekt, unter Verwendung ihrer Design-Praxiserfahrung im Dienst von über tausend Unternehmen, um die Produktbenutzererfahrung dieses Projekts zu stärken |
| <img src="./docs/images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology](https://www.029app.com/) | Dank an [Xi'an Qinren Information Technology](https://www.029app.com/) für die Vertiefung des visuellen Systems dieses Projekts und die Sicherstellung der Konsistenz und Erweiterbarkeit des Gesamtdesignstils in Multi-Szenario-Anwendungen | | <img src="../images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology](https://www.029app.com/) | Dank an [Xi'an Qinren Information Technology](https://www.029app.com/) für die Vertiefung des visuellen Systems dieses Projekts und die Sicherstellung der Konsistenz und Erweiterbarkeit des Gesamtdesignstils in Multi-Szenario-Anwendungen |
| <img src="./docs/images/logo_contributors.png" width="160"> | [Code-Mitwirkende](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Dank an [alle Code-Mitwirkenden](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), Ihre Bemühungen haben das Projekt robuster und leistungsfähiger gemacht. | | <img src="../images/logo_contributors.png" width="160"> | [Code-Mitwirkende](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Dank an [alle Code-Mitwirkenden](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), Ihre Bemühungen haben das Projekt robuster und leistungsfähiger gemacht. |
<a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date"> <a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date">
+36 -36
View File
@@ -1,4 +1,4 @@
[![Banners](docs/images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server) [![Banners](../images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server)
<h1 align="center">Xiaozhi Backend Service xiaozhi-esp32-server</h1> <h1 align="center">Xiaozhi Backend Service xiaozhi-esp32-server</h1>
@@ -10,14 +10,14 @@ Support for MQTT+UDP protocol, Websocket protocol, MCP access point, voiceprint
</p> </p>
<p align="center"> <p align="center">
<a href="./docs/FAQ.md">FAQ</a> <a href="../FAQ.md">FAQ</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Report Issues</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Report Issues</a>
· <a href="./README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Deployment Docs</a> · <a href="../../README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Deployment Docs</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Release Notes</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Release Notes</a>
</p> </p>
<p align="center"> <p align="center">
<a href="./README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a> <a href="../../README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a>
<a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DBEDFA"></a> <a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DBEDFA"></a>
<a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a> <a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a>
<a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a> <a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a>
@@ -38,7 +38,7 @@ Spearheaded by Professor Siyuan Liu's Team (South China University of Technology
</br> </br>
刘思源教授团队主导研发(华南理工大学) 刘思源教授团队主导研发(华南理工大学)
</br> </br>
<img src="./docs/images/hnlg.jpg" alt="South China University of Technology" width="50%"> <img src="../images/hnlg.jpg" alt="South China University of Technology" width="50%">
</p> </p>
--- ---
@@ -54,35 +54,35 @@ Want to see the usage effects? Click the videos below 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank"> <a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank">
<picture> <picture>
<img alt="响应速度感受" src="docs/images/demo9.png" /> <img alt="响应速度感受" src="../images/demo9.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank"> <a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank">
<picture> <picture>
<img alt="速度优化秘诀" src="docs/images/demo6.png" /> <img alt="速度优化秘诀" src="../images/demo6.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank"> <a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank">
<picture> <picture>
<img alt="复杂医疗场景" src="docs/images/demo1.png" /> <img alt="复杂医疗场景" src="../images/demo1.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank"> <a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank">
<picture> <picture>
<img alt="MQTT指令下发" src="docs/images/demo4.png" /> <img alt="MQTT指令下发" src="../images/demo4.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank"> <a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank">
<picture> <picture>
<img alt="声纹识别" src="docs/images/demo14.png" /> <img alt="声纹识别" src="../images/demo14.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -91,35 +91,35 @@ Want to see the usage effects? Click the videos below 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank"> <a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank">
<picture> <picture>
<img alt="控制家电开关" src="docs/images/demo5.png" /> <img alt="控制家电开关" src="../images/demo5.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank"> <a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank">
<picture> <picture>
<img alt="MCP接入点" src="docs/images/demo13.png" /> <img alt="MCP接入点" src="../images/demo13.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank"> <a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank">
<picture> <picture>
<img alt="多指令任务" src="docs/images/demo11.png" /> <img alt="多指令任务" src="../images/demo11.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank"> <a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank">
<picture> <picture>
<img alt="播放音乐" src="docs/images/demo7.png" /> <img alt="播放音乐" src="../images/demo7.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank"> <a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank">
<picture> <picture>
<img alt="天气插件" src="docs/images/demo8.png" /> <img alt="天气插件" src="../images/demo8.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -128,35 +128,35 @@ Want to see the usage effects? Click the videos below 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank"> <a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank">
<picture> <picture>
<img alt="实时打断" src="docs/images/demo10.png" /> <img alt="实时打断" src="../images/demo10.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank"> <a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank">
<picture> <picture>
<img alt="拍照识物品" src="docs/images/demo12.png" /> <img alt="拍照识物品" src="../images/demo12.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank"> <a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank">
<picture> <picture>
<img alt="自定义音色" src="docs/images/demo2.png" /> <img alt="自定义音色" src="../images/demo2.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank"> <a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank">
<picture> <picture>
<img alt="使用粤语交流" src="docs/images/demo3.png" /> <img alt="使用粤语交流" src="../images/demo3.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank"> <a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank">
<picture> <picture>
<img alt="播报新闻" src="docs/images/demo0.png" /> <img alt="播报新闻" src="../images/demo0.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -175,17 +175,17 @@ Want to see the usage effects? Click the videos below 🎥
## Deployment Documentation ## Deployment Documentation
![Banners](docs/images/banner2.png) ![Banners](../images/banner2.png)
This project provides two deployment methods. Please choose based on your specific needs: This project provides two deployment methods. Please choose based on your specific needs:
#### 🚀 Deployment Method Selection #### 🚀 Deployment Method Selection
| Deployment Method | Features | Applicable Scenarios | Deployment Docs | Configuration Requirements | Video Tutorials | | 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](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Source Code Deployment](./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)| 2 cores 4GB if using `FunASR`, 2 cores 2GB if all APIs | - | | **Simplified Installation** | Intelligent dialogue, single agent management | Low-configuration environments, data stored in config files, no database required | [①Docker Version](../Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Source Code Deployment](../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)| 2 cores 4GB if using `FunASR`, 2 cores 2GB if all APIs | - |
| **Full Module Installation** | Intelligent dialogue, multi-user management, multi-agent management, intelligent console interface operation | Complete functionality experience, data stored in database |[①Docker Version](./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) / [②Source Code Deployment](./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) / [③Source Code Deployment Auto-Update Tutorial](./docs/dev-ops-integration.md) | 4 cores 8GB if using `FunASR`, 2 cores 4GB if all APIs| [Local Source Code Startup Video Tutorial](https://www.bilibili.com/video/BV1wBJhz4Ewe) | | **Full Module Installation** | Intelligent dialogue, multi-user management, multi-agent management, intelligent console interface operation | Complete functionality experience, data stored in database |[①Docker Version](../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) / [②Source Code Deployment](../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) / [③Source Code Deployment Auto-Update Tutorial](../dev-ops-integration.md) | 4 cores 8GB if using `FunASR`, 2 cores 4GB if all APIs| [Local Source Code Startup Video Tutorial](https://www.bilibili.com/video/BV1wBJhz4Ewe) |
For frequently asked questions and related tutorials, please refer to [this link](./docs/FAQ.md) For frequently asked questions and related tutorials, please refer to [this link](../FAQ.md)
> 💡 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. > 💡 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.
@@ -224,7 +224,7 @@ This project provides the following testing tools to help you verify the system
| Tool Name | Location | Usage Method | Function Description | | Tool Name | Location | Usage Method | Function Description |
|:---:|:---|:---:|:---:| |:---:|:---|:---:|:---:|
| Audio Interaction Test Tool | main》xiaozhi-server》test》test_page.html | Open directly with Google Chrome | Tests audio playback and reception functions, verifies if Python-side audio processing is normal | | Audio Interaction Test Tool | main》digital-human》index.html | Run `python start.py` in `main/digital-human`, then 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 three core modules: ASR(speech recognition), LLM(large model), VLLM(vision model), TTS(speech synthesis) | | Model Response Test Tool | main》xiaozhi-server》performance_tester.py | Execute `python performance_tester.py` | Tests response speed of three core modules: 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. > 💡 Note: When testing model speed, only models with configured keys will be tested.
@@ -232,7 +232,7 @@ This project provides the following testing tools to help you verify the system
--- ---
## Feature List ✨ ## Feature List ✨
### Implemented ✅ ### Implemented ✅
![请参考-全模块安装架构图](docs/images/deploy2.png) ![请参考-全模块安装架构图](../images/deploy2.png)
| Feature Module | Description | | Feature Module | Description |
|:---:|:---| |:---:|:---|
| Core Architecture | Based on [MQTT+UDP gateway](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), WebSocket and HTTP servers, provides complete console management and authentication system | | Core Architecture | Based on [MQTT+UDP gateway](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), WebSocket and HTTP servers, provides complete console management and authentication system |
@@ -252,9 +252,9 @@ This project provides the following testing tools to help you verify the system
### Under Development 🚧 ### Under Development 🚧
To learn about specific development plan progress, [click here](https://github.com/users/xinnan-tech/projects/3). For frequently asked questions and related tutorials, please refer to [this link](./docs/FAQ.md) To learn about specific development plan progress, [click here](https://github.com/users/xinnan-tech/projects/3). For frequently asked questions and related tutorials, please refer to [this link](../FAQ.md)
If you are a software developer, here is an [Open Letter to Developers](docs/contributor_open_letter.md). Welcome to join! If you are a software developer, here is an [Open Letter to Developers](../contributor_open_letter.md). Welcome to join!
--- ---
@@ -329,7 +329,7 @@ In fact, any VLLM that supports OpenAI interface calls can be integrated and use
| Type | Platform Name | Usage Method | Pricing Model | Notes | | Type | Platform Name | Usage Method | Pricing Model | Notes |
|:------:|:---------------:|:----:|:---------:|:--:| |:------:|:---------------:|:----:|:---------:|:--:|
| Memory | mem0ai | Interface calls | 1000 times/month quota | | | Memory | mem0ai | Interface calls | 1000 times/month quota | |
| Memory | [powermem](./docs/powermem-integration.md) | Local summarization | Depends on LLM and DB | OceanBase open source, supports intelligent retrieval | | Memory | [powermem](../powermem-integration.md) | Local summarization | Depends on LLM and DB | OceanBase open source, supports intelligent retrieval |
| Memory | mem_local_short | Local summarization | Free | | | Memory | mem_local_short | Local summarization | Free | |
| Memory | nomem | No memory mode | Free | | | Memory | nomem | No memory mode | Free | |
@@ -357,13 +357,13 @@ In fact, any VLLM that supports OpenAI interface calls can be integrated and use
| Logo | Project/Company | Description | | Logo | Project/Company | Description |
|:---:|:---:|:---| |:---:|:---:|:---|
| <img src="./docs/images/logo_bailing.png" width="160"> | [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) | This project is inspired by [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) and implemented on its basis | | <img src="../images/logo_bailing.png" width="160"> | [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) | This project is inspired by [Bailing Voice Dialogue Robot](https://github.com/wwbin2017/bailing) and implemented on its basis |
| <img src="./docs/images/logo_tenclass.png" width="160"> | [Tenclass](https://www.tenclass.com/) | Thanks to [Tenclass](https://www.tenclass.com/) 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 | | <img src="../images/logo_tenclass.png" width="160"> | [Tenclass](https://www.tenclass.com/) | Thanks to [Tenclass](https://www.tenclass.com/) 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 |
| <img src="./docs/images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology](https://github.com/Eric0308) | Thanks to [Xuanfeng Technology](https://github.com/Eric0308) 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) | | <img src="../images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology](https://github.com/Eric0308) | Thanks to [Xuanfeng Technology](https://github.com/Eric0308) 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) |
| <img src="./docs/images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Thanks to [huangjunsen](https://github.com/huangjunsen0406) 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. | | <img src="../images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Thanks to [huangjunsen](https://github.com/huangjunsen0406) 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. |
| <img src="./docs/images/logo_huiyuan.png" width="160"> | [Huiyuan Design](http://ui.kwd988.net/) | Thanks to [Huiyuan Design](http://ui.kwd988.net/) 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 | | <img src="../images/logo_huiyuan.png" width="160"> | [Huiyuan Design](http://ui.kwd988.net/) | Thanks to [Huiyuan Design](http://ui.kwd988.net/) 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 |
| <img src="./docs/images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology](https://www.029app.com/) | Thanks to [Xi'an Qinren Information Technology](https://www.029app.com/) for deepening this project's visual system, ensuring consistency and extensibility of overall design style in multi-scenario applications | | <img src="../images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology](https://www.029app.com/) | Thanks to [Xi'an Qinren Information Technology](https://www.029app.com/) for deepening this project's visual system, ensuring consistency and extensibility of overall design style in multi-scenario applications |
| <img src="./docs/images/logo_contributors.png" width="160"> | [Code Contributors](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Thanks to [all code contributors](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), your efforts have made the project more robust and powerful. | | <img src="../images/logo_contributors.png" width="160"> | [Code Contributors](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Thanks to [all code contributors](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), your efforts have made the project more robust and powerful. |
<a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date"> <a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date">
+36 -36
View File
@@ -1,4 +1,4 @@
[![Banners](docs/images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server) [![Banners](../images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server)
<h1 align="center">Serviço Backend Xiaozhi xiaozhi-esp32-server</h1> <h1 align="center">Serviço Backend Xiaozhi xiaozhi-esp32-server</h1>
@@ -10,14 +10,14 @@ Suporte ao protocolo MQTT+UDP, protocolo WebSocket, ponto de acesso MCP, reconhe
</p> </p>
<p align="center"> <p align="center">
<a href="./docs/FAQ.md">Perguntas Frequentes</a> <a href="../FAQ.md">Perguntas Frequentes</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Reportar Problemas</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Reportar Problemas</a>
· <a href="./README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Documentação de Implantação</a> · <a href="../../README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Documentação de Implantação</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Notas de Lançamento</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Notas de Lançamento</a>
</p> </p>
<p align="center"> <p align="center">
<a href="./README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a> <a href="../../README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a>
<a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a> <a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a>
<a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a> <a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DFE0E5"></a>
<a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a> <a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a>
@@ -38,7 +38,7 @@ Liderado pela Equipe do Professor Siyuan Liu (Universidade de Tecnologia do Sul
</br> </br>
刘思源教授团队主导研发(华南理工大学) 刘思源教授团队主导研发(华南理工大学)
</br> </br>
<img src="./docs/images/hnlg.jpg" alt="Universidade de Tecnologia do Sul da China (华南理工大学)" width="50%"> <img src="../images/hnlg.jpg" alt="Universidade de Tecnologia do Sul da China (华南理工大学)" width="50%">
</p> </p>
--- ---
@@ -54,35 +54,35 @@ Quer ver os efeitos de uso? Clique nos vídeos abaixo 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank"> <a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank">
<picture> <picture>
<img alt="Experiência de velocidade de resposta" src="docs/images/demo9.png" /> <img alt="Experiência de velocidade de resposta" src="../images/demo9.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank"> <a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank">
<picture> <picture>
<img alt="Segredo da otimização de velocidade" src="docs/images/demo6.png" /> <img alt="Segredo da otimização de velocidade" src="../images/demo6.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank"> <a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank">
<picture> <picture>
<img alt="Cenário médico complexo" src="docs/images/demo1.png" /> <img alt="Cenário médico complexo" src="../images/demo1.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank"> <a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank">
<picture> <picture>
<img alt="Envio de comandos MQTT" src="docs/images/demo4.png" /> <img alt="Envio de comandos MQTT" src="../images/demo4.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank"> <a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank">
<picture> <picture>
<img alt="Reconhecimento de impressão vocal" src="docs/images/demo14.png" /> <img alt="Reconhecimento de impressão vocal" src="../images/demo14.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -91,35 +91,35 @@ Quer ver os efeitos de uso? Clique nos vídeos abaixo 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank"> <a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank">
<picture> <picture>
<img alt="Controle de interruptores de eletrodomésticos" src="docs/images/demo5.png" /> <img alt="Controle de interruptores de eletrodomésticos" src="../images/demo5.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank"> <a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank">
<picture> <picture>
<img alt="Ponto de acesso MCP" src="docs/images/demo13.png" /> <img alt="Ponto de acesso MCP" src="../images/demo13.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank"> <a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank">
<picture> <picture>
<img alt="Tarefas com múltiplos comandos" src="docs/images/demo11.png" /> <img alt="Tarefas com múltiplos comandos" src="../images/demo11.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank"> <a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank">
<picture> <picture>
<img alt="Reproduzir música" src="docs/images/demo7.png" /> <img alt="Reproduzir música" src="../images/demo7.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank"> <a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank">
<picture> <picture>
<img alt="Plugin de clima" src="docs/images/demo8.png" /> <img alt="Plugin de clima" src="../images/demo8.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -128,35 +128,35 @@ Quer ver os efeitos de uso? Clique nos vídeos abaixo 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank"> <a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank">
<picture> <picture>
<img alt="Interrupção em tempo real" src="docs/images/demo10.png" /> <img alt="Interrupção em tempo real" src="../images/demo10.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank"> <a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank">
<picture> <picture>
<img alt="Fotografar e identificar objetos" src="docs/images/demo12.png" /> <img alt="Fotografar e identificar objetos" src="../images/demo12.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank"> <a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank">
<picture> <picture>
<img alt="Timbre de voz personalizado" src="docs/images/demo2.png" /> <img alt="Timbre de voz personalizado" src="../images/demo2.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank"> <a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank">
<picture> <picture>
<img alt="Comunicação em cantonês" src="docs/images/demo3.png" /> <img alt="Comunicação em cantonês" src="../images/demo3.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank"> <a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank">
<picture> <picture>
<img alt="Transmissão de notícias" src="docs/images/demo0.png" /> <img alt="Transmissão de notícias" src="../images/demo0.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -175,17 +175,17 @@ Quer ver os efeitos de uso? Clique nos vídeos abaixo 🎥
## Documentação de Implantação ## Documentação de Implantação
![Banners](docs/images/banner2.png) ![Banners](../images/banner2.png)
Este projeto oferece dois métodos de implantação. Por favor, escolha de acordo com suas necessidades específicas: Este projeto oferece dois métodos de implantação. Por favor, escolha de acordo com suas necessidades específicas:
#### 🚀 Seleção do Método de Implantação #### 🚀 Seleção do Método de Implantação
| Método de Implantação | Funcionalidades | Cenários Aplicáveis | Documentação de Implantação | Requisitos de Configuração | Tutoriais em Vídeo | | Método de Implantação | Funcionalidades | Cenários Aplicáveis | Documentação de Implantação | Requisitos de Configuração | Tutoriais em Vídeo |
|---------|------|---------|---------|---------|---------| |---------|------|---------|---------|---------|---------|
| **Instalação Simplificada** | Diálogo inteligente, gerenciamento de agente único | Ambientes de baixa configuração, dados armazenados em arquivos de configuração, sem necessidade de banco de dados | [①Versão Docker](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Implantação via Código-Fonte](./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)| 2 núcleos 4GB se usar `FunASR`, 2 núcleos 2GB se todas APIs | - | | **Instalação Simplificada** | Diálogo inteligente, gerenciamento de agente único | Ambientes de baixa configuração, dados armazenados em arquivos de configuração, sem necessidade de banco de dados | [①Versão Docker](../Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Implantação via Código-Fonte](../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)| 2 núcleos 4GB se usar `FunASR`, 2 núcleos 2GB se todas APIs | - |
| **Instalação de Módulo Completo** | Diálogo inteligente, gerenciamento multiusuário, gerenciamento de múltiplos agentes, operação de interface do console inteligente | Experiência com funcionalidade completa, dados armazenados em banco de dados |[①Versão 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) / [②Implantação via Código-Fonte](./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) / [③Tutorial de Atualização Automática via Código-Fonte](./docs/dev-ops-integration.md) | 4 núcleos 8GB se usar `FunASR`, 2 núcleos 4GB se todas APIs| [Tutorial em Vídeo de Inicialização via Código-Fonte Local](https://www.bilibili.com/video/BV1wBJhz4Ewe) | | **Instalação de Módulo Completo** | Diálogo inteligente, gerenciamento multiusuário, gerenciamento de múltiplos agentes, operação de interface do console inteligente | Experiência com funcionalidade completa, dados armazenados em banco de dados |[①Versão Docker](../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) / [②Implantação via Código-Fonte](../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) / [③Tutorial de Atualização Automática via Código-Fonte](../dev-ops-integration.md) | 4 núcleos 8GB se usar `FunASR`, 2 núcleos 4GB se todas APIs| [Tutorial em Vídeo de Inicialização via Código-Fonte Local](https://www.bilibili.com/video/BV1wBJhz4Ewe) |
Perguntas frequentes e tutoriais relacionados podem ser consultados [neste link](./docs/FAQ.md) Perguntas frequentes e tutoriais relacionados podem ser consultados [neste link](../FAQ.md)
> 💡 Nota: Abaixo está uma plataforma de teste implantada com o código mais recente. Você pode gravar e testar se necessário. Usuários simultâneos: 6, os dados serão limpos diariamente. > 💡 Nota: Abaixo está uma plataforma de teste implantada com o código mais recente. Você pode gravar e testar se necessário. Usuários simultâneos: 6, os dados serão limpos diariamente.
@@ -224,7 +224,7 @@ Este projeto fornece as seguintes ferramentas de teste para ajudá-lo a verifica
| Nome da Ferramenta | Localização | Método de Uso | Descrição da Função | | Nome da Ferramenta | Localização | Método de Uso | Descrição da Função |
|:---:|:---|:---:|:---:| |:---:|:---|:---:|:---:|
| Ferramenta de Teste de Interação por Áudio | main》xiaozhi-server》test》test_page.html | Abrir diretamente com Google Chrome | Testa as funções de reprodução e recepção de áudio, verifica se o processamento de áudio no lado Python está normal | | Ferramenta de Teste de Interação por Áudio | main》digital-human》index.html | Execute `python start.py` em `main/digital-human` e depois abra `http://127.0.0.1:8006/index.html` | Testa as funções de reprodução e recepção de áudio, verifica se o processamento de áudio no lado Python está normal |
| Ferramenta de Teste de Resposta de Modelo | main》xiaozhi-server》performance_tester.py | Execute `python performance_tester.py` | Testa a velocidade de resposta dos três módulos principais: ASR(reconhecimento de fala), LLM(modelo de linguagem), VLLM(modelo de visão), TTS(síntese de voz) | | Ferramenta de Teste de Resposta de Modelo | main》xiaozhi-server》performance_tester.py | Execute `python performance_tester.py` | Testa a velocidade de resposta dos três módulos principais: ASR(reconhecimento de fala), LLM(modelo de linguagem), VLLM(modelo de visão), TTS(síntese de voz) |
> 💡 Nota: Ao testar a velocidade dos modelos, apenas os modelos com chaves configuradas serão testados. > 💡 Nota: Ao testar a velocidade dos modelos, apenas os modelos com chaves configuradas serão testados.
@@ -232,7 +232,7 @@ Este projeto fornece as seguintes ferramentas de teste para ajudá-lo a verifica
--- ---
## Lista de Funcionalidades ✨ ## Lista de Funcionalidades ✨
### Implementado ✅ ### Implementado ✅
![请参考-全模块安装架构图](docs/images/deploy2.png) ![请参考-全模块安装架构图](../images/deploy2.png)
| Módulo de Funcionalidade | Descrição | | Módulo de Funcionalidade | Descrição |
|:---:|:---| |:---:|:---|
| Arquitetura Principal | Baseado em [gateway MQTT+UDP](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), servidores WebSocket e HTTP, fornece sistema completo de gerenciamento de console e autenticação | | Arquitetura Principal | Baseado em [gateway MQTT+UDP](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), servidores WebSocket e HTTP, fornece sistema completo de gerenciamento de console e autenticação |
@@ -252,9 +252,9 @@ Este projeto fornece as seguintes ferramentas de teste para ajudá-lo a verifica
### Em Desenvolvimento 🚧 ### Em Desenvolvimento 🚧
Para conhecer o progresso específico do plano de desenvolvimento, [clique aqui](https://github.com/users/xinnan-tech/projects/3). Perguntas frequentes e tutoriais relacionados podem ser consultados [neste link](./docs/FAQ.md) Para conhecer o progresso específico do plano de desenvolvimento, [clique aqui](https://github.com/users/xinnan-tech/projects/3). Perguntas frequentes e tutoriais relacionados podem ser consultados [neste link](../FAQ.md)
Se você é um desenvolvedor de software, aqui está uma [Carta Aberta aos Desenvolvedores](docs/contributor_open_letter.md). Seja bem-vindo a participar! Se você é um desenvolvedor de software, aqui está uma [Carta Aberta aos Desenvolvedores](../contributor_open_letter.md). Seja bem-vindo a participar!
--- ---
@@ -329,7 +329,7 @@ Na verdade, qualquer VLLM que suporte chamadas via interface OpenAI pode ser int
| Tipo | Nome da Plataforma | Método de Uso | Modelo de Preço | Observações | | Tipo | Nome da Plataforma | Método de Uso | Modelo de Preço | Observações |
|:------:|:---------------:|:----:|:---------:|:--:| |:------:|:---------------:|:----:|:---------:|:--:|
| Memória | mem0ai | Chamadas via interface | Cota de 1000 vezes/mês | | | Memória | mem0ai | Chamadas via interface | Cota de 1000 vezes/mês | |
| Memória | [powermem](./docs/powermem-integration.md) | Resumo local | Depende do LLM e BD | OceanBase de código aberto, suporta busca inteligente | | Memória | [powermem](../powermem-integration.md) | Resumo local | Depende do LLM e BD | OceanBase de código aberto, suporta busca inteligente |
| Memória | mem_local_short | Resumo local | Gratuito | | | Memória | mem_local_short | Resumo local | Gratuito | |
| Memória | nomem | Modo sem memória | Gratuito | | | Memória | nomem | Modo sem memória | Gratuito | |
@@ -357,13 +357,13 @@ Na verdade, qualquer VLLM que suporte chamadas via interface OpenAI pode ser int
| Logo | Projeto/Empresa | Descrição | | Logo | Projeto/Empresa | Descrição |
|:---:|:---:|:---| |:---:|:---:|:---|
| <img src="./docs/images/logo_bailing.png" width="160"> | [Robô de Diálogo por Voz Bailing](https://github.com/wwbin2017/bailing) | Este projeto foi inspirado pelo [Robô de Diálogo por Voz Bailing](https://github.com/wwbin2017/bailing) e implementado com base nele | | <img src="../images/logo_bailing.png" width="160"> | [Robô de Diálogo por Voz Bailing](https://github.com/wwbin2017/bailing) | Este projeto foi inspirado pelo [Robô de Diálogo por Voz Bailing](https://github.com/wwbin2017/bailing) e implementado com base nele |
| <img src="./docs/images/logo_tenclass.png" width="160"> | [Tenclass](https://www.tenclass.com/) | Agradecimentos à [Tenclass](https://www.tenclass.com/) por formular protocolos de comunicação padrão, soluções de compatibilidade multidispositivo e demonstrações práticas de cenários de alta concorrência para o ecossistema Xiaozhi; fornecendo suporte completo de documentação técnica para este projeto | | <img src="../images/logo_tenclass.png" width="160"> | [Tenclass](https://www.tenclass.com/) | Agradecimentos à [Tenclass](https://www.tenclass.com/) por formular protocolos de comunicação padrão, soluções de compatibilidade multidispositivo e demonstrações práticas de cenários de alta concorrência para o ecossistema Xiaozhi; fornecendo suporte completo de documentação técnica para este projeto |
| <img src="./docs/images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology (玄凤科技)](https://github.com/Eric0308) | Agradecimentos à [Xuanfeng Technology](https://github.com/Eric0308) por contribuir com o framework de chamada de função, protocolo de comunicação MCP e implementação do mecanismo de chamada baseado em plugins. Através de um sistema padronizado de agendamento de instruções e capacidades de expansão dinâmica, melhora significativamente a eficiência de interação e extensibilidade funcional dos dispositivos de frontend (IoT) | | <img src="../images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology (玄凤科技)](https://github.com/Eric0308) | Agradecimentos à [Xuanfeng Technology](https://github.com/Eric0308) por contribuir com o framework de chamada de função, protocolo de comunicação MCP e implementação do mecanismo de chamada baseado em plugins. Através de um sistema padronizado de agendamento de instruções e capacidades de expansão dinâmica, melhora significativamente a eficiência de interação e extensibilidade funcional dos dispositivos de frontend (IoT) |
| <img src="./docs/images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Agradecimentos a [huangjunsen](https://github.com/huangjunsen0406) por contribuir com o módulo `Console de Controle Inteligente Mobile`, que permite controle eficiente e interação em tempo real em dispositivos móveis, melhorando significativamente a conveniência operacional e a eficiência de gerenciamento do sistema em cenários móveis. | | <img src="../images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Agradecimentos a [huangjunsen](https://github.com/huangjunsen0406) por contribuir com o módulo `Console de Controle Inteligente Mobile`, que permite controle eficiente e interação em tempo real em dispositivos móveis, melhorando significativamente a conveniência operacional e a eficiência de gerenciamento do sistema em cenários móveis. |
| <img src="./docs/images/logo_huiyuan.png" width="160"> | [Huiyuan Design (汇远设计)](http://ui.kwd988.net/) | Agradecimentos à [Huiyuan Design](http://ui.kwd988.net/) por fornecer soluções visuais profissionais para este projeto, utilizando sua experiência prática de design atendendo mais de mil empresas para potencializar a experiência do usuário deste produto | | <img src="../images/logo_huiyuan.png" width="160"> | [Huiyuan Design (汇远设计)](http://ui.kwd988.net/) | Agradecimentos à [Huiyuan Design](http://ui.kwd988.net/) por fornecer soluções visuais profissionais para este projeto, utilizando sua experiência prática de design atendendo mais de mil empresas para potencializar a experiência do usuário deste produto |
| <img src="./docs/images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology (西安勤人信息科技)](https://www.029app.com/) | Agradecimentos à [Xi'an Qinren Information Technology](https://www.029app.com/) por aprofundar o sistema visual deste projeto, garantindo consistência e extensibilidade do estilo de design geral em aplicações de múltiplos cenários | | <img src="../images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology (西安勤人信息科技)](https://www.029app.com/) | Agradecimentos à [Xi'an Qinren Information Technology](https://www.029app.com/) por aprofundar o sistema visual deste projeto, garantindo consistência e extensibilidade do estilo de design geral em aplicações de múltiplos cenários |
| <img src="./docs/images/logo_contributors.png" width="160"> | [Contribuidores de Código](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Agradecimentos a [todos os contribuidores de código](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), seus esforços tornaram o projeto mais robusto e poderoso. | | <img src="../images/logo_contributors.png" width="160"> | [Contribuidores de Código](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Agradecimentos a [todos os contribuidores de código](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), seus esforços tornaram o projeto mais robusto e poderoso. |
<a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date"> <a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date">
+36 -36
View File
@@ -1,4 +1,4 @@
[![Banners](docs/images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server) [![Banners](../images/banner1.png)](https://github.com/xinnan-tech/xiaozhi-esp32-server)
<h1 align="center">Dịch vụ Backend Xiaozhi xiaozhi-esp32-server</h1> <h1 align="center">Dịch vụ Backend Xiaozhi xiaozhi-esp32-server</h1>
@@ -10,14 +10,14 @@ Hỗ trợ giao thức MQTT+UDP, giao thức Websocket, điểm truy cập MCP,
</p> </p>
<p align="center"> <p align="center">
<a href="./docs/FAQ.md">Câu hỏi thường gặp</a> <a href="../FAQ.md">Câu hỏi thường gặp</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Báo cáo vấn đề</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/issues">Báo cáo vấn đề</a>
· <a href="./README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Tài liệu triển khai</a> · <a href="../../README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3">Tài liệu triển khai</a>
· <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Nhật ký cập nhật</a> · <a href="https://github.com/xinnan-tech/xiaozhi-esp32-server/releases">Nhật ký cập nhật</a>
</p> </p>
<p align="center"> <p align="center">
<a href="./README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a> <a href="../../README.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a>
<a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a> <a href="./README_en.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a>
<a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DBEDFA"></a> <a href="./README_vi.md"><img alt="Tiếng Việt" src="https://img.shields.io/badge/Tiếng Việt-DBEDFA"></a>
<a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a> <a href="./README_de.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-DFE0E5"></a>
@@ -38,7 +38,7 @@ Spearheaded by Professor Siyuan Liu's Team (South China University of Technology
</br> </br>
Được dẫn dắt bởi nhóm Giáo sư Lưu Tư Nguyên (Đại học Bách khoa Nam Trung Quốc) Được dẫn dắt bởi nhóm Giáo sư Lưu Tư Nguyên (Đại học Bách khoa Nam Trung Quốc)
</br> </br>
<img src="./docs/images/hnlg.jpg" alt="华南理工大学" width="50%"> <img src="../images/hnlg.jpg" alt="华南理工大学" width="50%">
</p> </p>
--- ---
@@ -54,35 +54,35 @@ Muốn xem hiệu quả sử dụng? Hãy xem video 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank"> <a href="https://www.bilibili.com/video/BV1FMFyejExX" target="_blank">
<picture> <picture>
<img alt="响应速度感受" src="docs/images/demo9.png" /> <img alt="响应速度感受" src="../images/demo9.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank"> <a href="https://www.bilibili.com/video/BV1vchQzaEse" target="_blank">
<picture> <picture>
<img alt="速度优化秘诀" src="docs/images/demo6.png" /> <img alt="速度优化秘诀" src="../images/demo6.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank"> <a href="https://www.bilibili.com/video/BV1C1tCzUEZh" target="_blank">
<picture> <picture>
<img alt="复杂医疗场景" src="docs/images/demo1.png" /> <img alt="复杂医疗场景" src="../images/demo1.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank"> <a href="https://www.bilibili.com/video/BV1zUW5zJEkq" target="_blank">
<picture> <picture>
<img alt="MQTT指令下发" src="docs/images/demo4.png" /> <img alt="MQTT指令下发" src="../images/demo4.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank"> <a href="https://www.bilibili.com/video/BV1Exu3zqEDe" target="_blank">
<picture> <picture>
<img alt="声纹识别" src="docs/images/demo14.png" /> <img alt="声纹识别" src="../images/demo14.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -91,35 +91,35 @@ Muốn xem hiệu quả sử dụng? Hãy xem video 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank"> <a href="https://www.bilibili.com/video/BV1pNXWYGEx1" target="_blank">
<picture> <picture>
<img alt="控制家电开关" src="docs/images/demo5.png" /> <img alt="控制家电开关" src="../images/demo5.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank"> <a href="https://www.bilibili.com/video/BV1ZQKUzYExM" target="_blank">
<picture> <picture>
<img alt="MCP接入点" src="docs/images/demo13.png" /> <img alt="MCP接入点" src="../images/demo13.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank"> <a href="https://www.bilibili.com/video/BV1TJ7WzzEo6" target="_blank">
<picture> <picture>
<img alt="多指令任务" src="docs/images/demo11.png" /> <img alt="多指令任务" src="../images/demo11.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank"> <a href="https://www.bilibili.com/video/BV1VC96Y5EMH" target="_blank">
<picture> <picture>
<img alt="播放音乐" src="docs/images/demo7.png" /> <img alt="播放音乐" src="../images/demo7.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank"> <a href="https://www.bilibili.com/video/BV1Z8XuYZEAS" target="_blank">
<picture> <picture>
<img alt="天气插件" src="docs/images/demo8.png" /> <img alt="天气插件" src="../images/demo8.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -128,35 +128,35 @@ Muốn xem hiệu quả sử dụng? Hãy xem video 🎥
<td> <td>
<a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank"> <a href="https://www.bilibili.com/video/BV12J7WzBEaH" target="_blank">
<picture> <picture>
<img alt="实时打断" src="docs/images/demo10.png" /> <img alt="实时打断" src="../images/demo10.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank"> <a href="https://www.bilibili.com/video/BV1Co76z7EvK" target="_blank">
<picture> <picture>
<img alt="拍照识物品" src="docs/images/demo12.png" /> <img alt="拍照识物品" src="../images/demo12.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank"> <a href="https://www.bilibili.com/video/BV1CDKWemEU6" target="_blank">
<picture> <picture>
<img alt="自定义音色" src="docs/images/demo2.png" /> <img alt="自定义音色" src="../images/demo2.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank"> <a href="https://www.bilibili.com/video/BV12yA2egEaC" target="_blank">
<picture> <picture>
<img alt="使用粤语交流" src="docs/images/demo3.png" /> <img alt="使用粤语交流" src="../images/demo3.png" />
</picture> </picture>
</a> </a>
</td> </td>
<td> <td>
<a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank"> <a href="https://www.bilibili.com/video/BV17LXWYvENb" target="_blank">
<picture> <picture>
<img alt="播报新闻" src="docs/images/demo0.png" /> <img alt="播报新闻" src="../images/demo0.png" />
</picture> </picture>
</a> </a>
</td> </td>
@@ -176,17 +176,17 @@ Khuyến nghị người dùng ưu tiên lựa chọn nhà cung cấp dịch v
## Tài liệu triển khai ## Tài liệu triển khai
![Banners](docs/images/banner2.png) ![Banners](../images/banner2.png)
Dự án này cung cấp hai phương pháp triển khai, vui lòng chọn theo nhu cầu cụ thể của bạn: Dự án này cung cấp hai phương pháp triển khai, vui lòng chọn theo nhu cầu cụ thể của bạn:
#### 🚀 Lựa chọn phương pháp triển khai #### 🚀 Lựa chọn phương pháp triển khai
| Phương pháp triển khai | Đặc điểm | Tình huống áp dụng | Tài liệu triển khai | Yêu cầu cấu hình | Video hướng dẫn | | Phương pháp triển khai | Đặc điểm | Tình huống áp dụng | Tài liệu triển khai | Yêu cầu cấu hình | Video hướng dẫn |
|---------|------|---------|---------|---------|---------| |---------|------|---------|---------|---------|---------|
| **Cài đặt tối giản** | Đối thoại thông minh, quản lý đơn tác nhân | Môi trường cấu hình thấp, dữ liệu lưu trong tệp cấu hình, không cần cơ sở dữ liệu | [①Phiên bản Docker](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Triển khai mã nguồn](./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)| 2 nhân 4GB nếu dùng `FunASR`, 2 nhân 2GB nếu toàn API | - | | **Cài đặt tối giản** | Đối thoại thông minh, quản lý đơn tác nhân | Môi trường cấu hình thấp, dữ liệu lưu trong tệp cấu hình, không cần cơ sở dữ liệu | [①Phiên bản Docker](../Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%8F%AA%E8%BF%90%E8%A1%8Cserver) / [②Triển khai mã nguồn](../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)| 2 nhân 4GB nếu dùng `FunASR`, 2 nhân 2GB nếu toàn API | - |
| **Cài đặt toàn bộ module** | Đối thoại thông minh, quản lý đa người dùng, quản lý đa tác nhân, bảng điều khiển thông minh | Trải nghiệm đầy đủ tính năng, dữ liệu lưu trong cơ sở dữ liệu |[①Phiên bản 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) / [②Triển khai mã nguồn](./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) / [③Hướng dẫn tự động cập nhật triển khai mã nguồn](./docs/dev-ops-integration.md) | 4 nhân 8GB nếu dùng `FunASR`, 2 nhân 4GB nếu toàn API| [Video hướng dẫn khởi động mã nguồn cục bộ](https://www.bilibili.com/video/BV1wBJhz4Ewe) | | **Cài đặt toàn bộ module** | Đối thoại thông minh, quản lý đa người dùng, quản lý đa tác nhân, bảng điều khiển thông minh | Trải nghiệm đầy đủ tính năng, dữ liệu lưu trong cơ sở dữ liệu |[①Phiên bản Docker](../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) / [②Triển khai mã nguồn](../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) / [③Hướng dẫn tự động cập nhật triển khai mã nguồn](../dev-ops-integration.md) | 4 nhân 8GB nếu dùng `FunASR`, 2 nhân 4GB nếu toàn API| [Video hướng dẫn khởi động mã nguồn cục bộ](https://www.bilibili.com/video/BV1wBJhz4Ewe) |
Câu hỏi thường gặp và hướng dẫn liên quan, vui lòng tham khảo [liên kết này](./docs/FAQ.md) Câu hỏi thường gặp và hướng dẫn liên quan, vui lòng tham khảo [liên kết này](../FAQ.md)
> 💡 Gợi ý: Dưới đây là nền tảng thử nghiệm được triển khai theo mã mới nhất, có thể flash để thử nghiệm nếu cần, đồng thời là 6, dữ liệu sẽ được xóa mỗi ngày, > 💡 Gợi ý: Dưới đây là nền tảng thử nghiệm được triển khai theo mã mới nhất, có thể flash để thử nghiệm nếu cần, đồng thời là 6, dữ liệu sẽ được xóa mỗi ngày,
@@ -225,7 +225,7 @@ Dự án này cung cấp các công cụ kiểm tra sau để giúp bạn xác m
| Tên công cụ | Vị trí | Phương pháp sử dụng | Mô tả chức năng | | Tên công cụ | Vị trí | Phương pháp sử dụng | Mô tả chức năng |
|:---:|:---|:---:|:---:| |:---:|:---|:---:|:---:|
| Công cụ kiểm tra tương tác âm thanh | main》xiaozhi-server》test》test_page.html | Mở trực tiếp bằng trình duyệt Google Chrome | Kiểm tra chức năng phát và nhận âm thanh, xác minh xử lý âm thanh phía Python có bình thường không | | Công cụ kiểm tra tương tác âm thanh | main》digital-human》index.html | Chạy `python start.py` trong `main/digital-human`, sau đó mở `http://127.0.0.1:8006/index.html` | Kiểm tra chức năng phát và nhận âm thanh, xác minh xử lý âm thanh phía Python có bình thường không |
| Công cụ kiểm tra phản hồi mô hình | main》xiaozhi-server》performance_tester.py | Thực hiện `python performance_tester.py` | Kiểm tra tốc độ phản hồi của ba module cốt lõi ASR(Nhận dạng giọng nói), LLM(Mô hình lớn), VLLM(Mô hình thị giác), TTS(Tổng hợp giọng nói) | | Công cụ kiểm tra phản hồi mô hình | main》xiaozhi-server》performance_tester.py | Thực hiện `python performance_tester.py` | Kiểm tra tốc độ phản hồi của ba module cốt lõi ASR(Nhận dạng giọng nói), LLM(Mô hình lớn), VLLM(Mô hình thị giác), TTS(Tổng hợp giọng nói) |
> 💡 Gợi ý: Khi kiểm tra tốc độ mô hình, chỉ kiểm tra các mô hình đã cấu hình khóa. > 💡 Gợi ý: Khi kiểm tra tốc độ mô hình, chỉ kiểm tra các mô hình đã cấu hình khóa.
@@ -233,7 +233,7 @@ Dự án này cung cấp các công cụ kiểm tra sau để giúp bạn xác m
--- ---
## Danh sách tính năng ✨ ## Danh sách tính năng ✨
### Đã thực hiện ✅ ### Đã thực hiện ✅
![请参考-全模块安装架构图](docs/images/deploy2.png) ![请参考-全模块安装架构图](../images/deploy2.png)
| Module chức năng | Mô tả | | Module chức năng | Mô tả |
|:---:|:---| |:---:|:---|
| Kiến trúc cốt lõi | Dựa trên [cổng MQTT+UDP](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), WebSocket, máy chủ HTTP, cung cấp hệ thống quản lý bảng điều khiển và xác thực hoàn chỉnh | | Kiến trúc cốt lõi | Dựa trên [cổng MQTT+UDP](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/mqtt-gateway-integration.md), WebSocket, máy chủ HTTP, cung cấp hệ thống quản lý bảng điều khiển và xác thực hoàn chỉnh |
@@ -253,9 +253,9 @@ Dự án này cung cấp các công cụ kiểm tra sau để giúp bạn xác m
### Đang phát triển 🚧 ### Đang phát triển 🚧
Muốn hiểu tiến độ kế hoạch phát triển cụ thể, [vui lòng nhấp vào đây](https://github.com/users/xinnan-tech/projects/3). Câu hỏi thường gặp và hướng dẫn liên quan, vui lòng tham khảo [liên kết này](./docs/FAQ.md) Muốn hiểu tiến độ kế hoạch phát triển cụ thể, [vui lòng nhấp vào đây](https://github.com/users/xinnan-tech/projects/3). Câu hỏi thường gặp và hướng dẫn liên quan, vui lòng tham khảo [liên kết này](../FAQ.md)
Nếu bạn là một nhà phát triển phần mềm, đây có một [Lá thư mở gửi các nhà phát triển](docs/contributor_open_letter.md), chào mừng tham gia! Nếu bạn là một nhà phát triển phần mềm, đây có một [Lá thư mở gửi các nhà phát triển](../contributor_open_letter.md), chào mừng tham gia!
--- ---
@@ -330,7 +330,7 @@ Trên thực tế, bất kỳ VLLM nào hỗ trợ gọi giao diện openai đ
| Loại | Tên nền tảng | Phương pháp sử dụng | Mô hình thu phí | Ghi chú | | Loại | Tên nền tảng | Phương pháp sử dụng | Mô hình thu phí | Ghi chú |
|:------:|:---------------:|:----:|:---------:|:--:| |:------:|:---------------:|:----:|:---------:|:--:|
| Memory | mem0ai | Gọi giao diện | Hạn mức 1000 lần/tháng | | | Memory | mem0ai | Gọi giao diện | Hạn mức 1000 lần/tháng | |
| Memory | [powermem](./docs/powermem-integration.md) | Tóm tắt cục bộ | Phụ thuộc vào LLM và DB | OceanBase mã nguồn mở, hỗ trợ tìm kiếm thông minh | | Memory | [powermem](../powermem-integration.md) | Tóm tắt cục bộ | Phụ thuộc vào LLM và DB | OceanBase mã nguồn mở, hỗ trợ tìm kiếm thông minh |
| Memory | mem_local_short | Tóm tắt cục bộ | Miễn phí | | | Memory | mem_local_short | Tóm tắt cục bộ | Miễn phí | |
| Memory | nomem | Chế độ không có bộ nhớ | Miễn phí | | | Memory | nomem | Chế độ không có bộ nhớ | Miễn phí | |
@@ -358,13 +358,13 @@ Trên thực tế, bất kỳ VLLM nào hỗ trợ gọi giao diện openai đ
| Logo | Dự án/Công ty | Mô tả | | Logo | Dự án/Công ty | Mô tả |
|:---:|:---:|:---| |:---:|:---:|:---|
| <img src="./docs/images/logo_bailing.png" width="160"> | [Robot đối thoại giọng nói Bailing](https://github.com/wwbin2017/bailing) | Dự án này được lấy cảm hứng từ [Robot đối thoại giọng nói Bailing](https://github.com/wwbin2017/bailing) và được triển khai trên cơ sở đó | | <img src="../images/logo_bailing.png" width="160"> | [Robot đối thoại giọng nói Bailing](https://github.com/wwbin2017/bailing) | Dự án này được lấy cảm hứng từ [Robot đối thoại giọng nói Bailing](https://github.com/wwbin2017/bailing) và được triển khai trên cơ sở đó |
| <img src="./docs/images/logo_tenclass.png" width="160"> | [Shifang Ronghai](https://www.tenclass.com/) | Cảm ơn [Shifang Ronghai](https://www.tenclass.com/) đã xây dựng giao thức truyền thông tiêu chuẩn, phương án tương thích đa thiết bị và mô phạm thực hành tình huống đồng thời cao cho hệ sinh thái Xiaozhi; cung cấp tài liệu hỗ trợ kỹ thuật toàn diện cho dự án này | | <img src="../images/logo_tenclass.png" width="160"> | [Shifang Ronghai](https://www.tenclass.com/) | Cảm ơn [Shifang Ronghai](https://www.tenclass.com/) đã xây dựng giao thức truyền thông tiêu chuẩn, phương án tương thích đa thiết bị và mô phạm thực hành tình huống đồng thời cao cho hệ sinh thái Xiaozhi; cung cấp tài liệu hỗ trợ kỹ thuật toàn diện cho dự án này |
| <img src="./docs/images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology](https://github.com/Eric0308) | Cảm ơn [Xuanfeng Technology](https://github.com/Eric0308) đã đóng góp khung gọi hàm, giao thức truyền thông MCP và mã triển khai cơ chế gọi dạng plugin, thông qua hệ thống điều phối lệnh tiêu chuẩn hóa và khả năng mở rộng động, đã cải thiện đáng kể hiệu suất tương tác và khả năng mở rộng chức năng của thiết bị front-end(IoT) | | <img src="../images/logo_xuanfeng.png" width="160"> | [Xuanfeng Technology](https://github.com/Eric0308) | Cảm ơn [Xuanfeng Technology](https://github.com/Eric0308) đã đóng góp khung gọi hàm, giao thức truyền thông MCP và mã triển khai cơ chế gọi dạng plugin, thông qua hệ thống điều phối lệnh tiêu chuẩn hóa và khả năng mở rộng động, đã cải thiện đáng kể hiệu suất tương tác và khả năng mở rộng chức năng của thiết bị front-end(IoT) |
| <img src="./docs/images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Cảm ơn [huangjunsen](https://github.com/huangjunsen0406) đã đóng góp module `Bảng điều khiển thông minh di động`, thực hiện điều khiển hiệu quả và tương tác thời gian thực trên thiết bị di động đa nền tảng, cải thiện đáng kể sự tiện lợi vận hành và hiệu quả quản lý của hệ thống trong tình huống di động | | <img src="../images/logo_junsen.png" width="160"> | [huangjunsen](https://github.com/huangjunsen0406) | Cảm ơn [huangjunsen](https://github.com/huangjunsen0406) đã đóng góp module `Bảng điều khiển thông minh di động`, thực hiện điều khiển hiệu quả và tương tác thời gian thực trên thiết bị di động đa nền tảng, cải thiện đáng kể sự tiện lợi vận hành và hiệu quả quản lý của hệ thống trong tình huống di động |
| <img src="./docs/images/logo_huiyuan.png" width="160"> | [Huiyuan Design](http://ui.kwd988.net/) | Cảm ơn [Huiyuan Design](http://ui.kwd988.net/) đã cung cấp giải pháp thị giác chuyên nghiệp cho dự án này, sử dụng kinh nghiệm thực tế thiết kế phục vụ hơn nghìn doanh nghiệp, trao quyền cho trải nghiệm người dùng sản phẩm của dự án này | | <img src="../images/logo_huiyuan.png" width="160"> | [Huiyuan Design](http://ui.kwd988.net/) | Cảm ơn [Huiyuan Design](http://ui.kwd988.net/) đã cung cấp giải pháp thị giác chuyên nghiệp cho dự án này, sử dụng kinh nghiệm thực tế thiết kế phục vụ hơn nghìn doanh nghiệp, trao quyền cho trải nghiệm người dùng sản phẩm của dự án này |
| <img src="./docs/images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology](https://www.029app.com/) | Cảm ơn [Xi'an Qinren Information Technology](https://www.029app.com/) đã làm sâu sắc hệ thống thị giác của dự án này, đảm bảo tính nhất quán và khả năng mở rộng của phong cách thiết kế tổng thể trong ứng dụng đa tình huống | | <img src="../images/logo_qinren.png" width="160"> | [Xi'an Qinren Information Technology](https://www.029app.com/) | Cảm ơn [Xi'an Qinren Information Technology](https://www.029app.com/) đã làm sâu sắc hệ thống thị giác của dự án này, đảm bảo tính nhất quán và khả năng mở rộng của phong cách thiết kế tổng thể trong ứng dụng đa tình huống |
| <img src="./docs/images/logo_contributors.png" width="160"> | [Người đóng góp mã](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Cảm ơn [tất cả người đóng góp mã](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), sự cống hiến của bạn khiến dự án mạnh mẽ và vững chắc hơn. | | <img src="../images/logo_contributors.png" width="160"> | [Người đóng góp mã](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors) | Cảm ơn [tất cả người đóng góp mã](https://github.com/xinnan-tech/xiaozhi-esp32-server/graphs/contributors), sự cống hiến của bạn khiến dự án mạnh mẽ và vững chắc hơn. |
<a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date"> <a href="https://star-history.com/#xinnan-tech/xiaozhi-esp32-server&Date">
+52 -1
View File
@@ -9,6 +9,7 @@
* [3.2. `manager-api` (管理后端 - Java Spring Boot实现)](#32-manager-api-管理后端---java-spring-boot实现) * [3.2. `manager-api` (管理后端 - Java Spring Boot实现)](#32-manager-api-管理后端---java-spring-boot实现)
* [3.3. `manager-web` (Web管理前端 - Vue.js实现)](#33-manager-web-web管理前端---vuejs实现) * [3.3. `manager-web` (Web管理前端 - Vue.js实现)](#33-manager-web-web管理前端---vuejs实现)
* [3.4. `manager-mobile` (移动管理端 - uni-app+Vue3实现)](#34-manager-mobile-移动管理端---uni-appvue3实现) * [3.4. `manager-mobile` (移动管理端 - uni-app+Vue3实现)](#34-manager-mobile-移动管理端---uni-appvue3实现)
* [3.5. `digital-human` (数字人测试模块 - Python+Web实现)](#35-digital-human-数字人测试模块---pythonweb实现)
4. [数据流与交互机制](#4-数据流与交互机制) 4. [数据流与交互机制](#4-数据流与交互机制)
5. [核心功能概要](#5-核心功能概要) 5. [核心功能概要](#5-核心功能概要)
6. [部署与配置概述](#6-部署与配置概述) 6. [部署与配置概述](#6-部署与配置概述)
@@ -67,6 +68,13 @@
* 基于alova + @alova/adapter-uniapp实现网络请求,与manager-api无缝集成。 * 基于alova + @alova/adapter-uniapp实现网络请求,与manager-api无缝集成。
* 使用pinia进行状态管理,确保数据一致性。 * 使用pinia进行状态管理,确保数据一致性。
6. **`digital-human` (数字人测试模块 - Python+Web实现):**
这是一个独立的数字人测试模块,提供本地测试页面、前端交互资源、唤醒词运行时与事件桥能力,用于联调整个数字人交互链路。其主要能力包括:
* 提供浏览器端的数字人测试页面,用于验证音频播放、接收和交互流程。
* 集成本地唤醒词运行时,支持基于Sherpa-ONNX的关键词检测。
* 通过事件桥将页面状态与本地运行时打通,便于调试唤醒词触发与交互效果。
* 作为独立模块与`xiaozhi-server``manager-web``manager-api`并列,便于单独开发和部署。
**高层交互流程概述:** **高层交互流程概述:**
* **语音交互主线:** **ESP32设备**捕捉到用户语音后,通过**WebSocket**将音频数据实时传输给**`xiaozhi-server`**。`xiaozhi-server`完成一系列AI处理(VAD、ASR、LLM交互、TTS)后,再通过WebSocket将合成的语音回复发送回ESP32设备进行播放。所有与语音直接相关的实时交互均在此链路完成。 * **语音交互主线:** **ESP32设备**捕捉到用户语音后,通过**WebSocket**将音频数据实时传输给**`xiaozhi-server`**。`xiaozhi-server`完成一系列AI处理(VAD、ASR、LLM交互、TTS)后,再通过WebSocket将合成的语音回复发送回ESP32设备进行播放。所有与语音直接相关的实时交互均在此链路完成。
@@ -80,7 +88,8 @@ xiaozhi-esp32-server
├─ xiaozhi-server 8000 端口 Python语言开发 负责与esp32通信 ├─ xiaozhi-server 8000 端口 Python语言开发 负责与esp32通信
├─ manager-web 8001 端口 Node.js+Vue开发 负责提供控制台的web界面 ├─ manager-web 8001 端口 Node.js+Vue开发 负责提供控制台的web界面
├─ manager-api 8002 端口 Java语言开发 负责提供控制台的api ├─ manager-api 8002 端口 Java语言开发 负责提供控制台的api
─ manager-mobile 跨平台移动应用 uni-app+Vue3开发 负责提供移动版智控台管理 ─ manager-mobile 跨平台移动应用 uni-app+Vue3开发 负责提供移动版智控台管理
└─ digital-human 数字人测试模块 Python+Web实现 负责本地测试页面、唤醒词运行时与事件桥
``` ```
--- ---
@@ -366,6 +375,48 @@ xiaozhi-esp32-server
--- ---
### 3.5. `digital-human` (数字人测试模块 - Python+Web实现)
`digital-human` 组件是一个独立的数字人测试模块,负责提供本地测试页面、页面资源、唤醒词运行时和事件桥能力。它主要用于联调整个数字人交互链路,帮助开发者验证页面交互、音频能力和本地唤醒词流程。
* **核心目标:**
* 提供独立的本地测试页面,用于验证数字人交互效果。
* 提供本地唤醒词运行时,支持关键词检测与事件上报。
* 为前端页面和本地运行时提供事件桥,打通测试链路。
* 以独立模块形式存在,便于单独开发、调试和部署。
* **核心技术栈:**
* **Python 3:** 作为测试运行时的主要语言,负责启动本地服务、管理唤醒词运行时和事件桥。
* **原生HTML/CSS/JavaScript:** 用于构建数字人测试页面与交互逻辑。
* **Sherpa-ONNX:** 用于本地唤醒词检测。
* **ThreadingHTTPServer / WebSocket桥接:** 用于承载测试页面、健康检查和本地事件通信。
* **关键实现细节:**
1. **模块入口与页面资源:**
* `start.py` 是模块启动入口,负责初始化测试运行时。
* `index.html` 是数字人测试页面入口。
* `js/``css/``images/``resources/` 目录提供页面脚本、样式和资源文件。
2. **本地测试运行时:**
* `wakeword_runtime/` 目录承载本地唤醒词运行时实现。
* 运行时负责配置加载、日志初始化、音频采集、关键词检测和服务生命周期管理。
* 模块默认通过本地HTTP服务暴露页面地址、事件桥地址和健康检查接口。
3. **唤醒词检测链路:**
* 基于Sherpa-ONNX关键词检测模型,支持本地唤醒词触发。
* 模型文件和关键词配置位于 `wakeword_runtime/models/` 及相应配置文件中。
* 页面侧可结合事件桥观察唤醒词服务状态和触发结果。
4. **调试与联调定位:**
* 启动后可通过浏览器访问本地页面,验证音频播放、接收和交互逻辑。
* 通过事件桥可以将唤醒词状态同步到页面,便于排查本地链路问题。
* 详细的模型下载、运行时配置和使用说明已整理在 `docs/digital-human-wakeword.md` 中。
`digital-human` 的存在使得数字人相关能力可以脱离主服务独立验证,降低了页面调试、唤醒词联调和本地环境搭建的复杂度。
---
## 4. 数据流与交互机制 ## 4. 数据流与交互机制
`xiaozhi-esp32-server` 系统通过各组件间定义清晰的数据流和交互协议来协同工作。主要的通信方式依赖于针对实时交互优化的WebSocket协议和适用于客户端-服务器请求的RESTful API。 `xiaozhi-esp32-server` 系统通过各组件间定义清晰的数据流和交互协议来协同工作。主要的通信方式依赖于针对实时交互优化的WebSocket协议和适用于客户端-服务器请求的RESTful API。
+58 -1
View File
@@ -9,6 +9,7 @@
* [3.2. `manager-api` (Management Backend - Java Spring Boot Implementation)](#32-manager-api-management-backend---java-spring-boot-implementation) * [3.2. `manager-api` (Management Backend - Java Spring Boot Implementation)](#32-manager-api-management-backend---java-spring-boot-implementation)
* [3.3. `manager-web` (Web Management Frontend - Vue.js Implementation)](#33-manager-web-web-management-frontend---vuejs-implementation) * [3.3. `manager-web` (Web Management Frontend - Vue.js Implementation)](#33-manager-web-web-management-frontend---vuejs-implementation)
* [3.4. `manager-mobile` (Mobile Management Console - uni-app Implementation)](#34-manager-mobile-mobile-management-console---uniapp-implementation) * [3.4. `manager-mobile` (Mobile Management Console - uni-app Implementation)](#34-manager-mobile-mobile-management-console---uniapp-implementation)
* [3.5. `digital-human` (Digital Human Test Module - Python+Web Implementation)](#35-digital-human-digital-human-test-module---pythonweb-implementation)
4. [Data Flow and Interaction Mechanisms](#4-data-flow-and-interaction-mechanisms) 4. [Data Flow and Interaction Mechanisms](#4-data-flow-and-interaction-mechanisms)
5. [Key Features Summary](#5-key-features-summary) 5. [Key Features Summary](#5-key-features-summary)
6. [Deployment and Configuration Overview](#6-deployment-and-configuration-overview) 6. [Deployment and Configuration Overview](#6-deployment-and-configuration-overview)
@@ -60,6 +61,21 @@ The `xiaozhi-esp32-server` system adopts a **distributed, multi-component collab
* (Potential functionality) Monitoring system operation status, viewing logs, troubleshooting, etc. * (Potential functionality) Monitoring system operation status, viewing logs, troubleshooting, etc.
* Comprehensive interaction with all backend management functions provided by `manager-api`. * Comprehensive interaction with all backend management functions provided by `manager-api`.
5. **`manager-mobile` (Mobile Management Console - uni-app Implementation):**
This is a cross-platform mobile management application based on uni-app v3 + Vue 3 + Vite, supporting App (Android & iOS) and WeChat Mini Program. Its main capabilities include:
* Providing a convenient management interface on mobile devices, similar in functionality to manager-web but optimized for mobile platforms.
* Supporting core functions such as user login, device management, and AI service configuration.
* Cross-platform adaptation, allowing a single codebase to run on iOS, Android, and WeChat Mini Programs.
* Integrating with `manager-api` through alova + `@alova/adapter-uniapp`.
* Using pinia for state management to ensure data consistency.
6. **`digital-human` (Digital Human Test Module - Python+Web Implementation):**
This is an independent digital human test module that provides a local test page, frontend interaction resources, a wake word runtime, and an event bridge for end-to-end debugging of the digital human interaction flow. Its main capabilities include:
* Providing a browser-based digital human test page for validating audio playback, audio reception, and interaction flow.
* Integrating a local wake word runtime with keyword detection based on Sherpa-ONNX.
* Bridging page state and the local runtime through an event bridge to simplify wake word debugging.
* Existing as a standalone module alongside `xiaozhi-server`, `manager-web`, and `manager-api`, making independent development and deployment easier.
**High-Level Interaction Flow Overview:** **High-Level Interaction Flow Overview:**
* **Voice Interaction Main Line:** After the **ESP32 device** captures user voice, it transmits audio data in real-time to **`xiaozhi-server`** through **WebSocket**. After `xiaozhi-server` completes a series of AI processing (VAD, ASR, LLM interaction, TTS), it sends the synthesized voice response back to the ESP32 device for playback through WebSocket. All real-time interactions directly related to voice are completed in this link. * **Voice Interaction Main Line:** After the **ESP32 device** captures user voice, it transmits audio data in real-time to **`xiaozhi-server`** through **WebSocket**. After `xiaozhi-server` completes a series of AI processing (VAD, ASR, LLM interaction, TTS), it sends the synthesized voice response back to the ESP32 device for playback through WebSocket. All real-time interactions directly related to voice are completed in this link.
@@ -73,7 +89,8 @@ xiaozhi-esp32-server
├─ xiaozhi-server Port 8000 Python development Responsible for ESP32 communication ├─ xiaozhi-server Port 8000 Python development Responsible for ESP32 communication
├─ manager-web Port 8001 Node.js+Vue development Responsible for providing web interface for console ├─ manager-web Port 8001 Node.js+Vue development Responsible for providing web interface for console
├─ manager-api Port 8002 Java development Responsible for providing console API ├─ manager-api Port 8002 Java development Responsible for providing console API
─ manager-mobile Cross-platform mobile application uni-app+Vue3 development Responsible for providing mobile console management ─ manager-mobile Cross-platform mobile application uni-app+Vue3 development Responsible for providing mobile console management
└─ digital-human Digital human test module Python+Web implementation Responsible for local test page, wake word runtime, and event bridge
``` ```
--- ---
@@ -257,6 +274,46 @@ The `manager-mobile` component is a cross-platform mobile management application
`manager-mobile` provides users with a fully functional, smooth mobile management tool through the application of these technologies, allowing administrators to perform system management and configuration anytime, anywhere. `manager-mobile` provides users with a fully functional, smooth mobile management tool through the application of these technologies, allowing administrators to perform system management and configuration anytime, anywhere.
### 3.5. `digital-human` (Digital Human Test Module - Python+Web Implementation)
The `digital-human` component is an independent digital human test module responsible for providing a local test page, page resources, a wake word runtime, and an event bridge. It is primarily used to debug the complete digital human interaction flow and to validate frontend interaction, audio capability, and local wake word behavior.
* **Core Objectives:**
* Provide an independent local test page for validating digital human interaction effects.
* Provide a local wake word runtime for keyword detection and event reporting.
* Provide an event bridge between the frontend page and the local runtime to connect the test flow.
* Exist as a standalone module for easier independent development, debugging, and deployment.
* **Core Technologies:**
* **Python 3:** Used for the local test runtime, service startup, wake word lifecycle management, and event bridge coordination.
* **Native HTML/CSS/JavaScript:** Used to build the digital human test page and interaction logic.
* **Sherpa-ONNX:** Used for local wake word keyword detection.
* **ThreadingHTTPServer / WebSocket bridge:** Used to serve the local page, health check endpoint, and event communication.
* **Key Implementation Aspects:**
1. **Module Entry and Page Resources:**
* `start.py` is the module entry point responsible for starting the local test runtime.
* `index.html` is the entry page for digital human testing.
* The `js/`, `css/`, `images/`, and `resources/` directories provide frontend scripts, styles, and static resources.
2. **Local Test Runtime:**
* The `wakeword_runtime/` directory contains the local wake word runtime implementation.
* The runtime is responsible for configuration loading, logging initialization, audio capture, keyword detection, and lifecycle management.
* The module exposes a local page URL, event bridge URL, and health check endpoint through a local HTTP service.
3. **Wake Word Detection Flow:**
* Uses Sherpa-ONNX keyword detection models to support local wake word triggering.
* Model files and keyword configurations are stored in `wakeword_runtime/models/` and related configuration files.
* The page can observe runtime state and trigger results through the event bridge.
4. **Debugging and Integration Positioning:**
* After startup, developers can open the local page in a browser to validate playback, reception, and interaction logic.
* The event bridge synchronizes wake word state to the page, which helps with local debugging.
* Detailed model download, runtime configuration, and usage instructions are documented in `docs/digital-human-wakeword.md`.
The `digital-human` module allows digital human related capabilities to be validated independently from the main service, reducing the complexity of page debugging, wake word integration, and local environment setup.
--- ---
## 4. Data Flow and Interaction Mechanisms ## 4. Data Flow and Interaction Mechanisms
+46
View File
@@ -0,0 +1,46 @@
本文档是开发类文档,如需部署小智服务端,[点击这里查看部署教程](../../README.md#%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3)
如需查看一体机数字人落地部署、Kiosk 全屏启动和系统环境配置,[点击这里查看一体机部署指南](../../docs/all-in-one-digital-human-setup.md)
如需查看唤醒词模型下载、运行时配置和详细使用说明,[点击这里查看唤醒词专题文档](../../docs/digital-human-wakeword.md)
# 项目介绍
digital-human 是独立的数字人测试模块,负责提供本地测试页面、前端交互资源、唤醒词运行时和事件桥能力,用于联调整个数字人交互链路。
# 快速启动
安装依赖:
```bash
pip install -r wakeword_runtime/requirements.txt
```
启动模块:
```bash
python start.py
```
# 访问地址
启动后可访问:
- 页面地址:http://127.0.0.1:8006/index.html
- 事件桥地址:ws://127.0.0.1:8006/wakeword-ws
- 健康检查:http://127.0.0.1:8006/health
# 目录说明
- `start.py`:模块启动入口
- `index.html`:数字人测试页面入口
- `wakeword_runtime`:本地唤醒词运行时与配置目录
- `js``css`:页面前端脚本与样式
- `images``resources`:页面资源文件
# 相关文档
- 一体机部署指南:适用于 x86 设备整机落地部署、Kiosk 展示和开机自启动配置
[../../docs/all-in-one-digital-human-setup.md](../../docs/all-in-one-digital-human-setup.md)
- 唤醒词专题文档:适用于唤醒词模型下载、运行时配置和本地调试说明
[../../docs/digital-human-wakeword.md](../../docs/digital-human-wakeword.md)

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

@@ -812,6 +812,20 @@ body {
font-size: 14px; font-size: 14px;
} }
.config-item textarea {
width: 100%;
padding: 12px;
border: 1px solid #40444b;
border-radius: 6px;
background: #40444b;
color: white;
min-height: 100px;
resize: vertical;
box-sizing: border-box;
font-family: inherit;
font-size: 14px;
}
.model-select { .model-select {
width: 100%; width: 100%;
padding: 10px 40px 10px 14px; padding: 10px 40px 10px 14px;

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Before

Width:  |  Height:  |  Size: 321 KiB

After

Width:  |  Height:  |  Size: 321 KiB

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 290 KiB

@@ -4,8 +4,8 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>小智服务器测试页面</title> <title>小智数字人页面</title>
<link rel="stylesheet" href="css/test_page.css?v=0205"> <link rel="stylesheet" href="css/index.css?v=0206">
<script> <script>
// 检测是否使用file://协议打开 // 检测是否使用file://协议打开
if (window.location.protocol === 'file:') { if (window.location.protocol === 'file:') {
@@ -21,14 +21,14 @@
warningDiv.innerHTML = ` warningDiv.innerHTML = `
<h2>⚠️ 警告:请使用HTTP服务器打开此页面</h2> <h2>⚠️ 警告:请使用HTTP服务器打开此页面</h2>
<p>您当前使用的是本地文件方式打开页面(file://协议),这可能导致页面功能异常。</p> <p>您当前使用的是本地文件方式打开页面(file://协议),这可能导致页面功能异常。</p>
<p>您可以使用nginx映射启动测试页面,也可以请按照以下步骤使用python启动测试http服务</p> <p>您可以使用nginx映射启动小智数字人页面,也可以请按照以下步骤启动测试运行时</p>
<ol> <ol>
<li>打开命令行终端</li> <li>打开命令行终端</li>
<li>命令行进入到 xiaozhi-server/test 目录</li> <li>命令行进入到 digital-human 目录</li>
<li>执行以下命令启动HTTP服务器</li> <li>执行以下命令启动小智数字人页面运行时</li>
</ol> </ol>
<pre>python -m http.server 8006</pre> <pre>python start.py</pre>
<p>然后在浏览器中访问:<strong>http://localhost:8006/test_page.html</strong></p> <p>然后在浏览器中访问:<strong>http://localhost:8006/index.html</strong></p>
`; `;
document.body.appendChild(warningDiv); document.body.appendChild(warningDiv);
}); });
@@ -137,6 +137,7 @@
<div class="modal-body"> <div class="modal-body">
<div class="settings-tabs"> <div class="settings-tabs">
<button class="tab-btn active" data-tab="device">设备配置</button> <button class="tab-btn active" data-tab="device">设备配置</button>
<button class="tab-btn" data-tab="wakeword">唤醒词</button>
<button class="tab-btn" data-tab="mcp">MCP工具</button> <button class="tab-btn" data-tab="mcp">MCP工具</button>
<button class="tab-btn" data-tab="other">数字人皮肤</button> <button class="tab-btn" data-tab="other">数字人皮肤</button>
</div> </div>
@@ -162,6 +163,15 @@
placeholder="deviceName"> placeholder="deviceName">
</div> </div>
</div> </div>
<div class="config-row">
<div class="config-item">
<label for="emojiEnabled">情绪表情:</label>
<select id="emojiEnabled" class="model-select">
<option value="true">启用</option>
<option value="false" selected>禁用</option>
</select>
</div>
</div>
</div> </div>
</div> </div>
@@ -184,6 +194,37 @@
</div> </div>
</div> </div>
<div class="tab-content" id="wakewordTab">
<div class="config-panel">
<div class="control-panel">
<div class="config-row">
<div class="config-item">
<label for="wakewordEnabled">启用本地唤醒词:</label>
<select id="wakewordEnabled" class="model-select">
<option value="true">启用</option>
<option value="false">禁用</option>
</select>
</div>
</div>
<div class="config-row">
<div class="config-item">
<label for="wakewordWsUrl">唤醒词服务地址:</label>
<input type="text" id="wakewordWsUrl" placeholder="ws://127.0.0.1:8006/wakeword-ws">
</div>
</div>
<div class="config-row">
<div class="config-item">
<label for="wakewordList">唤醒词配置 (一行一个):</label>
<textarea id="wakewordList" placeholder="例如:&#10;小智小智&#10;你好小智"></textarea>
</div>
</div>
<div class="modal-actions">
<button type="button" class="btn-primary" id="applyWakewordBtn">应用唤醒词</button>
</div>
</div>
</div>
</div>
<div class="tab-content" id="mcpTab"> <div class="tab-content" id="mcpTab">
<!-- MCP 工具管理区域 --> <!-- MCP 工具管理区域 -->
<div class="mcp-tools-container"> <div class="mcp-tools-container">
@@ -3,6 +3,7 @@ import { checkOpusLoaded, initOpusEncoder } from './core/audio/opus-codec.js?v=0
import { getAudioPlayer } from './core/audio/player.js?v=0205'; import { getAudioPlayer } from './core/audio/player.js?v=0205';
import { checkMicrophoneAvailability, isHttpNonLocalhost } from './core/audio/recorder.js?v=0205'; import { checkMicrophoneAvailability, isHttpNonLocalhost } from './core/audio/recorder.js?v=0205';
import { initMcpTools } from './core/mcp/tools.js?v=0205'; import { initMcpTools } from './core/mcp/tools.js?v=0205';
import { startWakewordBridgeListener } from './core/network/wakeword-bridge.js?v=0205';
import { uiController } from './ui/controller.js?v=0205'; import { uiController } from './ui/controller.js?v=0205';
import { log } from './utils/logger.js?v=0205'; import { log } from './utils/logger.js?v=0205';
@@ -43,6 +44,8 @@ class App {
await this.audioPlayer.start(); await this.audioPlayer.start();
// 初始化MCP工具 // 初始化MCP工具
initMcpTools(); initMcpTools();
// 初始化本地唤醒事件监听
startWakewordBridgeListener();
// 检查麦克风可用性 // 检查麦克风可用性
await this.checkMicrophoneAvailability(); await this.checkMicrophoneAvailability();
// 检查摄像头可用性 // 检查摄像头可用性
@@ -1,5 +1,8 @@
// 配置管理模块 // 配置管理模块
// 默认唤醒词列表
export const DEFAULT_WAKE_WORDS = '你好小智\n你好小志\n小爱同学\n你好小鑫\n你好小新\n小美同学\n小龙小龙\n喵喵同学\n小滨小滨\n小冰小冰\n嘿你好呀';
// 生成随机MAC地址 // 生成随机MAC地址
function generateRandomMac() { function generateRandomMac() {
const hexDigits = '0123456789ABCDEF'; const hexDigits = '0123456789ABCDEF';
@@ -19,6 +22,9 @@ export function loadConfig() {
const deviceNameInput = document.getElementById('deviceName'); const deviceNameInput = document.getElementById('deviceName');
const clientIdInput = document.getElementById('clientId'); const clientIdInput = document.getElementById('clientId');
const otaUrlInput = document.getElementById('otaUrl'); const otaUrlInput = document.getElementById('otaUrl');
const wakewordWsUrlInput = document.getElementById('wakewordWsUrl');
const wakewordEnabledInput = document.getElementById('wakewordEnabled');
const wakewordListInput = document.getElementById('wakewordList');
// 从localStorage加载MAC地址,如果没有则生成新的 // 从localStorage加载MAC地址,如果没有则生成新的
let savedMac = localStorage.getItem('xz_tester_deviceMac'); let savedMac = localStorage.getItem('xz_tester_deviceMac');
@@ -43,6 +49,29 @@ export function loadConfig() {
if (savedOtaUrl) { if (savedOtaUrl) {
otaUrlInput.value = savedOtaUrl; otaUrlInput.value = savedOtaUrl;
} }
const savedWakewordWsUrl = localStorage.getItem('xz_tester_wakewordWsUrl');
if (savedWakewordWsUrl !== null && wakewordWsUrlInput) {
wakewordWsUrlInput.value = savedWakewordWsUrl;
}
const savedWakewordEnabled = localStorage.getItem('xz_tester_wakewordEnabled');
if (savedWakewordEnabled !== null && wakewordEnabledInput) {
wakewordEnabledInput.value = savedWakewordEnabled;
}
const savedWakewordList = localStorage.getItem('xz_tester_wakewordList');
if (savedWakewordList !== null && wakewordListInput) {
wakewordListInput.value = savedWakewordList;
} else if (wakewordListInput) {
wakewordListInput.value = DEFAULT_WAKE_WORDS;
}
const emojiEnabledInput = document.getElementById('emojiEnabled');
const savedEmojiEnabled = localStorage.getItem('xz_tester_emojiEnabled');
if (savedEmojiEnabled !== null && emojiEnabledInput) {
emojiEnabledInput.value = savedEmojiEnabled;
}
} }
// 保存配置 // 保存配置
@@ -50,10 +79,26 @@ export function saveConfig() {
const deviceMacInput = document.getElementById('deviceMac'); const deviceMacInput = document.getElementById('deviceMac');
const deviceNameInput = document.getElementById('deviceName'); const deviceNameInput = document.getElementById('deviceName');
const clientIdInput = document.getElementById('clientId'); const clientIdInput = document.getElementById('clientId');
const wakewordWsUrlInput = document.getElementById('wakewordWsUrl');
const wakewordEnabledInput = document.getElementById('wakewordEnabled');
const wakewordListInput = document.getElementById('wakewordList');
localStorage.setItem('xz_tester_deviceMac', deviceMacInput.value); localStorage.setItem('xz_tester_deviceMac', deviceMacInput.value);
localStorage.setItem('xz_tester_deviceName', deviceNameInput.value); localStorage.setItem('xz_tester_deviceName', deviceNameInput.value);
localStorage.setItem('xz_tester_clientId', clientIdInput.value); localStorage.setItem('xz_tester_clientId', clientIdInput.value);
const emojiEnabledInput = document.getElementById('emojiEnabled');
if (emojiEnabledInput) {
localStorage.setItem('xz_tester_emojiEnabled', emojiEnabledInput.value);
}
if (wakewordEnabledInput) {
localStorage.setItem('xz_tester_wakewordEnabled', wakewordEnabledInput.value);
}
if (wakewordListInput) {
localStorage.setItem('xz_tester_wakewordList', wakewordListInput.value);
}
if (wakewordWsUrlInput && wakewordWsUrlInput.value.trim()) {
localStorage.setItem('xz_tester_wakewordWsUrl', wakewordWsUrlInput.value.trim());
}
} }
// 获取配置值 // 获取配置值
@@ -62,12 +107,14 @@ export function getConfig() {
const deviceMac = document.getElementById('deviceMac')?.value.trim() || ''; const deviceMac = document.getElementById('deviceMac')?.value.trim() || '';
const deviceName = document.getElementById('deviceName')?.value.trim() || ''; const deviceName = document.getElementById('deviceName')?.value.trim() || '';
const clientId = document.getElementById('clientId')?.value.trim() || ''; const clientId = document.getElementById('clientId')?.value.trim() || '';
const emojiEnabled = document.getElementById('emojiEnabled')?.value !== 'false';
return { return {
deviceId: deviceMac, // 使用MAC地址作为deviceId deviceId: deviceMac, // 使用MAC地址作为deviceId
deviceName, deviceName,
deviceMac, deviceMac,
clientId clientId,
emojiEnabled
}; };
} }
@@ -203,17 +203,6 @@ export class AudioRecorder {
async start() { async start() {
if (this.isRecording) return false; if (this.isRecording) return false;
try { try {
// Check if WebSocketHandler instance exists
const { getWebSocketHandler } = await import('../network/websocket.js?v=0205');
const wsHandler = getWebSocketHandler();
// If machine is speaking, send abort message
if (wsHandler && wsHandler.isRemoteSpeaking && wsHandler.currentSessionId) {
const abortMessage = { session_id: wsHandler.currentSessionId, type: 'abort', reason: 'wake_word_detected' };
if (this.websocket && this.websocket.readyState === WebSocket.OPEN) {
this.websocket.send(JSON.stringify(abortMessage));
log('已发送中止消息', 'info');
}
}
if (!this.initEncoder()) { if (!this.initEncoder()) {
log('无法开始录音: Opus编码器初始化失败', 'error'); log('无法开始录音: Opus编码器初始化失败', 'error');
return false; return false;
@@ -0,0 +1,225 @@
import { uiController } from '../../ui/controller.js?v=0205';
import { log } from '../../utils/logger.js?v=0205';
let wakewordSocket = null;
let reconnectTimer = null;
let reconnectAttempts = 0;
let shouldReconnect = true;
let wakewordRequestSeq = 0;
let onNextBridgeConnectedCallback = null;
const pendingWakewordRequests = new Map();
export function startWakewordBridgeListener() {
if (wakewordSocket) {
return wakewordSocket;
}
shouldReconnect = true;
log('正在连接本地唤醒事件桥...', 'info');
tryConnect();
return wakewordSocket;
}
function tryConnect() {
const bridgeUrl = buildWakewordBridgeUrl();
try {
wakewordSocket = new WebSocket(bridgeUrl);
wakewordSocket.onopen = () => {
reconnectAttempts = 0;
log(`本地唤醒事件桥已连接: ${bridgeUrl}`, 'success');
// 连接成功后自动保存地址,刷新后仍能记住
localStorage.setItem('xz_tester_wakewordWsUrl', bridgeUrl);
const urlInput = document.getElementById('wakewordWsUrl');
if (urlInput) urlInput.value = bridgeUrl;
};
wakewordSocket.onerror = () => {
log(`本地唤醒事件桥连接失败: ${bridgeUrl}`, 'error');
};
wakewordSocket.onmessage = async (event) => {
try {
const message = parseWakewordBridgeMessage(event.data);
if (message.requestId && pendingWakewordRequests.has(message.requestId)) {
settleWakewordRequest(message);
return;
}
if (message.success === false) {
log(`本地唤醒事件桥返回错误: ${message.error || '未知错误'}`, 'error');
return;
}
if (message.type === 'bridge_connected') {
log('本地唤醒监听已就绪', 'info');
if (onNextBridgeConnectedCallback) {
const cb = onNextBridgeConnectedCallback;
onNextBridgeConnectedCallback = null;
cb(message);
}
return;
}
if (message.type === 'service_ready') {
log('本地唤醒服务已启动', 'info');
return;
}
if (message.type === 'wakeword_config') {
uiController.applyWakewordConfig(message.payload || {});
log('已同步本地唤醒词配置', 'info');
return;
}
if (message.type === 'service_stopping') {
log('本地唤醒服务正在停止', 'warning');
return;
}
if (message.type === 'wake_word_detected') {
const wakeWord = message.payload?.wake_word || '唤醒词';
log(`检测到本地唤醒事件: ${wakeWord}`, 'info');
await uiController.triggerWakewordDial(wakeWord);
}
} catch (error) {
log(`解析本地唤醒事件失败: ${error.message}`, 'error');
}
};
wakewordSocket.onclose = () => {
if (wakewordSocket) {
wakewordSocket = null;
}
rejectAllWakewordRequests('本地唤醒事件桥已断开');
if (!shouldReconnect) {
return;
}
if (reconnectTimer) {
return;
}
reconnectAttempts += 1;
const delay = Math.min(1000 * reconnectAttempts, 5000);
log(`本地唤醒事件桥将在 ${delay}ms 后重连: ${bridgeUrl}`, 'warning');
reconnectTimer = window.setTimeout(() => {
reconnectTimer = null;
tryConnect();
}, delay);
};
return wakewordSocket;
} catch (error) {
log(`启动本地唤醒监听失败: ${error.message}`, 'error');
return null;
}
}
export function stopWakewordBridgeListener() {
shouldReconnect = false;
if (reconnectTimer) {
window.clearTimeout(reconnectTimer);
reconnectTimer = null;
}
if (!wakewordSocket) {
return;
}
wakewordSocket.onclose = null;
wakewordSocket.close();
wakewordSocket = null;
}
export function sendWakewordBridgeMessage(type, payload = {}, requestId = null) {
if (!wakewordSocket || wakewordSocket.readyState !== WebSocket.OPEN) {
log('本地唤醒事件桥未连接,无法发送消息', 'warning');
return false;
}
wakewordSocket.send(JSON.stringify({
type,
requestId,
payload,
}));
return true;
}
export function requestWakewordBridge(type, payload = {}, timeout = 5000) {
const requestId = `wakeword-${Date.now()}-${++wakewordRequestSeq}`;
return new Promise((resolve, reject) => {
const timer = window.setTimeout(() => {
pendingWakewordRequests.delete(requestId);
reject(new Error('本地唤醒服务响应超时'));
}, timeout);
pendingWakewordRequests.set(requestId, { resolve, reject, timer });
if (!sendWakewordBridgeMessage(type, payload, requestId)) {
window.clearTimeout(timer);
pendingWakewordRequests.delete(requestId);
reject(new Error('本地唤醒事件桥未连接'));
}
});
}
export function getWakewordBridgeUrl() {
if (wakewordSocket && wakewordSocket.url) {
return wakewordSocket.url;
}
return buildWakewordBridgeUrl();
}
export function onNextBridgeConnected(callback) {
onNextBridgeConnectedCallback = callback;
}
function buildWakewordBridgeUrl() {
const configured = localStorage.getItem('xz_tester_wakewordWsUrl');
if (configured && configured.trim()) {
return configured.trim();
}
return 'ws://127.0.0.1:8006/wakeword-ws';
}
function parseWakewordBridgeMessage(rawData) {
const message = JSON.parse(rawData);
return {
type: message.type || '',
requestId: message.requestId || null,
success: message.success !== false,
payload: message.payload || {},
error: message.error || null,
};
}
function settleWakewordRequest(message) {
const pendingRequest = pendingWakewordRequests.get(message.requestId);
if (!pendingRequest) {
return;
}
window.clearTimeout(pendingRequest.timer);
pendingWakewordRequests.delete(message.requestId);
if (message.success === false) {
pendingRequest.reject(new Error(message.error || '本地唤醒服务返回失败'));
return;
}
pendingRequest.resolve(message);
}
function rejectAllWakewordRequests(errorMessage) {
pendingWakewordRequests.forEach((pendingRequest) => {
window.clearTimeout(pendingRequest.timer);
pendingRequest.reject(new Error(errorMessage));
});
pendingWakewordRequests.clear();
}
@@ -34,7 +34,8 @@ export class WebSocketHandler {
device_mac: config.deviceMac, device_mac: config.deviceMac,
token: config.token, token: config.token,
features: { features: {
mcp: true mcp: true,
emoji: config.emojiEnabled
} }
}; };
@@ -70,6 +71,28 @@ export class WebSocketHandler {
} }
} }
_sendWakeupMessages(sessionId) {
if (!this.websocket || this.websocket.readyState !== WebSocket.OPEN) return;
// listen detect
this.websocket.send(JSON.stringify({
session_id: sessionId,
type: 'listen',
state: 'detect',
text: '嘿,你好呀'
}));
log('发送listen detect消息,唤醒词: 嘿,你好呀', 'info');
// listen start:开始监听
this.websocket.send(JSON.stringify({
session_id: sessionId,
type: 'listen',
state: 'start',
mode: 'auto'
}));
log('发送listen start消息', 'info');
}
// 处理文本消息 // 处理文本消息
handleTextMessage(message) { handleTextMessage(message) {
if (message.type === 'hello') { if (message.type === 'hello') {
@@ -77,6 +100,9 @@ export class WebSocketHandler {
window.cameraAvailable = true; window.cameraAvailable = true;
log('连接成功,摄像头已可用', 'success'); log('连接成功,摄像头已可用', 'success');
uiController.updateDialButton(true); uiController.updateDialButton(true);
this._sendWakeupMessages(message.session_id);
uiController.startAIChatSession(); uiController.startAIChatSession();
} else if (message.type === 'tts') { } else if (message.type === 'tts') {
this.handleTTSMessage(message); this.handleTTSMessage(message);
@@ -2,7 +2,9 @@
import { loadConfig, saveConfig } from '../config/manager.js?v=0205'; import { loadConfig, saveConfig } from '../config/manager.js?v=0205';
import { getAudioPlayer } from '../core/audio/player.js?v=0205'; import { getAudioPlayer } from '../core/audio/player.js?v=0205';
import { getAudioRecorder } from '../core/audio/recorder.js?v=0205'; import { getAudioRecorder } from '../core/audio/recorder.js?v=0205';
import { requestWakewordBridge, stopWakewordBridgeListener, startWakewordBridgeListener, getWakewordBridgeUrl, onNextBridgeConnected } from '../core/network/wakeword-bridge.js?v=0205';
import { getWebSocketHandler } from '../core/network/websocket.js?v=0205'; import { getWebSocketHandler } from '../core/network/websocket.js?v=0205';
import { log } from '../utils/logger.js?v=0205';
// UI controller class // UI controller class
class UIController { class UIController {
@@ -14,6 +16,8 @@ class UIController {
this.currentBackgroundIndex = localStorage.getItem('backgroundIndex') ? parseInt(localStorage.getItem('backgroundIndex')) : 0; this.currentBackgroundIndex = localStorage.getItem('backgroundIndex') ? parseInt(localStorage.getItem('backgroundIndex')) : 0;
this.backgroundImages = ['1.png', '2.png', '3.png']; this.backgroundImages = ['1.png', '2.png', '3.png'];
this.dialBtnDisabled = false; this.dialBtnDisabled = false;
this.isConnecting = false;
this.lastWakewordDialTime = 0;
// Bind methods // Bind methods
this.init = this.init.bind(this); this.init = this.init.bind(this);
@@ -25,6 +29,9 @@ class UIController {
this.showModal = this.showModal.bind(this); this.showModal = this.showModal.bind(this);
this.hideModal = this.hideModal.bind(this); this.hideModal = this.hideModal.bind(this);
this.switchTab = this.switchTab.bind(this); this.switchTab = this.switchTab.bind(this);
this.applyWakewordConfig = this.applyWakewordConfig.bind(this);
this.handleApplyWakeword = this.handleApplyWakeword.bind(this);
this.triggerWakewordDial = this.triggerWakewordDial.bind(this);
} }
// Initialize // Initialize
@@ -262,6 +269,11 @@ class UIController {
}); });
}); });
const applyWakewordBtn = document.getElementById('applyWakewordBtn');
if (applyWakewordBtn) {
applyWakewordBtn.addEventListener('click', this.handleApplyWakeword);
}
// 点击模态框背景关闭(仅对特定模态框禁用此功能) // 点击模态框背景关闭(仅对特定模态框禁用此功能)
const modals = document.querySelectorAll('.modal'); const modals = document.querySelectorAll('.modal');
modals.forEach(modal => { modals.forEach(modal => {
@@ -512,6 +524,121 @@ class UIController {
} }
} }
applyWakewordConfig(config = {}) {
const wakewordEnabledInput = document.getElementById('wakewordEnabled');
const wakewordListInput = document.getElementById('wakewordList');
if (!wakewordEnabledInput || !wakewordListInput) {
return;
}
const wakeWords = Array.isArray(config.wakeWords)
? config.wakeWords.filter(item => typeof item === 'string' && item.trim())
: [];
wakewordEnabledInput.value = config.enabled === false ? 'false' : 'true';
wakewordListInput.value = wakeWords.join('\n');
saveConfig();
}
async handleApplyWakeword() {
const wakewordEnabledInput = document.getElementById('wakewordEnabled');
const wakewordListInput = document.getElementById('wakewordList');
const wakewordWsUrlInput = document.getElementById('wakewordWsUrl');
if (!wakewordEnabledInput || !wakewordListInput) {
return;
}
const wakeWords = wakewordListInput.value
.split(/\r?\n/u)
.map(item => item.trim())
.filter(Boolean)
.filter((item, index, items) => items.indexOf(item) === index);
const payload = {
enabled: wakewordEnabledInput.value !== 'false',
wakeWords,
};
if (payload.enabled && payload.wakeWords.length === 0) {
this.addChatMessage('启用唤醒词时,至少需要填写一个唤醒词。', false);
return;
}
const applyWakewordBtn = document.getElementById('applyWakewordBtn');
if (applyWakewordBtn) {
applyWakewordBtn.disabled = true;
applyWakewordBtn.textContent = '应用中...';
}
try {
// 保存地址到 localStorage
if (wakewordWsUrlInput && wakewordWsUrlInput.value.trim()) {
localStorage.setItem('xz_tester_wakewordWsUrl', wakewordWsUrlInput.value.trim());
}
// 比较新地址和当前连接地址
const newWsUrl = localStorage.getItem('xz_tester_wakewordWsUrl');
const currentWsUrl = getWakewordBridgeUrl();
const urlChanged = newWsUrl !== currentWsUrl;
if (urlChanged) {
// 地址变了,先确认
const shouldRestart = window.confirm('地址已变更,是否继续?(将断开旧连接并重新连接)');
if (!shouldRestart) {
// 恢复 localStorage 里的旧地址
localStorage.setItem('xz_tester_wakewordWsUrl', currentWsUrl);
this.addChatMessage('已取消地址变更。', false);
return;
}
// 断开旧连接
stopWakewordBridgeListener();
// 启动新连接(自动用新地址)
startWakewordBridgeListener();
// 等 bridge_connected
await new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
reject(new Error('连接新服务器超时'));
}, 5000);
onNextBridgeConnected(() => {
clearTimeout(timeout);
resolve();
});
});
// 发配置和重启
await requestWakewordBridge('set_wakeword_config', payload);
this.applyWakewordConfig(payload);
await requestWakewordBridge('restart_wakeword_service');
this.addChatMessage('唤醒词配置已保存,唤醒词服务正在重启。', false);
} else {
// 地址没变:直接在当前连接操作
const response = await requestWakewordBridge('set_wakeword_config', payload);
this.applyWakewordConfig(response.payload || payload);
const shouldRestart = window.confirm('唤醒词已保存。是否现在重启唤醒词服务以立即生效?');
if (!shouldRestart) {
this.addChatMessage('唤醒词配置已保存,可稍后手动重启服务后生效。', false);
return;
}
await requestWakewordBridge('restart_wakeword_service');
this.addChatMessage('唤醒词配置已保存,唤醒词服务正在重启。', false);
}
} catch (error) {
this.addChatMessage(`应用唤醒词失败: ${error.message}`, false);
} finally {
if (applyWakewordBtn) {
applyWakewordBtn.disabled = false;
applyWakewordBtn.textContent = '应用唤醒词';
}
}
}
// Start AI chat session after connection // Start AI chat session after connection
startAIChatSession() { startAIChatSession() {
this.addChatMessage('连接成功,开始聊天吧~😊', false); this.addChatMessage('连接成功,开始聊天吧~😊', false);
@@ -550,47 +677,51 @@ class UIController {
// Handle connect button click // Handle connect button click
async handleConnect() { async handleConnect() {
console.log('handleConnect called'); const wsHandler = getWebSocketHandler();
if (this.isConnecting || (wsHandler && wsHandler.isConnected())) {
// Switch to device settings tab log('连接已存在或正在进行,忽略本次拨号请求', 'info');
this.switchTab('device');
// Wait for DOM update
await new Promise(resolve => setTimeout(resolve, 50));
const otaUrlInput = document.getElementById('otaUrl');
console.log('otaUrl element:', otaUrlInput);
if (!otaUrlInput || !otaUrlInput.value) {
this.addChatMessage('请输入OTA服务器地址', false);
return; return;
} }
const otaUrl = otaUrlInput.value; this.isConnecting = true;
console.log('otaUrl value:', otaUrl); console.log('handleConnect called');
// Update dial button state to connecting
const dialBtn = document.getElementById('dialBtn');
if (dialBtn) {
dialBtn.classList.add('dial-active');
dialBtn.querySelector('.btn-text').textContent = '连接中...';
dialBtn.disabled = true;
}
// Show connecting message
this.addChatMessage('正在连接服务器...', false);
const chatIpt = document.getElementById('chatIpt');
if (chatIpt) {
chatIpt.style.display = 'flex';
}
try { try {
// Switch to device settings tab
this.switchTab('device');
// Wait for DOM update
await new Promise(resolve => setTimeout(resolve, 50));
const otaUrlInput = document.getElementById('otaUrl');
console.log('otaUrl element:', otaUrlInput);
if (!otaUrlInput || !otaUrlInput.value) {
this.addChatMessage('请输入OTA服务器地址', false);
return;
}
const otaUrl = otaUrlInput.value;
console.log('otaUrl value:', otaUrl);
// Update dial button state to connecting
const dialBtn = document.getElementById('dialBtn');
if (dialBtn) {
dialBtn.classList.add('dial-active');
dialBtn.querySelector('.btn-text').textContent = '连接中...';
dialBtn.disabled = true;
}
// Show connecting message
this.addChatMessage('正在连接服务器...', false);
const chatIpt = document.getElementById('chatIpt');
if (chatIpt) {
chatIpt.style.display = 'flex';
}
// Get WebSocket handler instance // Get WebSocket handler instance
const wsHandler = getWebSocketHandler();
// Register connection state callback BEFORE connecting // Register connection state callback BEFORE connecting
wsHandler.onConnectionStateChange = (isConnected) => { wsHandler.onConnectionStateChange = (isConnected) => {
this.updateConnectionUI(isConnected); this.updateConnectionUI(isConnected);
@@ -670,9 +801,36 @@ class UIController {
dialBtn.classList.remove('dial-active'); dialBtn.classList.remove('dial-active');
console.log('Dial button state restored successfully'); console.log('Dial button state restored successfully');
} }
} finally {
this.isConnecting = false;
} }
} }
async triggerWakewordDial(wakeWord = '唤醒词') {
const wsHandler = getWebSocketHandler();
const now = Date.now();
if (wsHandler && wsHandler.isConnected()) {
log('页面已连接,忽略自动拨号', 'info');
return false;
}
if (this.isConnecting || this.dialBtnDisabled) {
log('页面正在连接中,忽略重复唤醒', 'info');
return false;
}
if (now - this.lastWakewordDialTime < 3000) {
log('唤醒触发过于频繁,忽略本次自动拨号', 'warning');
return false;
}
this.lastWakewordDialTime = now;
this.addChatMessage(`检测到唤醒词“${wakeWord}”,准备连接服务器...`, false);
await this.handleConnect();
return true;
}
// Add MCP tool // Add MCP tool
addMCPTool() { addMCPTool() {
const mcpToolsList = document.getElementById('mcpToolsList'); const mcpToolsList = document.getElementById('mcpToolsList');
+55
View File
@@ -0,0 +1,55 @@
import threading
from pathlib import Path
from wakeword_runtime.config import load_config, setup_logging
from wakeword_runtime.runtime import TestRuntimeApplication, TestRuntimeHttpServer
def main() -> int:
test_root = Path(__file__).resolve().parent
runtime_root = test_root / "wakeword_runtime"
config = load_config(runtime_root)
setup_logging(config.log_file, config.log_level)
http_server = TestRuntimeHttpServer(test_root)
app_lock = threading.RLock()
app = TestRuntimeApplication(config, http_server.event_bridge)
def restart_runtime() -> None:
nonlocal app
with app_lock:
app.shutdown()
next_config = load_config(runtime_root)
setup_logging(next_config.log_file, next_config.log_level)
next_app = TestRuntimeApplication(next_config, http_server.event_bridge)
next_app.setup()
next_app.start()
app = next_app
http_server.set_restart_handler(restart_runtime)
print(f"test runtime started: {http_server.page_url}")
print(f"wakeword bridge websocket: {http_server.bridge_url}")
print(f"wakeword enabled: {config.wakeword_enabled}")
print("press Ctrl+C to stop")
try:
with app_lock:
try:
app.setup()
app.start()
except Exception as e:
print(f"警告: 唤醒词服务启动失败({e}),测试页面仍可正常使用")
http_server.serve_forever()
except KeyboardInterrupt:
print("test runtime stopped")
finally:
with app_lock:
app.shutdown()
http_server.shutdown()
return 0
if __name__ == "__main__":
raise SystemExit(main())
@@ -0,0 +1 @@
"""Test-side wakeword runtime package."""
@@ -0,0 +1 @@
from .event_bridge import WakewordEventBridge
@@ -0,0 +1,106 @@
import json
import logging
import queue
import threading
import time
from typing import Any
logger = logging.getLogger(__name__)
class WakewordEventBridge:
def __init__(self) -> None:
self._clients: list[queue.Queue[str]] = []
self._clients_lock = threading.Lock()
self._running = True
@property
def is_running(self) -> bool:
return self._running
def build_ready_message(self) -> str:
return self.build_message(
"bridge_connected",
{"status": "ready"},
)
def publish_detected(self, wake_word: str) -> None:
self.publish(
"wake_word_detected",
{
"wake_word": wake_word,
"timestamp": time.time(),
},
)
def publish(self, event_type: str, payload: dict[str, Any] | None = None) -> None:
if not self._running:
return
message = self.build_message(event_type, payload or {})
with self._clients_lock:
clients = list(self._clients)
stale_clients: list[queue.Queue[str]] = []
for client_queue in clients:
try:
client_queue.put_nowait(message)
except queue.Full:
stale_clients.append(client_queue)
if stale_clients:
with self._clients_lock:
for client_queue in stale_clients:
if client_queue in self._clients:
self._clients.remove(client_queue)
def add_client(self) -> queue.Queue[str]:
client_queue: queue.Queue[str] = queue.Queue(maxsize=16)
with self._clients_lock:
self._clients.append(client_queue)
return client_queue
def build_message(
self,
event_type: str,
payload: dict[str, Any] | None = None,
request_id: str | None = None,
success: bool = True,
error: str | None = None,
) -> str:
message: dict[str, Any] = {
"type": event_type,
"requestId": request_id,
"success": success,
"payload": payload or {},
}
if error:
message["error"] = error
return json.dumps(message, ensure_ascii=False)
def remove_client(self, client_queue: queue.Queue[str]) -> None:
with self._clients_lock:
if client_queue in self._clients:
self._clients.remove(client_queue)
def publish_service_ready(self) -> None:
self.publish("service_ready", {"status": "ready"})
def publish_service_stopping(self) -> None:
self.publish("service_stopping", {"status": "stopping"})
def close(self) -> None:
if not self._running:
return
self.publish_service_stopping()
self._running = False
with self._clients_lock:
clients = list(self._clients)
self._clients.clear()
for client_queue in clients:
try:
client_queue.put_nowait("__bridge_closed__")
except queue.Full:
pass

Some files were not shown because too many files have changed in this diff Show More