Introduction¶
In DSH’s plugin architecture, the chat input box is extensible. If you wish to embed voice input directly into the DSH web chat input box instead of relying on external tools for manual pasting, voco-input-sh offers a solution: adding a microphone button next to the input box to launch local VocoType recognition and insert the results into the input draft.
Below is an introduction to the plugin’s positioning, installation method, and typical usage.
What is this¶
voco-input-sh is a DSH web plugin package. It is responsible for detecting, launching, and automatically deploying VocoType, reading VocoType recognition logs, inserting recognition results into the chat input box, and deduplicating when the draft already contains the same text.
The repository address is:
https://github.com/Nothree-code/voco-input-sh
The license is MIT. The version number in package.json is 0.2.0, and dependencies include react ^18.2.0.
Core Features¶
This plugin primarily provides the following capabilities:
- Provides a microphone button in the right toolbar of the input box, uses a Qwen-style icon, highlights on hover, and displays a breathing red dot during recording.
- Pops up a recording panel above the input box, displaying waveform animation, status hints, and the cumulative count of inserted lines.
- Detects the VocoType process; automatically launches if not running; automatically downloads the official installation package and silently installs if not installed.
- Based on VocoType’s open-source offline speech input capabilities, supports Paraformer Chinese recognition, FSMN-VAD, and CT-Transformer punctuation.
- Reads VocoType recognition logs and optimizes polling based on
mtimeto avoid re-reading when log files haven’t changed. - Automatically inserts recognition results into the input draft; skips insertion if the draft already contains the text to avoid duplicates.
- Supports continuous input of multiple sentences after one launch; ends when the button is clicked again or the panel is closed.
- Provides a retry button when the panel encounters an error.
- Log path is based on
%LOCALAPPDATA%, and the exe detects multiple common installation locations.
Installation and Enablement¶
The installation process involves local profile installation, not a single-command plugin addition flow. First, prepare pnpm and place the package in the packages/ directory of the DSH profile.
First, confirm the directory, for example:
C:\Users\<you>\.dsh\profiles\web\packages\voco-input-sh
Then, execute the installation in the profile root directory:
cd <your profile directory> # e.g. C:\Users\<you>\.dsh\profiles\web
pnpm add "file:./packages/voco-input-sh"
Next, add the mount line to cordis.patch.yml:
- insert:
- id: voco-input-sh
name: 'voco-input-sh'
Finally, restart DSH web. After the above steps, the microphone button will appear in the chat input box toolbar.
Typical Usage¶
- Click the microphone button on the right side of the input box to open the recording panel.
- Hold down
AltRightto speak, then release. - Recognized text is automatically inserted into the input box draft.
- If VocoType has already pasted the text into the input box, the plugin will skip insertion if the draft already contains that text.
- When speaking continuously, recognition results will be inserted in order.
- Click the microphone button again, or click the panel close button, to end the current continuous input.
Applicable Scenarios and Notes¶
This plugin is suitable for users who wish to use continuous voice input in the DSH web chat input box and accept VocoType’s automatic deployment.
Please note the following points before use:
- Requires
pnpm. - VocoType will be automatically deployed. The first time it automatically downloads an installation package of about 25MB and silently installs it; the model is about 1.6GB and is downloaded when VocoType starts for the first time.
- The installation command examples use Windows paths and involve PowerShell and the
%LOCALAPPDATA%path. - The plugin runs with the permissions of the current DSH process. It is recommended to check the source code, dependencies, and MIT license before installing.
- The version in
package.jsonis0.2.0, and dependencies includereact ^18.2.0. - Security design includes: deployment operations use POST and validate the anti-CSRF token; installation packages have fixed SHA-256 verification; the download link removes
--ssl-no-revoke; routes have Origin/Sec-Fetch-Site guards; PowerShell calls have a 180s timeout; clientensurerequests have a 120s timeout. - If reading the log in UTF-8 fails, it will automatically switch to GBK decoding.
Conclusion¶
The value of voco-input-sh lies in connecting VocoType’s offline speech recognition results to the DSH web input box, reducing repetitive pasting and switching to external tools. The DSH community directory is a separate site and has no official affiliation with DeepSeek / 幻方; current verified materials do not provide a specific directory page address. The repository address is:
https://github.com/Nothree-code/voco-input-sh