Preface¶
Writing prompts in DeepSeek Harness (DSH) remains primarily a keyboard-driven task; occasionally, when dictating long sentences or wanting to avoid breaking one’s train of thought, having to click a button to start recording and then click again to stop—or remembering specific key combinations—introduces significant friction. The official shortcut service only distributes keydown events and places restrictions on bindings without modifier keys, making it difficult to implement “hold to talk, release to finish” as a standard command in the Settings menu.
Below is an introduction to the community plugin dsh-voice-ptt (maintained by eicon-xyz): when the Web composer input field is focused, hold a key to speak and release the key to finish. The recognition result is inserted at the current cursor position in the draft without being sent automatically. The plugin is classified as a client-side extension and currently has 1 star on GitHub.
What is this¶
dsh-voice-ptt is a Push-to-talk (PTT) dictation plugin for DeepSeek Harness: hold a single key in the composer to record, release to transcribe, and the text lands in the draft for you to review before sending.
The host-side code (lib/index.js) is intentionally empty; all behavior resides in the browser (lib/client.js) and is mounted via dsh.client. The license is MIT, and the npm package version is 0.1.0 (subject to the repository’s package.json).
Core Features¶
Default Interaction (F2)¶
- When the cursor is within the composer and the draft is empty, a faint prompt appears in the toolbar:
Hold F2 to dictate(UI language follows DSH’sen/zhsettings). - Hold F2: Recording begins, and the prompt changes to
Recording — release F2 to finish. - Release F2: After audio transcription, the text is inserted at the cursor position.
No need to memorize key combinations; the README summarizes it as: Hold F2, release, done.
Cancellation and Edge Cases During Recording¶
- Pressing
Esc, or pressing another key while recording (e.g., a letter you intended to type), cancels and discards the current recording. - Losing window focus or switching tabs cancels the recording to avoid capturing unrelated audio.
- Automatically stops and transcribes the recorded portion if the recognizer’s duration limit is exceeded.
Changing the Hold Key¶
The prompt text itself is a clickable button: click it to open a list of candidate keys. Selecting an item takes effect immediately and is saved to localStorage.
Built-in candidates include F2 (default), F4, Insert, Right Ctrl, Right Shift, etc.; the documentation explains the trade-offs for each key (e.g., Right Shift may trigger Sticky Keys on Windows if pressed repeatedly). The plugin identifies when the “hold key” is itself a modifier key and does not mistakenly treat it as a combo key, preventing the event from passing through.
To extend the candidates, you must modify KEY_OPTIONS at the top of lib/client.js (an array of {code, labelKey}, where code is KeyboardEvent.code and labelKey corresponds to a dictionary entry in the zh/en maps within the same file).
Division of Labor with Official Shortcuts¶
@deepseek-ai/dsh-client-shortcuts only handles keydown and lacks keyup to end a “hold”; furthermore, bindings without modifier keys are rejected, and Web chords are constrained by platform whitelists. Therefore, “hold single key to talk” cannot be registered as a shortcut command. This plugin handles the keyboard by listening to keydown / keyup at the document level. The trade-off is that it will not appear in Settings → Shortcuts, and key customization is done within the composer prompt.
The documentation also details behavior when focus is not in the composer, within terminals, when dialogs are open, or when modifier keys are pressed with F2 (e.g., Ctrl+F2)—ensuring it does not steal recording, yields to other actions, or intercepts incorrectly.
Technical Highlights (Summary)¶
- Draft Insertion: Via session-level
inputActions(captureInsertion+insertText), a permanent item is registered atconversation.input.leftresponsible for the status line, focus prompts, and key customization UI. - Recording:
MediaRecorderaudio is resampled viaOfflineAudioContextto 16 kHz mono PCM16 WAV (consistent with the official voice-input), followed by a call to the host’sspeech.transcribe.
Installation and Activation¶
The plugin declares dsh.bundle.patch. The installation command writes the layered configuration into the profile’s bundle and mounts it, eliminating the need to manually edit cordis.patch.yml.
Web profile installation:
dsh plugin --profile web add dsh-voice-ptt
If installing from a Git checkout with a pinned revision (format from source material, replace <commit> with the actual commit):
dsh plugin --profile web add 'github:eicon-xyz/dsh-voice-ptt#<commit>'
Voice Recognition Dependency: You must install and enable @deepseek-ai/dsh-experimental-voice-input-bundle and perform a one-time model preparation (approx. 230 MB). If the recognizer is not ready, holding the key will display a visible reason in the status line rather than failing silently.
The plugin runs with the permissions of the current DSH process; please review the source code and MIT license before installation to ensure compliance with your environment policies.
Typical Usage¶
- Complete the installation, voice-input bundle setup, and model preparation described above.
- Open a conversation in Web DSH and place focus in the composer.
- Once you see
Hold F2 to dictate(or the Chinese equivalent), hold F2 to speak, then release and wait for the transcription to be written into the draft. - Review the text, edit as needed, and send it yourself (the plugin never sends automatically).
- If F2 conflicts with other functions, click the toolbar prompt to open the candidate list and switch to F4, Right Ctrl, etc.
The feature remains usable even if the draft is not empty (the test case nonempty-draft.cjs covers append behavior). Transcription results appear after the key is released; there are no streaming subtitles.
Use Cases and Limitations¶
Suitable for: Developers or heavy prompt writers who primarily use DSH on the Web, wish to dictate into the input box, and prefer a workflow of “human confirmation before sending”; those who need single-key PTT without binding complex shortcuts.
Limitations (Explicitly listed in README):
- Web surface only; the desktop native keyboard bridge is not connected to this plugin.
- No streaming subtitles; text appears only after the key is released.
- Supports only one hold key at a time; keys outside the candidate list require modifying
KEY_OPTIONS. - Node engine requirement:
>=20(per package metadata).
Community Directory Page: skillhub.cn/plugins/eicon-xyz/dsh-voice-ptt. This directory is an independent community site with no official affiliation with DeepSeek / High-Flyer. The DSH ecosystem emphasizes “everything is a plugin,” and this plugin represents one such client-side extension path.
Conclusion¶
dsh-voice-ptt consolidates the “hold—speak—release—insert into draft” flow directly within the composer: defaulting to F2, offering clickable prompts for key changes, and relying on the official experimental voice-input for transcription. If your scenario involves writing agent prompts on the Web, dictating long passages, and editing before sending, you can install the bundle and this plugin according to the README and try it directly in the input box.
- Directory Page: https://www.skillhub.cn/plugins/eicon-xyz/dsh-voice-ptt
- Source Code & Documentation: https://github.com/eicon-xyz/dsh-voice-ptt