dsh-watch-phone: Enabling DSH Calls from Smartwatches via HTTP Bridge

Introduction

The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin”—developers can mount various capabilities into a running DSH process. For scenarios where you need to converse with a DSH agent on mobile devices, especially small-screen devices like smartwatches, existing approaches often require keyboard input or rely on cloud services, making them neither natural nor lightweight.

dsh-watch-phone provides a local HTTP bridge solution: by installing a plugin on DSH and a bundled APK on your smartwatch, you can press-and-hold to talk on the watch or phone. Audio is transcribed on the DSH host, processed by the DSH agent, and then returned as speech via local TTS. The entire process never touches the cloud, requires no keyboard typing on the watch, and is well-suited to the interaction patterns of a 240dp round screen.

Plugin Overview

  • Plugin name: dsh-watch-phone
  • Maintainer: CC2027MK2
  • Category: Client
  • Version: 0.1.9
  • License: MIT

This plugin connects DSH agent capabilities to smartwatches and Android phones, enabling a “press-and-hold to talk” conversational experience through an HTTP bridge. It ships with a bundled watch APK and supports offline speech-to-text and local speech synthesis.

Core Features

1. Press-and-Hold to Talk Flow

On a smartwatch or phone, long-press the green pill-shaped button to start speaking. Upon release, the audio is sent to the DSH host:

  1. Audio is transcribed locally on the DSH host via ctx.get('speechToText')
  2. The transcribed text appears in DSH’s text box, allowing manual correction of recognition errors
  3. After sending, a real DSH session is initiated (session ID defaults to watch-voice), using the configured presets, persona, and model
  4. The reply text is played back as speech via local TTS

The entire process bypasses the cloud; only the client itself has zero network round-trips.

2. Single APK for Multiple Devices

The same APK supports both smartwatches (two-row layout at 320dp width) and regular phones (single-row layout), so no separate builds are needed for different devices. The APK is available via the plugin’s /watch/app.apk endpoint.

3. Local Voice Processing

  • Speech-to-text (STT): Requires a speechToText service in DSH, such as the official @deepseek-ai/dsh-experimental-speech-to-text-sensevoice bundle. If the service is missing, /stt returns 503, and the watch will display “Didn’t catch that, try again.”
  • Text-to-speech (TTS): Supports Xiaomi MiMo’s sk-... key (default: https://api.xiaomimimo.com/v1), and also supports other hosts providing a /tts endpoint via the proxyBase configuration.

4. Auto-Discovery and Configuration

The client automatically discovers the bridge address on the local network using the following priority order:

  1. The address saved in settings
  2. The list of recently successful addresses (rolling 8 entries)
  3. UDP broadcast probe (port 38403, sends dsh-watch?)
  4. mDNS / DNS-SD (publishes _dsh-watch._tcp.local)
  5. Scanning the local /24 subnet on port 38402
  6. The documented default address (last resort)

Once an address is discovered, it is verified via GET /health to avoid using stale addresses.

5. HTTP API

The plugin exposes the following set of HTTP endpoints:

  • GET /health: Returns service status and platform information
  • POST /chat: Sends text, enters a DSH session to get a reply
  • POST /stt: Receives audio (multipart audio or raw WAV), returns transcribed text
  • POST /tts: Receives text, returns WAV audio
  • POST /reset: Clears the current session conversation
  • GET /log: Views logs (optional ?lines=80)

Installation and Enablement

Install the Plugin

Install via the plugin command in DSH:

dsh plugin --profile <your-profile> add dsh-watch-phone

After installation, the plugin starts an HTTP bridge, listening on port 38402 by default.

Install the Smartwatch App

Fetch the bundled APK from the bridge and install it:

curl -O http://<host>:38402/watch/app.apk
adb install -r app.apk
adb shell pm grant com.dsh.watchchat android.permission.RECORD_AUDIO

<host> is the DSH host’s address, which can be entered via the client UI or discovered automatically.

Build the APK Yourself

If you need to modify the UI, you can build it yourself:

cd watch-app
echo "sdk.dir=/path/to/Android/Sdk" > local.properties
./gradlew assembleRelease
adb install -r app/build/outputs/apk/release/app-release.apk

Configuration

Add the following keys to the plugin’s cordis.patch.yml configuration file:

  • port: HTTP listening port, default 38402. When token is configured, binds to 0.0.0.0; otherwise, binds to 127.0.0.1 only.
  • discoveryPort: UDP broadcast probe port, default 38403.
  • token: Bearer token used to protect all routes except /health, /log, and /watch/app.apk. Auto-generated on first startup and written to the log and <home>/.dsh/watch-phone/token.
  • sessionId: DSH session ID, default watch-voice.
  • cwd: Session working directory, default process.cwd().
  • allowExec: Whether to enable POST /exec (host shell), default false.
  • allowRelay: Whether to enable POST /relay (raw TCP relay), default false.
  • proxyBase: Fallback host for /stt and /tts, e.g., http://192.0.2.10:38401.
  • logFile: Bridge log path, default <home>/.dsh/watch-phone/bridge.log.
  • tts.apiKey: MiMo API key. If omitted, the plugin reads the local-voice plugin’s settings.
  • tts.baseURL: MiMo endpoint, default https://api.xiaomimimo.com/v1.
  • tts.model: TTS model, default mimo-v2.5-tts; also supports mimo-v2.5-tts-voicedesign.
  • tts.voice: Voice ID, default BingTang (i.e., “Ice Sugar”).
  • tts.instruction: Style instruction sent to the TTS, default empty string.

Example configuration:

- id: watch-phone
  name: dsh-watch-phone
  config:
    port: 38402
    sessionId: watch-voice
    tts:
      apiKey: sk-...
      voice: 冰糖

First-Time Pairing Flow

On first run, the bridge listens only on 127.0.0.1. You need to manually configure the token to access it over the LAN:

  1. Start the plugin and find the generated token in the log (line 1 of <home>/.dsh/watch-phone/bridge.log).
  2. Fill the token into the token field in the configuration and restart the plugin; the bridge will then bind to 0.0.0.0.
  3. On the watch, tap the status line, enter the pairing code, and save.

You can also pair over USB via adb forward tcp:38402 tcp:38402, without exposing the bridge to Wi-Fi.

Use Cases and Considerations

  • Suited for users who need to converse with a DSH agent on a smartwatch or small-screen device, especially those who prefer voice interaction over keyboard input.
  • Ensure your DSH version is between 0.2.1-rc.2 and 0.3.0 (tested on 0.2.2-rc.1).
  • Local STT requires the speechToText service to be included at build time.
  • Local TTS defaults to MiMo, but you can configure other server endpoints via proxyBase.
  • The plugin runs with the permissions of the current DSH process. Review the source code and license before installation.
  • allowExec and allowRelay are disabled by default. Enable them only if you clearly understand their purpose.

Value Summary

dsh-watch-phone extends DSH agent capabilities to smartwatches and Android phones. Through a local HTTP bridge and offline voice processing, it provides a keyboard-free, cloud-independent press-and-hold-to-talk conversational experience. For developers or users who need to interact with DSH on mobile devices, this is a practical client plugin.

  • Plugin directory page: https://www.skillhub.cn/plugins/CC2027MK2/dsh-watch-phone
  • GitHub repository: https://github.com/CC2027MK2/dsh-watch-phone
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye