zemanzhang809/dsh-stt-plugin: DeepSeek Harness Voice Input Plugin

DeepSeek Harness (DSH) supports plugin-based extensions. Voice input is a common requirement in conversational interfaces, but native support is limited. This plugin adds a microphone button to the composer toolbar, utilizing the browser’s Web Speech API to achieve real-time speech-to-text conversion.

Core Features

  1. Microphone Toggle: Adds a microphone button to the composer toolbar; click to start or stop recording.
  2. Voice Input Settings: Provides a voice input page in the settings dialog, allowing configuration of recognition language and dictation mode.
  3. Auto-send: In single-shot mode, automatically submits the message after a phrase ends.
  4. Continuous Dictation: When enabled, keeps the microphone on and accumulates phrases in the draft.
  5. Local Audio Processing: Audio is processed locally within the browser and is not sent to the host or model providers.
  6. Lifecycle Management: Uses Clean Cordis for lifecycle management, cleaning up slots, styles, and dictionaries upon uninstallation.

Installation and Activation

Ensure your environment meets the following requirements before use:

  • DeepSeek Harness must be run from source (pnpm dsh web) or a version deployed with profile support.
  • Node.js ≥ 18 / pnpm ≥ 8.

Installation

Installation via the npm registry is recommended:

dsh plugin --profile web add dsh-stt-plugin

If network access is restricted, you can install via GitHub:

dsh plugin --profile web add github:zemanzhang809/dsh-stt-plugin

Verify Installation

Run the following command in the terminal to confirm the configuration:

dsh --profile web --dump-config

The output should contain id: stt and name: dsh-stt-plugin.

Usage

  1. Open a session and ensure the composer is active.
  2. Click the microphone button and start speaking. Recognized text is appended to the draft area in real-time (interim results are also written in real-time).
  3. Click the microphone button again to stop dictation. If “Auto-send after recognition” is enabled in single-shot mode, the message is submitted automatically after the phrase ends.

Voice Input Settings

Open Settings → Voice Input:

  • Recognition Language: Defaults to auto, following the browser language. You can also manually specify a BCP-47 code (e.g., zh-CN, en-US).
  • Continuous Dictation: When off, recording stops when speaking ends; when on, you must click the button again to stop manually.
  • Auto-send after Recognition: Only effective in single-shot mode; submits automatically after the phrase ends.

Settings preferences are persisted to the DSH settings store; if not writable, they fall back to local storage.

Notes

  • Browser Support: Full support in Chrome/Edge; partial support in Safari; not supported in Firefox (the button renders as disabled).
  • Microphone Permission: Browser microphone permission must be granted on first use.
  • China Network Environment: If GitHub is unreachable, please use the npm registry (recommended) or configure a pnpm mirror (e.g., https://registry.npmmirror.com).
  • Local Execution: The plugin runs with the permissions of the current DSH process. Please check the source code and license before installation.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye