Introduction¶
The philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building agents, there is usually only a send button in the lower-right corner of the input box. The dsh-voice plugin adds a microphone button in this position: click it, speak, and the transcription result is appended directly to the input box. This tool is maintained by charlie-pan and addresses the need for quickly entering text via voice in a DSH environment.
Features¶
The plugin adds a microphone button in the lower-right corner of the input box, to the left of the send button. Click it to start recording, click it again to stop and transcribe, and the resulting text is appended to the input box. Main capabilities include:
- One-click voice input: Click once to start recording, and click again to stop and transcribe.
- Three recognition engines: Switchable via configuration.
webspeech(browser-built-in; available in Edge, may not work in Chrome in mainland China),xfyun(iFLYTEK voice dictation; good Chinese accuracy; credentials stored in the local server),whisper(runs locally; audio does not leave the machine; works offline). - Microphone device selection: A dropdown lists all audio input devices and supports persistence.
- Automatic gain: Prevents low-volume speech from failing detection.
- Silence/too-short interception: Blocks recordings under 0.25 seconds or complete silence, saving quota.
- Full long-sentence concatenation: Prevents iFLYTEK segmentation issues that cause only the latter half of the sentence to be displayed.
- Liquid Glass theme: Button style is consistent with the
dsh-liquid-glasstheme.
Installation and Enablement¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile web add git+https://github.com/charlie-pan/dsh-voice.git
After installation, restart dsh web and perform a hard refresh. Open a session, and the microphone button will appear in the lower-right corner of the input box.
Configuration¶
Modify the constants at the top of the client.js file in the plugin directory:
| Constant | Default | Description |
|---|---|---|
ASR_ENGINE |
'webspeech' |
Engine selection: webspeech / xfyun / whisper |
WEBSpeech_LANG |
'zh-CN' |
Web Speech engine language |
MODEL_ID |
onnx-community/whisper-small |
Whisper model ID |
TRANSCRIBE_LANGUAGE |
'chinese' |
Whisper transcription language |
If using the xfyun engine, iFLYTEK credentials must be configured. Credentials are stored only in the local server and are not sent to the browser:
- Register on the iFLYTEK Open Platform and obtain APPID, APIKey, and APISecret.
- Configure the environment variables
XFYUN_APPID,XFYUN_APIKEY, andXFYUN_APISECRET. - Or place an
xfyun.secret.jsonfile in the plugin directory (ignored by.gitignore).
Notes¶
- When using the
webspeechengine in mainland China, Chrome may produce errors; using Edge or switching to thexfyunengine is recommended. - When using the
whisperengine, always setTRANSCRIBE_LANGUAGE; otherwise, the system may recognize speech as English. - The plugin runs with the permissions of the current DSH process. Before installation, review the source code and license (MIT).