In the development of DeepSeek Harness (DSH), interactions can feel monotonous when an agent replies only in text. Developers want to add voice capabilities to the Web UI so that an agent can not only speak but also proactively send voice notes. The dsh-voice plugin is designed as the solution for this.

What Is This

This is a DSH client plugin maintained by Lorodn4x. It uses Edge TTS to provide two core capabilities for the DSH web UI: a browser-side voice playback button, and the ability for an Agent to proactively call voice_say to send voice messages. No API key is required; it uses Microsoft Edge TTS directly.

Core Features

The plugin implements voice functionality through coordination between the Node side and the browser side:

  1. Agent Tool: Registers the voice_say(text, voice?) tool in ctx.tools. The Agent can call this tool to proactively send voice messages.
  2. HTTP Route: Registers the POST /dsh-voice/tts route on ctx.webServer, accepts the {text, voice} parameters, and returns audio/mpeg audio data for the browser to consume.
  3. Text Cleanup: Before speech synthesis, it automatically removes fenced code blocks, indented code, inline code, URLs, HTML tags, tables, and headings, retaining only readable text.
  4. Browser-Side Rendering: Renders the player, Listen button, and voice switcher in the conversation.chat.turnTail slot.

Installation and Activation

Installing the plugin requires adding its path to the configuration and ensuring the configuration entries are written correctly.

  1. Run the installation command to link the plugin to the Web profile configuration:
    dsh plugin --profile web add --save link:/путь/к/dsh-voice
*(Note: Replace the path in the command with the actual plugin path.)*
  1. Add "dsh-voice" to the dsh.profile.bundles list in the DSH configuration file.

  2. Restart the Profile: After installation, the active Profile must be restarted, because the tools and routes run in the host process.

Typical Usage

1. Agent Proactively Sends Voice

While performing a task, the Agent can send a voice reply by calling the voice_say tool. For example:

ctx.tools.voice_say('你好')

2. User Listens to Voice

The browser-side interface displays a “Listen” button. After the user clicks it, the system synthesizes the text and plays it. When switching voices, the Listen button re-synthesizes the text (caches for different voices are independent).

3. Voice Configuration

The default voice is Russian. To use another language, the Agent or user must provide the full Edge TTS ShortName via the voice parameter, for example:
- ru-RU-DmitryNeural (male)
- ru-RU-SvetlanaNeural (female)

Use Cases and Notes

Use Cases:
- Developers who need voice interaction in the Web UI.
- Scenarios where an agent should proactively send voice notes.

Notes:
- Permissions and Network: Speech synthesis requires access to speech.platform.bing.com.
- Cache Location: Generated audio files are cached at $DSH_HOME/voice-cache/<sha1>.mp3.
- License: This project uses the MIT license.

Summary

dsh-voice reuses the Edge TTS engine to add voice interaction capabilities to the DeepSeek Harness Web UI. Developers can use the voice feature directly through the Agent tool or the browser-side button without configuring complex API keys. For more details, see the plugin directory or source code: GitHub.