Introduction¶
Running agents in DeepSeek Harness (DSH) typically involves desktop or web interfaces: typing or using a microphone to start a session, with replies displayed on the screen. If you already have a Xiaoai Smart Speaker flashed with the open-xiaoai client at home, a more natural interaction is to stand by the device, say a wake word, and listen to the conclusion read aloud, rather than walking up to the computer every time.
The community plugin dsh-xiaoai-bridge (Maintainer: OMSociety, GitHub Repo: OMSociety/dsh-xiaoai-bridge) connects this link into DSH: the local bridge handles wake-up, audio capture, recognition, and playback, while the plugin handles sessions, announcement discipline, and process hosting. The following describes what it is, what it can do, and the steps to install and try it out based on the official README.
What is This¶
dsh-xiaoai-bridge is a client type plugin for DSH (current version 1.0.0, MIT License). In one sentence: it connects a Xiaoai Smart Speaker to DeepSeek Harness—upon hearing the wake word, recognized text enters the DSH session as a user message, and session replies are polished and played from the speaker; the model can also actively trigger the speaker via tools.
The repository is split into two halves: the root directory contains the DSH Plugin written in Node (lib/), responsible for the settings page, status card, bridge subprocess hosting, authentication, and packaged presets; bridge/ is the Python Bridge, responsible for device-side TCP audio, VAD, wake word, speech recognition, synthesis, and playback gating. The bridge source is based on coderzc/open-xiaoai-bridge; this repository connects the DSH backend on top of it and evolves independently.
Plugin directory page: SkillHub — OMSociety/dsh-xiaoai-bridge.
Core Features¶
Wake to Chat¶
The wake word is recognized locally by the bridge using sherpa-onnx; upon detection, it captures a sentence, waits for VAD endpointing, performs ASR, and POSTs the text to the plugin route /plugin/xiaoai/asr (bearer authentication, fail-closed). The plugin injects the text into the DSH session bound to that speaker (creating one if it doesn’t exist), and the reply body is automatically colloquialized and played. It supports one sentence per wake or enables “Continuous Conversation” until silence timeout or an exit word.
Announcement Discipline¶
When to speak and what to read is determined by plugin-layer rules, not random model output:
- Speaker-initiated conversations: Reads the reply body by default; if
xiaoai_speakwas called in this turn, it will not read the reply body again. - Other sessions: Default is silent; you can enable “Allow any session to let Xiaoai speak” to allow desktop/web sessions to drive the speaker.
- Tool Approval: When a tool card is pending approval, only a fixed prompt is announced; the approval content is not read aloud.
- Half-duplex Prevention: During playback, the playback gate closes the microphone to avoid self-interruption.
Proactive Speaking: xiaoai_speak¶
| Tool | Purpose | Key Parameters |
|---|---|---|
xiaoai_speak |
Make the speaker read a piece of text | text (required), read verbatim |
This takes effect only once per turn; text should not contain Markdown, code blocks, or URLs. If the bridge is not running, and “Start bridge with plugin” is enabled, it will attempt to launch and wait (up to ~12 seconds).
Process, Status, and Data¶
- The plugin launches the bridge as a subprocess, restarts it using a sliding window upon crash, and stops the subprocess upon exiting DSH.
- The settings page status card displays process, API, token, preset, and recent error codes; logs are prefixed with
dsh-xiaoai-bridge:. - Sentences actually played to the speaker are appended to
spoken.jsonl, which can be retained upon uninstallation. - Packaged Xiaoai Mode Agent preset (
cordis.patch.yml), designed for speaker sessions: capable of running commands, reading/writing files, looking up information, and managing todos; excludes sub-agents and plan mode. The default preset name in settings isxiaoai.
Ports and Routes (For Troubleshooting)¶
| Port/Prefix | Function |
|---|---|
4399 |
Rust extension dsh_xiaoai_server Audio TCP; speakers dial to this address (default with URL token) |
127.0.0.1:9092 |
Bridge HTTP API (Announcement, Health Check) |
/plugin/xiaoai/* |
Routes mounted by the plugin on the host webServer (e.g., /plugin/xiaoai/asr, /plugin/xiaoai/bridge/start, etc.) |
Installation and Activation¶
Prerequisites¶
| Requirement | Version / Description |
|---|---|
| DSH | 0.2.0-rc.1 or newer |
| Node | 20 or newer |
| pnpm | For installing plugin dependencies |
| Python | 3.12 |
| uv | For bridge virtual environment and dependencies; compiles Rust extensions on first run (takes about ten minutes) |
| Rust Toolchain | uv sync compiles PyO3 extensions via maturin |
| Xiaoai Smart Speaker | Flashed and patched with the open-xiaoai client (see upstream docs) |
Steps¶
1. Install the plugin and restart DSH
First stop any running DSH, then execute (replace <profile> with your profile):
dsh plugin --profile <profile> add "dsh-xiaoai-bridge"
Restarting DSH is required after installation. The plugin package includes the bridge/ source code but does not include the bridge virtual environment or voice model packages; these must be completed locally and the “Bridge Directory” in the settings page must be pointed to that path.
2. Prepare the bridge Python environment
Navigate to the plugin’s bridge/ directory (path depends on your local plugin installation location) and execute:
uv sync --no-install-project
uv sync
.\.venv\Scripts\python.exe -c "import dsh_xiaoai_server; print('ok')"
On Linux/macOS, change the last line to the python within the corresponding virtual environment. uv sync needs to be rerun only if bridge/native/**/*.rs is modified; the bridge should be stopped before rerunning.
3. Download and place model packages
Approximately 470 MB; not distributed with the repo. Must be manually extracted to bridge/core/models/:
| Item | Value |
|---|---|
| Download | https://github.com/coderzc/open-xiaoai-bridge/releases/download/vad-kws-asr-models/models.zip |
| sha256 | 8E8A709D6EA011F644F3C5055F536D5E6EB363EEAFBA53CC3232398FD636D273 |
4. Speaker and Settings Page
The device side belongs to the open-xiaoai upstream: see flash.md and client-rust README for flashing and client patches. On the speaker, /data/open-xiaoai/server.txt should point to ws://<LAN IP of the computer running the bridge>:4399?token=<Access Token> (consistent with “Speaker Connection Auth” in the settings page; if auth is disabled, any host on the same network can inject audio, so weigh the risks yourself).
Confirm in the DSH plugin settings page: Enable Plugin, Speaker Name, Speaker IP, Session Workspace; select “Start bridge with plugin” and “Xiaoai Mode” preset as needed. Saving certain configurations triggers a hot reload of the bridge config file; items written to the subprocess environment variables (like log level, API listening, credentials) require a bridge restart to take effect.
5. Verification
Say the wake word to the speaker and then speak; if the link is working normally, the DSH session will receive the recognized text, and the reply will play from the speaker.
Typical Usage¶
Voice Q&A (Default Path)¶
No explicit tool call from the model is needed: Wake → Speak → Wait for VAD end → Plugin creates or reuses speaker session → Reply body is automatically polished and played.
Proactive Agent Announcement¶
When you need to read out passphrases, verification codes, task completions, or reminders verbatim, call it in the agent’s available tools:
xiaoai_speak(text="The meeting starts in five minutes.")
If you want desktop sessions to drive the speaker as well, enable “Allow any session to let Xiaoai speak” in the settings page.
Operations and Diagnostics¶
- View bridge process and recent error codes on the settings page status card.
- If environment variable-based configurations need changing, restart the bridge via the settings page or API, e.g.,
POST /plugin/xiaoai/bridge/restart. - Common issues when the bridge is not running, the address is wrong, or the token is missing include no response from the speaker or 401 in bridge logs; the README “Troubleshooting” section lists the meanings of diagnostic codes.
Use Cases and Notes¶
Who it’s for: Those already running agents on DSH 0.2.0-rc.1+ and willing to maintain the speaker device following the open-xiaoai procedure; those who want to merge voice input/output into the same Harness session and workspace using wake words.
Permissions & Security: The plugin and bridge run with the current DSH process. What the agent can do in the speaker session (reading files, running commands, etc.) is subject to the presets and DSH permissions configured for that session. Before installation, read the repository source code, LICENSE (MIT), and DISCLAIMER.md: This project is not official to Xiaomi, and flashing/patching involves device and account risks; /asr uses bearer gating, returning 503 without a token and 401 for an incorrect token.
Ecosystem Note: DSH adopts “Everything is a Plugin”; SkillHub is a community directory and has no official affiliation with DeepSeek / High-Flyer. This article introduces a community-maintained client plugin, not an official app store entry.
Conclusion¶
dsh-xiaoai-bridge connects the wake-up and playback of open-xiaoai speakers to DSH sessions, using the plugin to manage lifecycles and broadcast rules, and the local bridge to manage the voice link. If you want to add a “say a word, hear the answer” entry to your existing Harness workflow, follow the steps above to install the plugin, complete the bridge/ environment and models, and align the speaker address and authentication in the settings page.
- Directory Page: https://www.skillhub.cn/plugins/OMSociety/dsh-xiaoai-bridge
- Source Code and Full Configuration Documentation: https://github.com/OMSociety/dsh-xiaoai-bridge