OH2P Speaker MCP
Integrates with Xiaomi OH2P smart speakers over Wi-Fi/SSH to enable custom TTS announcements and control the native Xiaomi music library, including requesting songs, pausing, and resuming playback.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OH2P Speaker MCPmake an announcement that it's time for dinner"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Xiaomi OH2P 音箱:刷机、连接 AI 与 MCP
把 Xiaomi 智能音箱 Pro(OH2P)作为 AI 的实体声音出口:通过家庭 Wi-Fi 播报,自定义 TTS 音色,调用原厂曲库点歌、暂停、继续。另附本地唤醒、语音识别与音乐干扰处理的实现说明。
本仓库单独维护,因为音箱涉及固件和音频链路,与普通米家灯/风扇接入不同。摄像头和一般家电见 米家 HomeMCP 教程。
按顺序做
核验固件与分区,再刷写。已经能 SSH 的音箱跳过刷机。
flowchart LR
P[Orbis / 其他 MCP 客户端] -->|私网 HTTPS + Bearer| M[常开 Linux 主机]
M -->|SSH / PCM 播放 / 原生曲库指令| S[OH2P 音箱]
S -->|四通道收音:进阶路线| A[本地 AEC + 关键词唤醒]
A --> L[本地短指令识别]
L --> H[Home Assistant 有限设备动作]Related MCP server: ESP32-C3 MCP Music Server
已验证与适用边界
实机是 OH2P、1.62.2,保留原厂小爱功能。这里没有测过所有小爱机型,不要按中文商品名推定兼容。
刷写后通过 Wi-Fi SSH 读取完整镜像长度,哈希与候选一致;原厂另一系统槽位保留。未做破坏性回滚演练。
原曲库点歌、暂停/继续、Orbis 发现并调用工具已真人通过。歌曲实际受账号/版权限制,测试曲有约 60 秒返回,不能承诺解锁完整版。
自定义唤醒和自然说法控制家电、大音量播放时唤醒、断电搬回原位后回应已真人通过;长期歌词误唤醒率尚未完成系统测量。
2026-10-31 已恢复一次监听器因启动次数限制而停住的故障,并再次通过真人唤醒验收。现补充 30 秒重连配置与恢复步骤,供已有监听器部署采用。
本仓库可运行示例是 MCP 播报和音乐入口,加 AEC 模块。第 4 篇解释实际语音服务怎么组装,不包含现有家庭的完整常驻监听器、个性化回复表或手机绑定文件,不是“一条命令复制整套私人助手”。通用版全自动语音安装器仍未提供。
公开示例经过隔离测试,尚未在另一只全新音箱上重复刷机和从零复装。
文件
src/server.py:speaker_say、speaker_music两项 MCP 工具。src/music_control.py:原生曲库、状态核验、失败不自动重放。src/speaker_voice.py:TTS → 本地解码 → SSH 播放。src/speaker_aec.py:四通道输入的 SpeexDSP 回声抵消,无云端音频。examples/:SSH、私有配置模板和 systemd 单元。tests/:离线逻辑/合成 DSP 回归,不会操作实体音箱。
来源和许可
刷机基础来自 Open-XiaoAI,构建材料和授权以其仓库为准。本仓库不打包厂商固件、USB 驱动、第三方模型或私人密钥。原创文档和示例使用 MIT,第三方项目各有自己的许可证。
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Audio for your agent: transcribe, speak, translate, summarise, plus sound effects and music.
Create, inspect, and manage Wubble music, speech, voice, and sound-effect requests through MCP.
Control your internet radio from any AI client: listeners, stream, playlists, AutoDJ, DJs, store.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI assistants to control Spotify playback, search for music, manage playlists, and interact with your Spotify library through natural language commands.19-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to control an ESP32-C3 audio client via MQTT for playing, pausing, and managing music from an HTTP library, with support for playlists and volume control.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover, manage, and stream audio to LAN speakers supporting DLNA, AirPlay, and MiPlay, with playback of URLs, local files, and real-time PCM.3MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to control and interact with Spotify playback, manage playlists, search for music, and retrieve user listening data through natural language.3256 npmMIT