Introduction

DSH emphasizes “Everything is a Plugin”. Interface capabilities such as speech playback and voice input can be integrated as independent plugins without modifying the harness repository source code. dsh-speech-plugin solves this problem: adding playback to assistant messages and adding a microphone to the input box.

What is this

dsh-speech-plugin is the speech plugin for the DeepSeek Harness. Maintainer: huangdejie, License: MIT.

It provides three types of capabilities:

  • Playback of each assistant message
  • Session-level auto-playback switch
  • Voice input microphone for the input box

Playback and voice input can use Ali Bailian (DashScope) or Volcengine Doubo (Volcengine) separately, or use the same provider.

Core Features

Per-message Playback

Clicking the speaker icon in the message action bar will read the body of that reply. The plugin strips markdown and emojis, skipping code blocks and images. Clicking again stops playback.

Auto-playback

There is a speaker switch in the session header. After enabling, newly completed replies are automatically read; history messages are not. Preferences are stored in browser local storage; default is off.

Auto-playback is triggered by “new completion”. During session switching, if a message in the old session is still generating and finishes, it will also be read.

Voice Input

Click the microphone to start speaking; the recognized result is written to the input box draft in real-time. Clicking the microphone again ends and sends, or you can click send directly. Voice input opens the microphone without speaker separation; background human voices will also be recognized during recording.

Dual Engine Combination

Playback and voice input can each choose Ali Bailian (DashScope) or Volcengine Doubo (Volcengine), or use the same provider.

When cloud credentials are missing, invalid, or failed, playback falls back to system voices; the voice input button will be disabled and prompt the reason. The quality of the fallback system voices depends on the operating system. On macOS, you can download enhanced Chinese voices in System Settings -> Accessibility -> Speech.

Installation and Enabling

Install the plugin first, then configure cloud credentials, and finally restart DSH to verify.

Installation

Use the following command to install:

dsh plugin --profile web add dsh-speech-plugin

You can also install from a local directory. First build the source code, then install using an absolute path:

git clone https://github.com/huangdejie/dsh-speech-plugin
cd dsh-speech-plugin && pnpm install && pnpm run build
dsh plugin --profile web add /absolute/path/dsh-speech-plugin

Configure Credentials

Use the key from Ali Bailian (DashScope) or Volcengine Doubo (Volcengine):

export SPEECH_DASHSCOPE_API_KEY=sk-...
# or
export SPEECH_VOLCENGINE_API_KEY=...

The variable name should not start with DSH_; otherwise, the harness will throw an error on startup. Restart DSH after configuration.

Notes on credentials:

  • Ali Bailian (DashScope): One key is used for both TTS and ASR; account arrears will block all calls.
  • Volcengine Doubo (Volcengine): Must use Console API Key, not App-level Access Token; Resource ID must correspond to the version enabled.

Verification

Open:

http://127.0.0.1:3080

Click on message playback, or start voice input after authorizing the microphone. The browser requires an explicit click first to allow sound output.

Optional Configuration

If you need to specify the playback and voice input engines separately, you can write engine and asrEngine in the profile configuration. Configuration file path:

~/.dsh/profiles/web/cordis.patch.yml

Example:

engine: dashscope
asrEngine: volcengine

The above indicates that playback uses dashscope and voice input uses volcengine. You need to restart DSH for the configuration changes to take effect.

View the synthesized results:

dsh --profile web --dump-config | grep -A8 dsh-speech

Use Cases and Notes

Suitable for using speech playback and voice input in the DSH web profile. The plugin is installed independently and does not modify any source code in the harness repository; however, it runs with the permissions of the current DSH process, so it is recommended to check the source code and license before installing.

Notes:

  • Auto-playback is only triggered for newly completed replies; history messages are not read.
  • During session switching, if a message in the old session is still generating and completes, it will also be read.
  • Voice input does not perform speaker separation; environmental human voices will also enter recognition.
  • The quality of system voices in cloud fallback depends on the operating system.

Conclusion

dsh-speech-plugin turns message playback, auto-playback, and voice input into a set of configurable DSH plugin capabilities, and provides system voice fallback when the cloud is unavailable. Repository URL:

https://github.com/huangdejie/dsh-speech-plugin