zhuiyueya/dsh-voice
Voice for DeepSeek Harness(dsh)— 为纯文本版 DeepSeek 提供语音转文字输入及朗读 TTS 功能,无需 API 密钥。
项目介绍Project Overview
dsh-voice 是 DSH 浏览器端语音插件,为仅支持文本的 DeepSeek 增加语音输入与朗读能力。核心提供 Web UI 的麦克风录音转写、回复朗读按钮,以及 voice_transcribe 与 voice_speak 工具,通过 Whisper / OpenAI 兼容的 STT 与 TTS 接口处理音频。适用于需要语音对话或处理音频附件的场景。需注意:麦克风按钮依赖 voice.stt.apiBase 配置后端,仅靠浏览器 speechSynthesis 的朗读则无需密钥。
dsh-voice is a DSH browser plugin that adds voice input and read-aloud to the text-only DeepSeek model. It provides a mic button in the composer for speech-to-text, a speaker button on each reply for text-to-speech, and two agent tools, voice_transcribe and voice_speak, that handle attached audio files via any Whisper- or OpenAI-compatible backend. Use it when you want spoken interaction or audio file processing through DSH. Caveat: the mic button requires voice.stt.apiBase to point at a transcription endpoint; read-aloud via speechSynthesis works without any key.
请帮我了解并安装插件:【dsh-voice】【https://github.com/zhuiyueya/dsh-voice】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add dsh-voice
把 zhuiyueya/dsh-voice 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
🎤 🔊 dsh-voice
Voice for DeepSeek Harness — give text-only DeepSeek ears and a mouth.
DeepSeek's chat API is text-only — it can neither hear audio nor speak. dsh-voice bridges sound at the input/output boundary so the model never sees raw audio, yet gains a full voice loop:
🎤 speech → text → DeepSeek (text-only) → text → 🔊 speech
Same idea as
dsh-vision-bridge— but for audio, the multimodal gap nobody has filled for DeepSeek Harness yet.
✨ Features
| Layer | What it does | |
|---|---|---|
| 🎤 | Voice input (STT) — Web UI | A mic button in the composer tool row. Click to speak; the transcript is written straight into the input box via the browser Web Speech API. |
| 🔊 | Read-aloud (TTS) — Web UI | A speaker button on every assistant reply. Click to read it aloud via speechSynthesis. |
| 📄 | voice_transcribe tool |
Transcribe an attached audio file (wav/mp3/m4a/ogg/webm/flac) through any Whisper-compatible /audio/transcriptions endpoint. |
| 🗣️ | voice_speak tool |
Synthesize text into an audio file through any OpenAI-compatible /audio/speech endpoint. |
- ✅ Zero API key for the Web UI — pure browser speech, works out of the box.
- ✅ Zero new model — DeepSeek stays text-only; speech is handled at the edge.
- ✅ Configurable backends — point at local whisper.cpp / Kokoro for a fully free, keyless stack.
🧭 How it works
┌──────────────────────────────────────────────────────────────┐
│ dsh Web GUI │
│ │
│ you speak ──🎤 SpeechRecognition──► text ──► input box │
│ │
│ reply text ──🔊 speechSynthesis──► you hear │
└──────────────────────────────────────────────────────────────┘
│ ▲
│ text (STT) │ text (TTS)
▼ │
┌──────────────────────────────────────────────────────────────┐
│ DeepSeek (text-only model) │
└──────────────────────────────────────────────────────────────┘
attached audio ── voice_transcribe (Whisper-compatible) ──► text ──► model
model wants to speak ── voice_speak (OpenAI-compatible TTS) ──► audio file
📦 Install
# from a local checkout
dsh plugin --profile web add "file:/path/to/dsh-voice"
# or, once published to npm
dsh plugin --profile web add dsh-voice
Activation is automatic: the package ships a bundle patch (cordis.patch.yml) and declares dsh.bundle.patch, so dsh plugin add registers it into the profile's bundles for you.
Then restart dsh web (or wait for HMR). You should see 🎤 in the composer and 🔊 on each reply.
⚙️ Configuration
The 🎤 mic button needs voice.stt.apiBase (the browser records audio and sends it to the host's Whisper-compatible backend). The 🔊 read-aloud needs nothing (browser speechSynthesis). To customize read-aloud language/rate/pitch, edit the constants at the top of lib/client.js (TTS_LANG, TTS_RATE, TTS_PITCH).
settings.yaml:
voice:
stt: # mic button + voice_transcribe tool
enabled: true
apiBase: "" # REQUIRED for the mic. Examples:
# SiliconFlow: https://api.siliconflow.cn/v1
# local whisper.cpp: http://127.0.0.1:8080/v1
apiKeyEnv: VOICE_STT_API_KEY
model: whisper-1
language: "" # zh / en / ... ; empty = auto-detect
tts: # voice_speak tool
enabled: true
apiBase: "" # empty = https://api.openai.com/v1
apiKeyEnv: VOICE_TTS_API_KEY
model: tts-1
voice: alloy # alloy/echo/fable/onyx/nova/shimmer, or a local voice id
format: mp3
Why the mic needs a backend: Chrome's built-in
SpeechRecognitionuploads audio to Google, which is unreachable in some regions (you'd see识别出错:network). dsh-voice records withMediaRecorderand transcribes through your Whisper-compatible backend instead. Two free, keyless options:
- SiliconFlow (China-friendly, free tier) —
apiBase: https://api.siliconflow.cn/v1, modelFunAudioLLM/SenseVoiceSmallorwhisper-1.- Local whisper.cpp — fully offline,
apiBase: http://127.0.0.1:8080/v1(no key).
🧰 Agent tools
| Tool | Parameters | Returns |
|---|---|---|
voice_transcribe |
path (audio file), language? |
{ text, language } |
voice_speak |
text, outPath?, voice? |
{ path, bytes } |
🗂 Project layout
dsh-voice/
├── package.json # dual-half plugin: host (main) + browser (client)
├── cordis.patch.yml # bundle activation layer
├── lib/
│ ├── index.js # host half: settings + voice_transcribe/voice_speak tools
│ ├── client.js # browser half: 🎤 / 🔊 buttons
│ └── types/
│ ├── index.d.ts
│ └── client/index.d.ts
├── README.md # this file
└── README.zh-CN.md # 中文版
🗺 Roadmap
- Wire browser-UI language / rate / pitch / auto-read into the
voice:settings page (currently code constants) -
autoRead: auto read-aloud on reply completion - Built-in free
edge-ttsbackend (no OpenAI key) - Local Whisper STT via
@xenova/transformers - Sentence-level reading with streaming interruption
🙏 Credits
Inspired by these established voice solutions for other agents:
- slopus/happy (~23k★) — realtime voice interaction UX
- mbailey/voicemode (~1.3k★) — Claude Code voice mode
- caiovicentino/claude-call — local Whisper STT + edge-tts, no API key
- edge-tts — free Microsoft Edge neural voices
- ggerganov/whisper.cpp / OpenAI Whisper — speech recognition
- hexgrad/kokoro — local neural TTS
nexu-io/open-design
Devin-AXIS/iPolloWork
liustack/modlens
ysr666/dsh-vision-router
Anionex/dsh-vision-toolkit
fufankeji/deepseek-harness-studio
Lum1104/dsh-browser
ZSeven-W/dsh-ios