Back to directory

dsh-voice-suite

chentao4183/dsh-voice-suite

DSH 语音套件:免费 edge-tts 页内播报 + 语音转文字输入(百炼 paraformer-realtime-v2)+ Alt+Q 快捷键 + 自动发送 | Speech suite: free edge-tts announce + speech-to-text input (Bailian paraformer) + hotkey

0

stars

0

forks

NOASSERTION

License

2026-08-16

Created

2026-08-16

Last push

README

dsh-voice-suite · 语音套件

English | 中文

DSH(DeepSeek Harness)语音交互套件:免费微软神经音色的页内播报 + 快捷键语音输入,基于 dsh-speech-plugin(MIT)定制增强,edge-tts 协议实现收编自 dsh-voice(MIT)。

功能

  • 🔊 每条回复可播报:消息操作条的喇叭按钮,页内直接朗读(自动剥离 markdown/表情,跳过代码块)
  • 📣 自动播报开关:会话头部开关,开启后新回复自动朗读(浏览器本地记忆)
  • 🆕 edgetts 免费引擎:页内播报走微软 edge-tts 协议——22+ 神经音色、可调语速音调、 零 API key、零成本、无限量;也可切换系统音色 / 阿里百炼 / 火山豆包
  • 🎤 语音转文字(语音输入):麦克风 → 阿里百炼 paraformer-realtime-v2 实时识别 → 文字进输入框, 实时出字、句末自动加标点;也可切换火山豆包。链路:麦克风 → 浏览器采集 PCM → 插件 WebSocket → 百炼实时识别 → 文字落入输入框
  • ⌨️ 键盘快捷键(默认 Alt+Q):轻按 = 开始/结束录音;长按 ≥300ms = 按住说话松开结束
  • 📤 录音结束自动发送(可关)
  • 🛑 录音自动打断播报:开始说话即停朗读,防回声串台

安装

npx -y @deepseek-ai/dsh plugin --profile web add <你的GitHub用户名>/dsh-voice-suite
# 或本地目录
npx -y @deepseek-ai/dsh plugin --profile web add /path/to/dsh-voice-suite

语音输入需要 ASR 密钥(页内播报不需要,edgetts 完全免费):

# ~/.dsh/.env
SPEECH_DASHSCOPE_API_KEY=sk-...      # 阿里百炼(推荐,每月免费 10 小时)
# 或 SPEECH_VOLCENGINE_API_KEY=...

语音识别引擎说明(ASR)

语音输入(麦克风 → 文字)默认使用阿里云百炼的实时语音识别大模型:

项目 说明
默认模型 paraformer-realtime-v2(百炼实时识别,中文标点自动加)
免费额度 每月 36,000 秒(10 小时),每月 1 日自动发放
超出计费 0.00024 元/秒 ≈ 0.86 元/小时,按实际秒数
申请入口 百炼控制台 → API-KEY(sk- 开头)

也可切换火山豆包(asrEngine: volcengine,需控制台 API Key)。 换识别模型:配置项 dashscopeAsrModel(默认 paraformer-realtime-v2)。

注意:百炼账户欠费会同时禁用语音输入(Arrearage 策略),语音输入突然失效先查控制台余额。

配置(profile 的 cordis.patch.yml)

- id: ui-speech
  name: dsh-voice-suite
  config:
    engine: edgetts                  # auto | system | dashscope | volcengine | edgetts
    edgeVoice: zh-CN-XiaoxiaoNeural  # 微软神经音色,400+ id 可选
    edgeRate: '+20%'                 # 语速 -50% ~ +100%
    edgePitch: '+0Hz'                # 音调
    asrEngine: dashscope             # auto | off | dashscope | volcengine

浏览器端个人化(F12 控制台设置,刷新生效):

localStorage.setItem('dsh.speech.micHotkey', 'Ctrl+M')  // 换快捷键
localStorage.setItem('dsh.speech.autoSend', '0')        // 关自动发送

常用音色

音色 id 声音
zh-CN-XiaoxiaoNeural 晓晓 · 温柔女声
zh-CN-YunjianNeural 云健 · 浑厚男声
zh-CN-YunyangNeural 云扬 · 新闻男声
zh-CN-liaoning-XiaobeiNeural 晓北 · 东北话
zh-CN-shaanxi-XiaoniNeural 晓妮 · 陕西话
zh-HK-HiuMaanNeural 曉曼 · 粤语
en-US-AriaNeural Aria · 美式英语女声

完整清单见微软 Speech 服务语音目录,合法 id 均可填。

许可

MIT。衍生自两个 MIT 上游项目(见 LICENSE)。


English

dsh-voice-suite

A speech interaction suite for DSH (DeepSeek Harness): free Microsoft-neural-voice in-page announce + hotkey voice input, customized from dsh-speech-plugin (MIT), with the edge-tts protocol implementation adopted from dsh-voice (MIT).

Features

  • 🔊 Speak any reply in-page via the per-message horn button
  • 📣 Session-level auto-announce toggle (persisted per browser)
  • 🆕 edgetts engine: page announce over the Microsoft edge-tts protocol — 22+ neural voices, adjustable rate/pitch, no API key, no cost, unlimited; system voices / Aliyun DashScope / Volcengine remain selectable
  • 🎤 Speech-to-text voice input: mic → Aliyun Bailian paraformer-realtime-v2 realtime ASR → text lands in the composer with live partials and auto punctuation; Volcengine also selectable. Pipeline: mic → browser PCM capture → plugin WebSocket → Bailian realtime ASR → composer
  • ⌨️ Hotkey (default Alt+Q): tap = toggle; hold ≥300ms = push-to-talk
  • 📤 Auto-send the transcript when recording ends (disable via localStorage)
  • 🛑 Recording interrupts any in-flight announce (echo guard)

Install

npx -y @deepseek-ai/dsh plugin --profile web add <your-github-user>/dsh-voice-suite

Voice input needs an ASR key (announce does not — edgetts is free):

# ~/.dsh/.env
SPEECH_DASHSCOPE_API_KEY=sk-...

Configuration

See the YAML block above; row id is ui-speech, engine values auto | system | dashscope | volcengine | edgetts.

Voice input defaults to Aliyun Bailian (DashScope) realtime ASR — model paraformer-realtime-v2, free tier 36,000 seconds (10 h) per month, then ¥0.00024/s; get an sk- key at the Bailian console. Full details in the Chinese section above.

License

MIT. Derives from two MIT upstreams (see LICENSE).

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.