STARDUSTLC666/dsh-voice
DeepSeek Harness 语音双件套插件:voice_tts(edge-tts 协议免费微软神经语音合成,Sec-MS-GEC 本地 DRM 生成)/ voice_stt(OpenAI 兼容 ASR)/ voice_list。· 为 DeepSeek Harness 智能体提供 TTS + STT 功能。
项目介绍Project Overview
dsh-voice 是 DSH 语音插件,提供文字转语音、语音转文字和音色清单工具。TTS 直连 edge-tts 协议,本地生成令牌,支持 22+ 神经音色且免费;STT 调用 OpenAI 兼容 ASR(Groq/OpenAI/自定义)。适合让 agent 朗读回复或转写录音。注意:TTS 文本限 5000 字符,STT 需配置密钥且音频限 25MB。
dsh-voice is a DSH plugin for text-to-speech, speech-to-text, and voice listing. Its TTS uses the edge-tts protocol with locally generated tokens and 22+ neural voices at no cost; STT calls an OpenAI-compatible ASR endpoint such as Groq, OpenAI, or a custom service. Use it to let an agent speak responses or transcribe audio. Caveat: TTS text is limited to 5000 characters, STT requires an API key, and audio must be under 25MB.
请帮我了解并安装插件:【dsh-voice】【https://github.com/STARDUSTLC666/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
把 STARDUSTLC666/dsh-voice 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-voice
你的 agent 会说话了:edge-tts 微软神经语音免费无限量 + Whisper 转写。
DSH(DeepSeek Harness)语音双件套插件:让 agent 会说话、能听懂。
- voice_tts:文字转语音,走 edge-tts 协议(微软 Edge 朗读服务,免费无限量,22+ 常用音色)
- voice_stt:语音转文字,走 OpenAI 兼容 ASR 接口(Groq / OpenAI / 自定义端点)
- voice_list:音色清单
安装
dsh plugin --profile web add dsh-voice
配置
voice_tts 零配置可用;voice_stt 需要 ASR 密钥:
- id: voice
name: 'dsh-voice'
config:
asrEngine: groq # groq | openai | custom
asrModel: whisper-large-v3-turbo # groq 的 whisper 模型
# asrApiKey: gsk_... # 推荐改用环境变量 DSH_VOICE_ASR_KEY
ttsVoice: zh-CN-XiaoxiaoNeural # 默认音色
# proxyUrl: http://127.0.0.1:7890 # ASR 接口需要特殊代理时启用
工具一览
| 工具 | 作用 | 关键参数 |
|---|---|---|
voice_tts |
文字合成 MP3(免费) | text 必填;voice/rate/pitch/output 可选 |
voice_stt |
音频转文字 | audio 必填;engine/model/language/prompt/output 可选 |
voice_list |
常用音色清单 | 无 |
示例
voice_tts { text: 今天的 AI 早报来了 } # 晓晓女声,输出 voice_output.mp3
voice_tts { text: hello, voice: en-US-AriaNeural } # 英文女声
voice_stt { audio: E:\audio\meeting.mp3, language: zh } # 转写会议录音
voice_list {}
硬核细节
- edge-tts 协议直连:Sec-MS-GEC 令牌按官方 DRM 算法本地生成(SHA256(Windows 文件时间 + TrustedClientToken),5 分钟窗口),WS 传输用
ws库 + permessage-deflate 压缩 + 可选 HTTP CONNECT 代理隧道 - 零 API 成本:TTS 完全免费;STT 只花你选的 ASR 接口的钱
- 文本 ≤5000 字符、音频 ≤25MB 前置校验;输出同名自动加序号
- 协议对齐开源 edge-tts 当前版本(7.x),不依赖过时的令牌端点
开发
pnpm install
pnpm test # 构建 + 31 个测试(含真实合成集成测试)
License
MIT
ruvnet/ruflo
amruthpillai/reactive-resume
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/colleague-skill
nocobase/nocobase
Tencent/WeKnora
anywhere-labs/deepseek-harness-desktop