GitHub – yihong0618/xiaogpt: Play ChatGPT and other LLM with Xiaomi AI Speaker

2个月前发布 46 00

Play ChatGPT and other LLM with Xiaomi AI Speaker. Contribute to yihong0618/xiaogpt development by creating an account on GitHub.

所在地:
中国
语言:
zh
收录时间:
2025-10-06
其他站点:
GitHub – yihong0618/xiaogpt: Play ChatGPT and other LLM with Xiaomi AI SpeakerGitHub – yihong0618/xiaogpt: Play ChatGPT and other LLM with Xiaomi AI Speaker

这个开源项目名为xiaogpt,核心功能是将小米AI音箱(小爱同学)与ChatGPT、New Bing、ChatGLM、Gemini等多种大语言模型(LLM)连接,让用户通过小爱音箱直接调用LLM的智能对话能力。

1. 核心定位
项目旨在打破小米音箱原生功能限制,通过技术手段将小爱同学与主流LLM结合,用户只需通过音箱唤醒词(如“小爱同学”)发起请求,即可获得LLM生成的回答,实现“语音交互+智能大脑”的全新体验。

2. 支持的大语言模型
覆盖当前主流LLM,包括但不限于:
ChatGPT(需OpenAI API密钥)、New Bing
国内模型:ChatGLM(智谱AI)、通义千问(阿里)、Doubao(豆包)、01(零一万物)
海外模型:Gemini(Google)、Moonshot( moonshot kimi)、Llama3(Groq)

3. 使用准备与操作流程
(1)获取小米音箱DID(设备ID)
安装依赖:`pip install miservice_fork`
设置环境变量:通过`export MI_USER=小米账户`、`export MI_PASS=小米密码`(Windows用`set`,PowerShell用`$env`)配置账户信息
运行`micli list`获取音箱DID,再通过`export MI_DID=设备ID`设置环境变量

(2)启动与交互
安装项目:`pip install U forcereinstall xiaogpt[locked]`
基础命令:`xiaogpt hardware 音箱型号(如LX06) use_chatgpt_api`(需提前配置OpenAI API密钥)
关键参数:
`mute_xiaoai`:静音小爱自身的回答,仅播放LLM结果
`stream`:开启流式响应,加快对话速度
`tts edge`:切换为微软Edge TTS,提升语音质量
`config 配置文件路径`:通过yaml/json文件统一配置参数(优先级:命令行>默认>配置文件)

4. 特色功能
持续对话:说“开始持续对话”进入连续交互状态,无需重复唤醒;说“结束持续对话”退出。
自定义提示词:通过`prompt`参数设置LLM的回答风格(如“请用100字以内回答”),或通过“更改提示词”关键词动态调整。
多TTS支持:除小米原生TTS外,还支持edge、openai、azure、fish(鱼声)等第三方语音服务,用户可根据喜好选择。
Docker部署:提供X86/ARM镜像(`yihong0618/xiaogpt`),通过Docker快速启动,避免环境配置问题(如`docker run e OPENAI_API_KEY=密钥 yihong0618/xiaogpt hardware LX06`)。

5. 注意事项
需开启小爱音箱的蓝牙功能;
部分型号(如LX04、X10A、L05B/C)需添加`use_command`参数,否则小爱可能无法播放LLM结果;
海外地区用户若无法登录小米账户,可通过抓包获取`cookie`(或复制本地`.mi.token`文件到服务器)实现登录;
WSL环境下需设置代理(如`http://WSL_IP:端口`),避免连接超时。

6. 其他资源
视频教程:提供YouTube分步指导(https://www.youtube.com/watch?v=K4YA8YwzOOA);
QA解答:针对“登录失败”“连接超时”等常见问题,项目README中有详细解决方案;
贡献与反馈:欢迎提交PR或Issue参与项目改进,社区活跃且开放。

该项目通过简单配置即可让小米音箱“升级”为智能对话终端,适合希望拓展小爱功能、体验LLM语音交互的用户。

相关导航

GitHub – Rudrabha/Wav2Lip: This repository contains the codes of “A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild”, published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs

GitHub – Rudrabha/Wav2Lip: This repository contains the codes of “A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild”, published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs

This repository contains the codes of "A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild", published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs - GitHub - Rudrabha/Wav2Lip: This repository contains the codes of "A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild", published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs

暂无评论

您必须登录才能参与评论!
立即登录
none
暂无评论...