Introduction

Adding speech input to the DSH Web composer usually requires integrating a third-party speech recognition service, which often involves API key management, server deployment costs, and data privacy concerns. dsh-vox-input provides an alternative based on native browser capabilities.

What Is This

dsh-vox-input is a client-side plugin that provides speech-to-text input for the DSH Web composer. It runs in the browser and does not rely on external servers, API keys, or model downloads. It directly converts microphone audio into text and fills it into the input box.

Core Features

  • Native browser recognition: Based on the Web Speech API and compatible with Chrome/Edge.
  • Zero-dependency runtime: No server, no API key, and no model download required; data stays local.
  • Visual controls: Provides a microphone waveform control interface.
  • Real-time caption stream: Displays real-time captions above while recognition is in progress.
  • Smart backfill: Recognition results are automatically appended to the input box sentence by sentence.
  • Multilingual support: Supports Chinese, English, and automatic language detection switching (zh-CN / en-US / auto).

Installation and Enablement

  1. Create a symbolic link to the plugin directory in the Web configuration directory:
ln -s <this-dir> "$DSH_HOME/profiles/web/node_modules/dsh-vox-input"
  1. Modify $DSH_HOME/profiles/web/cordis.patch.yml and add the following content:
# append to $DSH_HOME/profiles/web/cordis.patch.yml:
#   - insert:
#       - id: dsh-voice-input
#         name: dsh-vox-input
  1. Restart the Web service:
node <dsh>/lib/bin.js web

Typical Usage

  1. Open the Web composer, find the microphone icon in the toolbar, and click it.
  2. Chinese recognition is used by default. Click the small label to switch among zh-CN / en-US / auto.
  3. Start speaking. Real-time captions will appear above.
  4. After pausing for about 1 second, the sentence is automatically appended to the input box.
  5. After about 4 seconds of silence, the session ends automatically.

Use Cases and Notes

  • Use cases: Suitable for developers who need to enter text quickly in the DSH Web composer and who value privacy or want to reduce server overhead.
  • Plugin mechanism: This is a client-side UI plugin (a dual plugin). The host part is a shell, and the core logic is in client.js. The module registration ID must exactly match package.json.name.
  • Compatibility: Non-Chromium browsers display a muted badge.

Conclusion

dsh-vox-input implements speech input through native browser capabilities, lowering the integration barrier for the DSH ecosystem. For more details, refer to its GitHub repository or community directory.