MiMo TTS Speech Synthesis Plugin (dsh-mimotts)

Preface

DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. Developers often need to add text-to-speech (TTS) capabilities to assistant replies. dsh-mimotts is a plugin based on Xiaomi MiMo TTS (mimo-v2.5-tts) that provides a configuration card, a volume button on the message action row, and an inline player with a progress bar. This plugin strictly follows the official plugin specifications; API Keys are stored only on the host side, and the browser only sends text and receives WAV data.

Installation and Activation

Install the plugin locally:

dsh plugin --profile demo add ./dsh-mimotts

Before installation, you need to run the build commands:

npm install
npm run build

Once installation is complete, find dsh-mimotts on the “Plugins” page, enter your API Key, and you are ready to use it after a trial listen.

Core Features

1. Plugin Page Configuration Card

After adding the plugin on the “Plugins” page, the configuration card includes the following parameters:
* API Key: Input field only. Once pasted, it is stored in the host’s credential store via the official channel. It displays a “Configured/Not Configured” status. Clearing and saving does not alter the already stored key.
* Interface and Model: Interface endpoint (default https://api.xiaomimimo.com/v1) and Model (default mimo-v2.5-tts).
* Voice and Cloning: Dropdown selection for 9 official voices (mimo_default, Bingtang, Moli, etc.); voice cloning samples require a local WAV path (24kHz/16bit/Mono).
* Style and Limits: Default style, maximum characters per request, and request timeout.
* Trial Listen: Synthesizes sample audio using the current configuration and plays it inline.

2. Message Action Row and Player

The action row at the bottom of each finalized assistant reply provides a volume button and an inline player with a draggable progress bar:
* Synthesis: Click the button, and the host synthesizes the audio (Markdown is normalized; code blocks, URLs, and markup symbols are not read aloud).
* Playback Control: Play/Pause, draggable progress bar (supports pointer dragging, single-click seeking, and keyboard operations ← → Home End).
* Status: Only one audio plays at a time; the action row does not fade out while playing.
* Error Handling: Errors such as not configured, timeout, or upstream rejection are displayed in place.

3. Settings Page Voice History

Manage reading records in “Settings → Voice History”:
* Auto-save: Automatically saved every time a read-aloud occurs.
* Grouping and Playback: Grouped by text, with multiple versions displayed side-by-side, supporting playback per version.
* Management Actions: Supports “Re-synthesize” (re-reads using current settings while retaining the old version for comparison) and deletion.

Technical Details and Adaptation

  • Version Requirements: Adapted for deepseek-harness >=0.2.0-rc.2 <0.3.0.
  • Architecture Division: The Host side handles the configuration form, web routes (/api/mimotts/status, /api/mimotts/synthesize), and trust fences; the Client side registers components via three slots: plugins.bundle.config, conversation.chat.assistant-actions, and settings.section.
  • Security Boundaries: The /api/mimotts/* routes pass through the Connection trust fence first; request body limit is 1MiB; text exceeding the budget is truncated at the sentence end, reading only the beginning.

Notes

  • Text Processing: Skips code blocks, URLs, and markup symbols when reading aloud.
  • Platform Differences: Desktop (Electron) uses IPC to bridge fetch; Voice input (microphone) is handled by the official voice-input bundle, which is complementary to and non-conflicting with this plugin.
  • Build Dependencies: This plugin has no prepare hook; npm run build must be run manually.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye