Preface

DSH’s philosophy is “everything is a plugin”. Typing long sentences or mixed Chinese-English content in a web input box is inconvenient; if speech-to-text relies on other services, extra consideration is needed for service access. Below introduces tangbut1/dsh-plugin-voice-input: adds a “Hold to Speak” microphone button next to the DSH web input box; after releasing the button, it performs local offline recognition and appends the result to the current draft.

What is this

dsh-plugin-voice-input is the DeepSeek Harness Web voice input plugin, maintained by tangbut1, open-sourced under the MIT license.

The core problem it solves is: quickly supplementing drafts using voice in DSH Web, while ensuring the ASR service only runs on the local loopback address, and not automatically sending the recognition results.

Core Features

Hold to Speak, Release to Recognize

  • Adds a “Hold to Speak” microphone button on the same row as the input box, to the left of the send key.
  • Hold the button to record, release to trigger local offline voice recognition.
  • The recognition result is appended to the current draft; it does not auto-send.

Local Offline ASR

  • The host side only listens for the local ASR HTTP service on 127.0.0.1:18765.
  • Uses sherpa-onnx-node and the SenseVoice-Small INT8 model for offline recognition.
  • Automatically downloads approximately 229 MB of the sherpa-onnx SenseVoice INT8 model on the first recognition and decompresses it.
  • Supports Chinese, English, mixed Chinese-English, as well as Japanese/Korean/Cantonese recognition.
  • Automatic language detection (auto), no fixed language per session.

Insert Draft via Official DSH Method

  • Mounts the official slot conversation.input.right on the browser side.
  • Uses the official event slash/input-insert-text to append text.
  • Uses draftRev CAS for the inserted draft, does not call the undocumented setDraft, and does not modify the textarea DOM.

Installation and Usage

Install full UI plugin from local directory

Place the plugin in a local directory, for example:

D:\dsh\dsh-plugin-voice-input

Execute:

dsh plugin --profile web add D:\dsh\dsh-plugin-voice-input

dsh plugin add modifies the profile manifest; running instances require a restart to take effect.

Start DSH Web and check button

dsh web --port 3080

Open:

http://127.0.0.1:3080

You should see the microphone button next to the send key.

Verify only host-side ASR service

If you only want to check the host-side ASR service:

dsh web --patch D:\dsh\dsh-plugin-voice-input\cordis.dev.yml

Then check service health:

Invoke-RestMethod http://127.0.0.1:18765/health

Install from GitHub

The placeholder command form given in verified resources is:

dsh plugin --profile web add github:<owner>/dsh-plugin-voice-input

We retain the placeholder syntax from the resources here and do not fill in specific user details. If using pnpm ≥10, the package name needs to be added to the allowBuilds in pnpm-workspace.yaml:

allowBuilds:
  dsh-plugin-voice-input: true

Uninstall plugin

dsh plugin --profile web remove dsh-plugin-voice-input

Typical Usage

  1. In the DSH Web input box, hold the microphone button to the left of the send key and speak.

  2. Release the button and wait for the local offline recognition to complete.

  3. The recognition result is appended to the current draft.

  4. Check the draft content and manually send.

Note: This is whole-paragraph recognition on hold-release, not real-time streaming; long recordings (>30s) take longer to recognize. VAD is not integrated, so silence or very short recordings will prompt “no speech content detected”.

Runtime Configuration and Limitations

Port and Source Restrictions

  • ASR service default binding: 127.0.0.1:18765
  • Port override: DSH_VOICE_ASR_PORT
  • CORS only accepts localhost / 127.0.0.1 / ::1 / intranet source pages

Model and System Dependencies

  • Automatically downloads approximately 229 MB model and decompresses on first recognition.
  • Depends on the sherpa-onnx-node native extension.
  • Windows 10+ comes with tar.exe for model decompression.
  • Model data directory can be overridden via DSH_VOICE_DATA_DIR.

Use Cases and Notes

Suitable for developers who need to quickly input long sentences or mixed Chinese-English content in DSH Web and prioritize keeping voice recognition local.

Before installing, it is recommended to check the source code and license. Current resources confirm the license is MIT, but the plugin will run with the permissions of the current dsh process. You should still confirm the plugin code and runtime permissions according to environment requirements before actual deployment.

Links

GitHub:

https://github.com/tangbut1/dsh-plugin-voice-input

Community directory: Verified resources do not provide a confirmable directory page URL, so this article does not provide guessed links. The DSH community directory is a separate site, not an official app store. Open source under the MIT license; Issues/PRs are welcome.