dsh-gpt-sovits: Localized GPT-SoVITS Voice Synthesis for DeepSeek Harness

Foreword

When developing or interacting with DeepSeek Harness (DSH), adding voice output to assistant replies can enhance the experience. Existing solutions often rely on cloud APIs, posing risks of privacy leakage or network latency. The dsh-gpt-sovits plugin addresses this issue by integrating the locally deployed GPT-SoVITS engine into the DSH Web GUI, achieving fully offline speech synthesis.

Plugin Overview

Maintained by 91koukou, this is a model inference plugin. It leverages DeepSeek’s plugin architecture to integrate GPT-SoVITS speech synthesis capabilities into the DSH Web GUI. The plugin does not bundle any model weights, reference audio, or audio samples, nor does it start the engine for you. Users must prepare the GPT-SoVITS engine and voice weights themselves.

Core Features

The plugin provides the following core capabilities:

  • Playback Control

    • Read aloud one at a time (single-channel preemption): Click again during playback to stop; clicking another reply switches directly.
    • Auto-read (queued, non-interrupting): For streaming replies, only reads newly added content up to sentence-ending punctuation, reading sentence by sentence.
    • Startup greeting (engine warm-up): Requests a greeting from an idle engine; stops once the engine is recognized as working.
    • New turn cancels previous turn: When a new turn starts, clears the pending playback queue and invalidates in-flight synthesis.
    • Stop playback on session switch: Immediately stops current playback when switching sessions.
  • Text Processing

    • Read symbols as human speech: Converts cmd.exe to “cmd dot exe”, 3-10 to “3 to 10”, 3/4 to “three quarters”.
    • Units read correctly: 120km/h becomes “120 kilometers per hour”, 100MB/s becomes “100 megabytes per second”.
    • Pauses determined by punctuation: Period 340ms, comma 150ms, ellipsis 460ms, paragraph 520ms.
    • Complete Chinese sentence segmentation: 。!?;… and their consecutive usage mark sentence endings; paragraphs are hard boundaries.
    • Read only what should be read: Filters out code blocks, URLs, hashes, etc.; table separator lines are not read.
  • Engine & Security

    • Streaming/summary routing: One request per sentence (cut0) and batched cutting (cut5).
    • Audio in memory only: No WAV files written to disk per sentence; dual limits on count and bytes.
    • Per-sentence speech rate and emotion: Speech rate, temperature, top-k, top-p sent per sentence.
    • Voice presets: Name + reference audio + reference text + reference language; supports skipping model reloading.
    • Settings panel: Includes health status, embedded engine console, engine address, voice, speech rate, etc.
    • Listen on localhost only: All routes reject non-loopback sources.

Installation and Activation

  1. Prerequisites

    • A deployed GPT-SoVITS (api_v2.py can run).
    • At least one set of self-trained GPT (.ckpt) + SoVITS (.pth) weights, and a piece of reference audio.
    • DSH desktop or web version.
  2. Start the Engine
    The plugin only handles “speaking”, not starting the engine. Run in the GPT-SoVITS directory:

    cd <your GPT-SoVITS directory>
    runtime\python.exe api_v2.py -a 127.0.0.1 -p 9880 -c GPT_SoVITS/configs/tts_infer.yaml
First-time model loading takes 12-30 seconds.
  1. Install the Plugin
    dsh plugin --profile desktop add github:91koukou/dsh-gpt-sovits
Refresh the page after installation completes.
  1. Configuration
    Open Settings → Voice Reading (GPT-SoVITS).
    • Engine Address: Enter http://127.0.0.1:9880.
    • Voice Preset: Includes name, reference audio path, reference audio text, reference language.
    • Other Settings: Speech rate, sampling steps, volume, etc.

Typical Usage

  • Install a specific version: dsh plugin --profile desktop add github:91koukou/dsh-gpt-sovits#v0.3.0
  • Uninstall the plugin: dsh plugin --profile desktop remove dsh-gpt-sovits
  • Offline self-check: node scripts/selfcheck.mjs
  • Integration test: node scripts/integration.mjs

Notes

  • No weight distribution: This repository does not bundle any model weights, reference audio, or audio samples, nor does it start the engine for you.
  • License scope: Code is released under the MIT license, but model weights are not covered by the MIT license.
  • Compliance: Synthesized audio may be mistaken for real human speech; proactive disclosure is recommended when distributing externally. Only use voices you have rights to; do not clone public figures’ voices.
  • Independence: Not affiliated with DeepSeek or GPT-SoVITS maintainers; this is a third-party community plugin.

Conclusion

dsh-gpt-sovits provides a complete localized speech synthesis solution for DeepSeek Harness, suitable for users requiring high privacy or offline operation scenarios. For related documentation and downloads, see the repository link.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye