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¶
- Microphone Toggle: Adds a microphone button to the composer toolbar; click to start or stop recording.
- Voice Input Settings: Provides a voice input page in the settings dialog, allowing configuration of recognition language and dictation mode.
- Auto-send: In single-shot mode, automatically submits the message after a phrase ends.
- Continuous Dictation: When enabled, keeps the microphone on and accumulates phrases in the draft.
- Local Audio Processing: Audio is processed locally within the browser and is not sent to the host or model providers.
- 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¶
- Open a session and ensure the composer is active.
- 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).
- 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.