DeepSeek Harness (DSH) uses a plugin architecture, aiming to extend basic capabilities through community contributions. When developers build agents or interactive applications, they often need streaming voice input capabilities, which native DSH does not yet provide. The dsh-doubao-voice plugin solves this problem. It integrates with Volcano Engine Streaming Large Model Speech Recognition (Doubao Seed ASR), captures microphone audio via the browser, relays it through the host WebSocket to the Doubao service, and finally backfills the recognized text into the input box in a streaming manner.

Core Features

  1. Integrates with Doubao Seed ASR: Uses Volcano Engine Streaming Large Model Speech Recognition services.
  2. Interaction entry point: Provides a microphone button on the left side of the input box, invocable via a global shortcut key (default Alt+V).
  3. Status indication: Provides four-state indication, including “Preparing” (spinning), “Listening” (dynamic volume bar), and “Finishing” (spinning).
  4. True streaming processing: Audio format is 16kHz/16bit/mono PCM, uploaded in 200ms chunks, with recognized text displayed as you speak.
  5. Editing and rollback: Recognition results are not sent automatically, supporting editing and confirmation in the input box. Cancelling recording midway automatically rolls back changes, supports in-place replacement for mid-correction, and long recordings with pauses do not stack (LCP merge algorithm).
  6. Configuration management: Manage credentials, hotwords (comma/semicolon separated), language (BCP-47, e.g. zh-CN), shortcut keys, and maximum recording duration (default 300s) on the settings page.
  7. Output and fallback: Output follows the cursor (default) or the input box; if writing fails, automatically falls back to copying to the clipboard and prompts the user.
  8. Local storage: Credentials are stored in ~/.dsh/dsh-doubao-voice.json, ACL tightened to the current user, readable only on the local machine.

Installation and Enablement

Run the following command in the terminal to install the plugin:

dsh plugin --profile web add dsh-doubao-voice

After installation, restart the dsh web process and refresh the browser page to enable it.

Configuration Methods

After installation, you need to configure Volcano Engine credentials on the settings page or through environment variables.

Method 1: Settings Page

Go to the DSH settings page and find the “Voice Input (Doubao)” configuration item:
- App ID / Access Token: Obtain from the Volcano Engine console.
- Resource ID: Default value is volc.seedasr.sauc.duration.
- Hotwords: Enter comma- or semicolon-separated terms, up to 100.
- Language: Set the recognition language, such as zh-CN, en-US, ja-JP, etc.

Method 2: Environment Variables

Environment variables take precedence over file configuration. Set them in PowerShell as follows:

$env:ARK_APP_ID="你的AppID"
$env:ARK_ACCESS_TOKEN="你的Token"
$env:ARK_RESOURCE_ID="volc.seedasr.sauc.duration"
$env:ARK_LANGUAGE="zh-CN"
$env:ARK_HOTWORDS="芯片,Buck电路"

Technical Implementation

The plugin depends on the ws (WebSocket) library. The protocol layer implementation is a research-driven replica based on the Proma desktop doubao-asr-service.ts, including binary frame protocol, parameter parsing logic, and deterministic tests.

Architecture Flow

浏览器 (lib/client.js)                宿主 (lib/index.js)                 火山引擎
麦克风 → 16kHz PCM ──WS 二进制──► registerUpgrade 中继 ──sauc 协议──► 豆包流式 ASR
   ▲   ◄── transcript 流 ──JSON──◄   DoubaoAsrClient   ◄────────────┘
   流式回填输入框(基线 + 累计文本,幂等写入)

Tests

The project includes test scripts for the merge algorithm and write guard:

node test/merge-test.mjs
node test/writer-guard-test.mjs
node test/relay-test.mjs

Use Cases and Precautions

  • Use cases: DSH WebUI users who need streaming speech-to-text capabilities; suitable for long-text entry or real-time conversation scenarios.
  • Permissions and security: The plugin runs with the current dsh process privileges. It is recommended to review the source code and license before installation.
  • Disclaimer: This is a community project, not an official product of DeepSeek or Volcano Engine. Using Volcano Engine services requires compliance with their terms of service. Please keep your Access Token secure. This plugin is included in the awesome-dsh-plugin directory and does not constitute a security endorsement.

Summary

dsh-doubao-voice provides a complete streaming speech recognition solution for DeepSeek Harness, with clear implementations for capture, transmission, and backfilling. Through simple installation and configuration, developers can directly use the capabilities of Doubao Seed ASR in the DSH environment.