Back to home@TalkingRainTuT

dsh-VoiceChat

一个DSH的语音聊天插件 | Realtime voice chat plugin for DeepSeek Harness: configurable translate + multi-TTS + auto-start local servers.

Stars
1
Language
JavaScript
Created
Aug 23, 2026
Updated
Aug 23, 2026

Introduction

dsh-VoiceChat

english | 中文

A realtime voice chat plugin that makes DeepSeek Harness agents speak out loud (dynamic Cordis plugin).

Every assistant message automatically: translate on demand → synthesize with the selected TTS → auto-play, with a 🔊/⏸/▶ button (play / pause / resume / replay) at the end of the message.

Features

  • Conditional translation: only calls the translation API when voiceLanguageaiLanguage; otherwise the original text is synthesized directly
  • OpenAI-compatible translation: configurable baseUrl / model / apiKey (DeepSeek by default; switch to OpenAI by changing baseUrl/model)
  • Multiple TTS providers: local (Style-Bert-VITS2 / GPT-SoVITS) + free cloud (edge-tts) + cloud (OpenAI / DashScope / Qwen-TTS / ElevenLabs)
  • autoStart: automatically starts local TTS services on plugin activation (health-checked, never starts duplicates)
  • Long text: chunks by each provider's maxChunk and stitches the audio together

Installation

# from a local checkout
dsh plugin --profile web add "file:/path/to/dsh-VoiceChat"

# or, once published to npm
dsh plugin --profile web add dsh-VoiceChat

Directory structure

dsh-VoiceChat/
├── speak.mjs           # executor: translate + pluggable TTS + chunk/stitch
├── config.json         # configuration
├── config.example.json # configuration example
├── package.json        # dependencies (edge-tts needs ws / https-proxy-agent)
├── LICENSE             # MIT
├── played.json         # already-auto-played list (runtime artifact)
├── wav/                # generated audio (runtime artifact)
├── lib/
│   ├── host.mjs        # plugin Host half source
│   ├── client.mjs      # plugin Client half source
│   └── edge-tts.mjs    # edge-tts protocol implementation (from dsh-voice, MIT)
└── .gitignore

Quick start

  1. Put this directory under the session workspace (default ~/.dsh) as the .dsh-VoiceChat folder (the Host locates it via the workspace-relative path .dsh-VoiceChat, portable across machines)
  2. npm install (or create a node_modules junction if deps already exist locally)
  3. Copy config.example.jsonconfig.json, fill in keys and provider
  4. Activate the plugin (see below)

Configuration (config.json)

{
  "translator": {            // OpenAI-compatible translation API
    "apiKey": "sk-...",      // DeepSeek or OpenAI key
    "baseUrl": "https://api.deepseek.com",  // or https://api.openai.com/v1
    "model": "deepseek-chat",               // or gpt-4o-mini
    "targetLanguage": "ja"
  },
  "aiLanguage": "zh",        // language the AI replies in
  "voiceLanguage": "ja",     // voice target language (configurable; skips translation when equal to aiLanguage)
  "ttsProvider": "opentts",  // voice generation model
  "nodePath": "",            // node executable (auto-resolved when empty)
  "autoStart": { "enabled": true, "servers": [ { "name": "...", "command": "...", "args": [...], "cwd": "...", "healthUrl": "..." } ] }
}

TTS providers

providertypedescriptionrequired config
style-bert-vits2localserver_fastapi /voice (default)url, modelId, speakerId
gpt-sovitslocalPOST /tts (api_v2)url, refAudioPath
edge-ttscloud freeMicrosoft Edge TTSvoice (e.g. ja-JP-NanamiNeural)
openaicloud/local/audio/speech, OpenAI-protocol compatible local serversapiKey, voice
dashscopecloud (Aliyun)Tongyi sambert text2audioapiKey, voice
qwen-ttscloud (Aliyun)Tongyi qwen-ttsapiKey, voice
elevenlabscloudElevenLabsapiKey, voiceId

License

MIT