TalkingRainTuT/dsh-VoiceChat

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

Project Overview项目介绍

dsh-VoiceChat is a realtime voice plugin that makes DeepSeek Harness agents speak aloud. Core capability: automatic on-demand translation plus pluggable TTS (local Style-Bert-VITS2 / GPT-SoVITS, edge-tts, OpenAI, DashScope, Qwen-TTS, ElevenLabs) with per-message play/pause/resume/replay controls. Use it when you need multilingual speech output or flexible TTS backends for a text-based DSH agent. Caveat: non-npm installs must place the plugin in the session workspace and run npm install manually; local providers require a reachable nodePath and runtime service.

dsh-VoiceChat 是一款让 DeepSeek Harness 智能体开口说话的实时语音插件。核心能力:自动按需翻译、可插拔 TTS(本地 Style-Bert-VITS2/GPT-SoVITS、edge-tts、OpenAI、DashScope、Qwen-TTS、ElevenLabs),并在每条消息末尾注入播放/暂停/继续/重播按钮。适用场景:为文本类 DeepSeek Harness agent 增加多语种语音播报与本地/云端 TTS 接入。注意:非 npm 安装时需将插件放在 session workspace 下并手动 npm install;本地 TTS 需保证 nodePath 与依赖服务可用。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-VoiceChat

TalkingRainTuT/dsh-VoiceChat 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

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

provider type description required config
style-bert-vits2 local server_fastapi /voice (default) url, modelId, speakerId
gpt-sovits local POST /tts (api_v2) url, refAudioPath
edge-tts cloud free Microsoft Edge TTS voice (e.g. ja-JP-NanamiNeural)
openai cloud/local /audio/speech, OpenAI-protocol compatible local servers apiKey, voice
dashscope cloud (Aliyun) Tongyi sambert text2audio apiKey, voice
qwen-tts cloud (Aliyun) Tongyi qwen-tts apiKey, voice
elevenlabs cloud ElevenLabs apiKey, voiceId

License

MIT

上一个 Prev dsh-kimi-formula 下一个 Next dsh-agentic-router