DeepSeek Harness Plugin: dsh-dictation-hotkey

Preface

DeepSeek Harness (DSH) adopts a plugin-based architecture, enabling agent development and interaction through a Web interface. In Web composer scenarios, frequent switching of input methods or manual typing can hinder interaction efficiency. dsh-dictation-hotkey addresses this issue by providing a shortcut-based voice input method that reuses the local SenseVoice engine, eliminating the need to download additional models or call cloud APIs.

Plugin Overview

This plugin adds a “hold-to-talk” feature to the DSH Web composer. It does not introduce a separate recognition process; instead, it directly drives the official voice Remote (SenseVoice) built into the DSH Web composer and inserts the transcribed text into the editor via the official API.

Core Features

  1. Mode control: Supports “hold-to-talk” or “toggle” modes.
  2. Send strategy: Allows transcribed content to be “filled” into the editor for review, or “sent immediately.”
  3. Native integration: Reuses the official voice input bundle; no separate recognizer process is introduced.
  4. Native insertion: Inserts text into the editor via the official API, preserving cursor position and attachments.
  5. Configuration management: Hotkeys, modes, behaviors, and notification sounds are stored locally in the browser.
  6. Multi-scenario support: Works on new conversation pages as well (requires a focused editor).
  7. Diagnostic logs: Provides diagnostic information such as volume, duration, and inference time.

Installation and Activation

The plugin depends on DSH’s official voice input bundle. Ensure the environment meets the requirements before installation.

Prerequisites
* DSH version: 0.2.0-rc.2 or compatible.
* Enable the “Voice Input” bundle in the plugin manager.

Installation Steps
1. Open a terminal and run the installation command:

    dsh plugin --profile web add github:AndyYang12345/dsh-dictation-hotkey
  1. Reload the DSH Web UI.

Usage

After installation, a “🎙 Dictation” pill appears in the toolbar below the composer.

Basic Operations
* Press and hold Ctrl+Shift+Space to start speaking; release to insert the text into the editor.
* Click the pill icon to configure hotkeys, send behavior (fill/send), mode (hold/toggle), notification sounds, and diagnostic switches.

Common Settings
Configurations are stored under the dsh-dictation-hotkey.settings key in the browser’s localStorage.

Setting Default Description
hotkey Ctrl+Shift+Space Hotkey combination, supports + separator.
mode hold hold (hold to record) / toggle (click to start/stop).
autoSend false Whether to automatically send after inserting text.
beep true Whether to play a notification sound.
language (empty) Recognition language hint; if empty, follows DSH settings.
providerId (empty) Voice provider ID.
minRecordMs 150 Minimum recording duration (ms); too short will be rejected.
tailMs 180 Audio duration retained after releasing the key (ms).
maxRecordSeconds 60 Maximum recording duration (seconds).
debug false Whether to enable diagnostic logs.

Diagnostics and Debugging

After enabling “Diagnostic logs” in the pill configuration interface, each key press operation records a structured log entry.

Log Event Types
* start: Microphone started; records the trigger key.
* stop: Key released; records recording duration.
* ok: Recognition succeeded; records audio duration, inference time, character count, and peak volume.
* empty-transcript: Empty text returned; records peak volume.
* skip: Rejected by thresholds (e.g., recording too short, no audio, voice Remote not mounted).
* transcribe-failed / mic-failed / insert-conflict / finish-threw: Corresponding failure events.

Limitations and Considerations

  1. Hotkey scope: Hotkeys are only effective when the DSH page is focused; system-wide global hotkeys are not supported.
  2. Microphone permissions: Microphone permissions are only granted to the DSH domain. First-time use may require clicking the official microphone button to authorize.
  3. Recording duration: Limited by maxRecordSeconds (default 60s) and Remote audio constraints.
  4. Development environment: Local development requires Node.js version ^22.19.0 or >=24.0.0.

Conclusion

By reusing the official SenseVoice engine and Web composer APIs, this plugin lowers the barrier to voice input, making it suitable for development scenarios requiring frequent voice interactions.

Related Links
* Plugin Directory Page
* GitHub Repository

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

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

Xiaoye