2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill xiaoai-bridge- _meta.json283 B
- SKILL.md8.9 KB
Overview
This skill bridges Xiaomi Xiaoai speaker voice messages to an AI assistant, enabling voice control and TTS replies. It captures cloud-recognized speech, filters by trigger prefix, deduplicates messages, and sends parsed commands to your assistant. The skill runs continuously and supports multiple Xiaomi IoT speaker models.
How this skill works
The listener polls the Xiaomi cloud for new voice-to-text messages, applying an optional trigger prefix filter to avoid false activations. Matching messages are normalized (trigger removed) and emitted as JSON events with timestamp metadata. Your integration processes the text and can call the skill back to speak responses via the speaker's TTS API. A deduplication layer tracks timestamps to prevent reprocessing of the same voice event.
When to use it
- Add voice control to an existing AI assistant or home automation system
- Relay natural voice commands from Xiaomi Xiaoai speakers to a custom processing pipeline
- Use TTS replies for spoken confirmations or multi-step voice workflows
- Deploy as a lightweight bridge when you need continuous background listening
- Filter out ambient speech and only react to explicit wake/trigger phrases
Best practices
- Use MI_PASS_TOKEN instead of plain password to avoid extra verification steps
- Set TRIGGER_PREFIX to a short, distinct word to reduce false positives
- Keep POLL_INTERVAL at 1000–2000 ms for a balance of responsiveness and API load
- Track and store last processed timestamp to implement reliable message deduplication
- Split long replies into shorter TTS segments for clearer playback and fewer dropouts
Example use cases
- Control OpenClaw assistant via a Xiaomi speaker: speak a command and receive a spoken AI response
- Trigger smart home scenes by voice: say the trigger phrase to run lighting, climate, or automation routines
- Execute voice tasks like timers, reminders, or quick info queries routed to your backend
- Operate multiple Xiaoai devices across a home, selecting device by MI_DEVICE_ID for localized TTS
- Integrate with Node.js workflows: spawn the listener process and parse JSON lines for downstream handling
FAQ
Provide MI_USER_ID and either MI_PASS_TOKEN (recommended) or MI_PASSWORD. passToken is more stable and avoids verification prompts.
How does trigger filtering work?
Set TRIGGER_PREFIX (default "请"). Incoming messages missing the prefix are ignored; matched messages have the prefix removed in the text field.
How do I avoid processing the same message twice?
The listener includes timestamps. Persist the latest handled timestamp and ignore messages with older or equal timestamps; the skill also performs internal deduplication.