Introduction

DeepSeek Harness (DSH) is a plugin framework designed to extend its core functionality. Voice input usually requires switching windows or copying and pasting text. The dsh-voice-input plugin integrates a microphone button into the composer input box in DeepSeek Harness and provides a web configuration page. It performs speech-to-text (ASR) through the browser engine or any OpenAI-compatible /audio/transcriptions endpoint.

Core Features

The plugin provides the following capabilities:

  1. In-input-box integration: Adds a microphone button to the left toolbar of the input box, with start/stop recording shortcut (Alt+M) and cancel shortcut (Esc).
  2. Real-time status feedback: While recording, a status bar appears above the input box, showing audio level, timer, live transcription, completion status, and error messages.
  3. Dual-engine support:
    • Browser engine: Zero configuration, invoking native browser speech recognition (requires Chrome / Edge).
    • OpenAI-compatible API engine: Supports cloud services or local services, transcribing via the /audio/transcriptions interface.
  4. Local ASR support: Supports a local Whisper server, with a one-click preparation script.
  5. Zero-dependency installation: No build steps and no runtime dependencies; the host only uses Node built-in fetch / FormData / Blob.
  6. Secure credential management: The API key is read from the credential store (default VOICE_ASR_API_KEY) and is not stored in plaintext in configuration files.
  7. Automatic error handling: Provides prompts for common errors such as 401 (authentication error), 404 (path error), 413 (file too large), and timeouts.
  8. Tool diagnostics: Registers the voice_input_status tool, allowing you to directly ask DeepSeek for the current configuration and status.

Installation and Activation

Before installing, ensure the environment meets the following requirements:

  • DeepSeek Harness 0.1.5-rc.1 or later.
  • Node.js 22+ (the host uses AbortSignal.any, FormData, and Blob).
  • A modern browser (Chrome / Edge supports SpeechRecognition; Firefox does not).

Run the following command to install:

# 执行安装
./install.ps1

After installation, refresh the Web UI and go to Settings → Voice Input to use it.

To uninstall, run:

./install.ps1 -Uninstall

Note: Do not use it simultaneously with the dsh plugin --profile web add github:owner/repo command.

Usage

Basic Operations

  1. Click the microphone button in the left toolbar of the input box (or press Alt+M) to start recording.
  2. Press Esc during recording to cancel without writing to the input box.
  3. After you finish speaking, the transcription result is automatically filled into the input box.

Engine Selection

  1. Browser engine (no configuration): Refresh the page and click the microphone directly. If the browser supports it, the native recognition engine will be used. Note: The browser engine is usually unavailable in mainland China.
  2. Cloud transcription API: Configure the API endpoint (such as OpenAI, SiliconFlow, Groq, etc.) and the model on the settings page.
  3. Local transcription: Use the offline Whisper service provided in the local-asr/ folder, or start it with the “Local Backend (One-click Setup)” script on the settings page.

Ollama and Local Models

  • Ollama: The plugin supports detecting Ollama models, but they currently cannot be used because no model in the Ollama 0.34 official model library has audio projection (audio/mmproj) capability.
  • Local Whisper: We recommend using a local service compatible with the OpenAI protocol (such as whisper.cpp or faster-whisper-server).

Configuration and Notes

API Key Management

The plugin does not save the API key in configuration files; instead, it reads it by reference from the credential store (VOICE_ASR_API_KEY). This makes key rotation effective for the next recording immediately, without modifying the configuration.

Model and Browser Limitations

  • Ollama: To use Ollama for transcription, the model must have audio projection (mmproj) capability. Currently, there are no such models in the official Ollama library.
  • Firefox: Because SpeechRecognition is not supported, Firefox cannot use the browser native engine.

Local Backend Script

The plugin provides PowerShell scripts for managing local ASR services and Ollama. The installation script automatically handles the managed lines in cordis.patch.yml and validates file integrity after installation.