Introduction¶
When entering long prompts, code snippets, or Chinese descriptions in the DSH Web GUI, keyboard input can sometimes be slower than speaking. However, copying external speech-to-text results back into the input box makes the process fragmented. dsh-voice-mic is a voice input plugin for the DeepSeek Harness Web GUI: it provides a microphone button next to the input box, transcribes in real-time after recording, and writes to the input box without automatically sending.
Below introduces its positioning, core capabilities, installation methods, typical usage, and limitations to be aware of.
What is it¶
dsh-voice-mic is a voice input plugin for DSH Web GUI, maintained by Zachary7456, with an MIT license.
It solves the voice input problem for the Web GUI input box: users click the microphone button on the left side of the input box or use a shortcut key to start recording; the plugin writes the recognition results to the input box draft. After stopping the recording, it submits the transcription result but does not automatically send the message.
Core Features¶
- Provides a microphone button on the left side of the input box; default shortcut is
Alt+V. - During recording, partial recognition results are displayed in real-time; upon stopping, a full transcription is performed and written to the input box.
- Does not automatically send messages; users still need to confirm the content in the input box.
- Supports three recognition engines: Browser Built-in, Local Offline Backend, and Cloud API.
- Browser recognition uses the Web Speech API.
- Local offline backend supports
SenseVoiceSmall int8andParaformer, and can be deployed with one click in the settings page. - The local backend defaults to binding
127.0.0.1:7860; audio does not leave the local machine during transcription. - Cloud API uses an OpenAI-compatible ASR interface, allowing configuration of base URL, API key, and model name.
- Real-time writing uses tail replacement (append), not overwriting manual input; automatically rolls back if there are no results or an error occurs.
- The settings page allows modification of recognition engine, shortcut keys, port,
autoStart, etc. - Supports server-side
cordis.patch.ymlconfiguration and environment variable overrides.
Installation and Enabling¶
The runtime requirements are as follows:
- DSH:
dsh >=0.1.0-rc.6 - Node.js:
>=18 - Browser recognition: Chrome or Edge required
- Local offline backend: Additional Python
3.9+required
The installation command is:
dsh plugin --profile web add github:Zachary7456/dsh-voice-mic
Restart dsh web after installation.
You can use the following command to check if the plugin configuration appears in the web profile:
dsh --profile web --dump-config | grep dsh-voice-mic
Typical Usage¶
1. Select Recognition Engine in Settings Page¶
Open DSH Web GUI and navigate to:
Settings → Voice Input → Recognition Engine
Here, you can choose one of three options:
- Browser Built-in
- Local Offline Backend
- Cloud API
2. Using Browser Built-in Recognition¶
Browser built-in recognition uses the Web Speech API, suitable for quick testing.
Usage steps:
- Click the microphone button on the left side of the input box, or press the default shortcut key
Alt+V. - Start speaking; recognition results will be written to the input box draft in real-time.
- Click the microphone button again or stop recording.
- The plugin submits the transcription result but does not automatically send it.
Shortcut keys only work when the page has focus.
3. Deploying the Local Offline Backend¶
If you don’t want audio to leave the local machine, you can deploy the local offline backend with one click in the settings page.
The settings page will execute the deployment process, including detecting Python, installing dependencies, downloading models, starting the local service, and polling for readiness. The model directory defaults to:
~/.dsh/voice/models/<model>
The local service default port is:
7860
The local backend defaults to binding only:
127.0.0.1:7860
That is to say, audio does not leave the local machine during transcription.
The local backend process is hosted by DSH. If DSH restarts, you may need to click deploy again, or you can enable it in the configuration:
autoStart: true
4. Configuring the Cloud API¶
The Cloud API uses an OpenAI-compatible transcription interface. You need to configure the following in the settings page:
- base URL
- API key
- model name
After configuration, you can use “Test API Connection” in the settings page to check if the configuration is correct.
When using the Cloud API for real-time display, the API is called approximately once per second during recording, which will incur corresponding costs.
API keys are stored in browser localStorage and are connected directly to the service provider by the browser, bypassing DSH.
5. Server Configuration Example¶
Besides the settings page, you can also configure the plugin in the server profile. Example location:
~/.dsh/profiles/web/cordis.patch.yml
You can insert configuration similar to the following:
- insert:
- id: dsh-voice-mic
name: dsh-voice-mic
config:
hotkey: alt+v
port: 7860
autoStart: false
Configuration Priority¶
Plugin configuration priority is:
Settings page (localStorage) > Environment Variables > cordis configuration > Default values
Therefore, if you modify shortcut keys, port, or engine in the settings page, the value in the settings page will take effect first.
Offline Verification¶
The repository provides a mock API for offline verification of the complete pipeline:
python server/mock_api.py
This is suitable for first running through the plugin call chain locally, and then switching to a real local backend or cloud API.
Use Cases and Notes¶
Suitable for the following scenarios:
- Quickly entering Chinese prompts, code, or long text in DSH Web GUI.
- Wanting voice transcription results to enter the input box, rather than being sent directly.
- Wanting to use one of the three methods: Browser recognition, Local offline backend, or Cloud API.
- Wanting audio to stay local during transcription.
Notes before use:
- The plugin runs with the permissions of the current DSH process; check the source code and license before installing.
- Browser recognition relies on the Web Speech API of Chrome or Edge.
- The local offline backend requires the additional installation of Python
3.9+dependencies. - After restarting DSH, the local backend may need to be redeployed, or
autoStart: truemust be configured. - Real-time transcription using the Cloud API will incur call costs.
- Shortcut keys only work when the page has focus.
Links¶
GitHub:
https://github.com/Zachary7456/dsh-voice-mic