@zhangbo-cn/dsh-client-ui-voice-input: Adding Composer Voice Input and Reply Read-Aloud to DeepSeek Harness Web

Preface

The plugin mechanism of DeepSeek Harness allows client-side capabilities to be integrated into the Web UI. For users who primarily compose messages in the composer, features like speech-to-draft, push-to-talk, and assistant reply read-aloud offer an alternative interaction method to pure keyboard input. Below is an introduction to @zhangbo-cn/dsh-client-ui-voice-input, which is maintained by Zhangbo-cn, released under the MIT license, and primarily targets the composer area of DeepSeek Harness Web.

What This Is

This plugin adds a linear mic button to the composer toolbar. It does three things: transcribes spoken content into the draft word by word; supports press-and-hold to record and release to send; and reads assistant replies aloud under certain conditions.

Recognition runs via the browser’s Web Speech API and requires no API key. Reply read-aloud prioritizes the host Edge TTS /api/tts endpoint, with the browser’s speechSynthesis as a fallback.

Core Capabilities

Tap to Listen

  1. Tap the mic to start listening; the icon turns DeepSeek blue and pulses.
  2. While speaking, recognized text is appended to the draft word by word; the mic remains active during silence.
  3. You can send the message anytime using the composer’s send button or continue adding more speech.
  4. Tap the mic again to stop listening.

When silence ends, the recognition session automatically restarts to maintain listening across gaps. The documentation describes each segment’s continuous: false as an intentional choice to avoid the issue where continuous: true does not return onresult in some browsers.

Relationship with the Composer

Voice results are appended to the current draft rather than overwriting existing content. After sending, the draft is cleared; if listening continues, it resumes on a new recognizer without repopulating old voice text into the input field.

Push-to-Talk

Press and hold the mic for approximately 250 ms or more and start speaking; releasing sends the message. After sending, if the mic was used within the last 5 minutes, the next assistant reply will be read aloud; sending via pure typing without recent mic usage does not trigger reply read-aloud.

Optional Auto-Send

With autoSendOnSilenceMs configured, the message is sent automatically once silence lasts that duration. The default value is 0, meaning disabled.

Reply Read-Aloud

Assistant replies are queued for read-aloud by complete sentences during model generation; the final incomplete sentence is read when generation ends.

Recognition is paused during read-aloud to avoid speaker echo; once read-aloud finishes, recognition resumes if it was active. Tapping the mic stops the read-aloud.

Installation and Enablement

First, run the install command:

dsh plugin add @zhangbo-cn/dsh-client-ui-voice-input

This command installs the plugin by its npm package name. After refreshing the Web UI, the mic button appears in the composer toolbar and is ready to use.

Note that version 0.1.1+ is required. 0.1.0 registered the browser bundle under an incorrect ModuleLoader id, causing Harness to report loaded without registering "@zhangbo-cn/dsh-client-ui-voice-input". If you are on 0.1.0, upgrade or reinstall first, then hard-refresh the Web UI.

Mounting from a DeepSeek Harness Checkout

If you are developing from a DeepSeek Harness checkout rather than installing the npm package directly, you can mount this package in the web-app browser roster:

- id: ui-voice-input
  name: '@zhangbo-cn/dsh-client-ui-voice-input'

To route reply read-aloud through the more reliable host Edge TTS path, also mount:

- id: tts-edge
  name: '@deepseek-ai/dsh-tts-edge'

This mount registers the /api/tts endpoint. Without it, reply read-aloud can still use the browser’s speechSynthesis, but the documentation notes its quality is inferior to host Edge neural voices.

After the mounting steps above, build the client bundle from the repository:

pnpm --filter @zhangbo-cn/dsh-client-ui-voice-input run bundle

Typical Configuration

Recognition language, streaming interim results, and the auto-send silence window can be set in the plugin configuration:

- id: ui-voice-input
  name: '@zhangbo-cn/dsh-client-ui-voice-input'
  config:
    language: 'zh-CN'
    interimResults: true
    autoSendOnSilenceMs: 0

Default values are: language is zh-CN, interimResults is true, and autoSendOnSilenceMs is 0 (disabled).

Use Cases and Notes

This plugin is suitable for scenarios where voice input, push-to-talk sending, or automatic assistant reply read-aloud are desired in the DeepSeek Harness Web composer. Since recognition runs in the client browser, it depends on browser support for the Web Speech API.

Firefox mic input is not supported — this is a browser limitation, not a plugin issue; the plugin feature-detects and disables the mic with a notice. Reply playback still works via /api/tts or speechSynthesis.

The fetched documentation’s package.json shows some peerDependencies, including @deepseek-ai/cordis ^4.0.1, plus release candidate version requirements for @deepseek-ai/dsh-client-locale and @deepseek-ai/dsh-client-runtime; the documentation is truncated at the end, so the complete dependencies should be referenced from the repository’s package.json.

Before installation, it is recommended to review the source code and the MIT license. This plugin runs with the current dsh process permissions, so ensure the source is trustworthy before installing.

Related Pages

Community directory: https://www.skillhub.cn/plugins/Zhangbo-cn/dsh-voice-input-plugin
GitHub: https://github.com/Zhangbo-cn/dsh-voice-input-plugin

羽毛球分组比赛记分
小程序二维码

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

Xiaoye