편집자 노트

语音朗读

dsh-plugin-tts — Edge TTS voice integration for DeepSeek Harness

이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.

dsh-plugin-tts

dsh-plugin-tts

license Awesome node tests stars last commit

中文 | English


dsh-plugin-tts — Edge TTS 语音大集成

基于 Microsoft Edge 在线 TTS(node-edge-tts 协议)的 DeepSeek Harness 语音插件:给 AI 回复加朗读,支持逐条手动朗读与自动朗读。

功能

  1. 消息朗读按钮:每条 AI 回复左下角操作行(复制 / 好的回答 / 有问题的回答 / 在新对话中分支 之间) 新增「朗读」按钮,点击朗读该条消息(按钮显示音柱跳动动画),再次点击停止。
  2. 自动朗读开关:输入框左下角、命令按钮与权限选择按钮之间的喇叭按钮; 开启后每条新完成的 AI 回复自动朗读(按钮带圆形高亮),关闭则不自动朗读。
  3. 语音设置面板:侧边栏「设置 → 插件」新增「语音」标签页:
    • TTS提供者:Edge TTS
    • 声色:22 个经实测可用的 Edge TTS 音色(默认 晓萱 zh-CN-XiaoxuanNeural)
    • 试听测试:输入文本 + 播放按钮(播放中显示旋转 loading,可点击停止;失败时红字提示)

要求

  • DeepSeek Harness web profile(dsh web
  • Node.js ≥ 22(worker 使用原生 WebSocket

安装

# 已发布到 GitHub 后:
dsh plugin --profile web add "github:1624318455/dsh-plugin-tts#main"
# 或本地开发:
dsh plugin --profile web add "file:/path/to/dsh-plugin-tts"

重启 dsh web 后作为 profile bundle 自动加载,无需手动启用。

可用音色(经实测)

区域音色
简体中文晓萱 Xiaoxuan · 晓伊 Xiaoyi · 云希 Yunxi · 云扬 Yunyang · 晓晓 Xiaoxiao · 云健 Yunjian · 云夏 Yunxia · 晓北(辽宁) liaoning-Xiaobei · 晓妮(陕西) shaanxi-Xiaoni
台湾曉臻 HsiaoChen · 曉雨 HsiaoYu · 雲哲 YunJhe
香港曉佳 HiuGaai · 曉曼 HiuMaan · 雲龍 WanLung
英文Aria · Jenny · Guy · Sonia(英)
日/韩/法七海 Nanami · SunHi · Denise

注:Xiaohan / Xiaomeng / Xiaorui / Xiaoshuang 等旧音色已被 Edge 端点移除(返回 1007 Unsupported voice),未列入。

架构

位置职责
Hostlib/index.mjs注册 POST /dsh-tts-api/speak(合成)与 GET /dsh-tts-audio/<id>(音频)两条 webServer 路由;用 node -e 运行零依赖 worker
Clientlib/client.jsshell.overlay 隐藏 <audio> 宿主 + 三处 UI(朗读按钮 / 自动朗读开关 / 语音设置面板),通过 fetch 调 Host 路由

TTS 引擎:worker 协议镜像 node-edge-tts@1.2.10Sec-MS-GEC 查询参数(ticks 向下取整到 5 分钟边界)、 Sec-MS-GEC-Version=1-143.0.3650.75、二进制帧 Path:audio 前缀、 xml:lang 由音色 locale 推导、1006 异常关闭自动重试一次。音频输出 audio-24khz-48kbitrate-mono-mp3

边界行为

  • 自动朗读中点击同一消息朗读按钮 → 停止;点击另一消息 → 打断自动、改手动朗读。
  • 手动朗读中关闭自动开关 → 不打断手动;自动朗读中关闭 → 停止自动朗读。
  • 新消息完成(自动开启)→ 打断当前、朗读最新;无文本消息跳过;切换会话只停自动来源。
  • 合成/播放失败 → 静默清理状态并恢复图标(试听面板内会显示红字提示)。

自定义音色(RVC)

用你本地训练好的 RVC 模型做音色转换:设置面板把 TTS提供者切到「自定义音色(RVC)」,朗读链路变为 Edge TTS 底噪 → 本机 RVC 推理服务(rvc-server.py)→ 转换后的 wav → 播放,全程在本机 GPU/CPU 上完成。

启动本地 RVC 推理服务

# 任选一个 RVC-Project WebUI 安装(本机验证示例,azusa-test 仅本地使用)
E:\AI\RVC20240604Nvidia\RVC20240604Nvidia\runtime\python.exe rvc-server.py \
    --rvc-dir "E:\AI\RVC20240604Nvidia\RVC20240604Nvidia" \
    --model "E:\AI\RVC20240604Nvidia\RVC20240604Nvidia\assets\weights\azusa-test.pth" \
    --index "E:\AI\RVC20240604Nvidia\RVC20240604Nvidia\assets\indices\azusa-test_..._v2.index" \
    --port 4892

rvc-server.py 提供 GET /healthPOST /load {model,index}POST /convert {audio_base64,params}(JSON+base64, 无额外依赖);自动使用环境内的 ffmpeg.exe 解码 mp3 底噪。设备自动选 cuda:0(NVIDIA)或 cpu,可 --device 指定。

设置面板 RVC 配置

  • 底噪来源:Edge TTS 合成 / 上传音频文件(wav/mp3/m4a/ogg/flac)。选「上传」时不再经过 Edge TTS,语速/音调/音量不适用。
  • 服务地址(默认 http://127.0.0.1:4892
  • 模型路径 (.pth)索引路径 (.index)——输入框右侧有「浏览」按钮(RVC 服务自动扫描本机模型/索引文件,点击回填路径);索引留空 = 免索引模式(index_rate 自动为 0,质量略降仍可用)
  • 底噪音色(Edge 底噪模式):Edge 先合成再转换的原始音色
  • 高级参数(折叠):底噪语速/音调/音量(如 +10%)、说话人 ID spk_id(多说话人模型)、f0 方法(rmvpe 质量高 / pm 快)、变调、index_rate、resample_sr、rms_mix_rate、protect、滤波半径 filter_radius(仅 harvest)、F0 曲线文件(手动指定音高)

设置项详解(参数作用与建议)

设置项作用建议
底噪来源转换前基础语音:Edge TTS 自动合成,或上传自己的音频文件上传模式忽略声音调节;wav/mp3/m4a/ogg/flac
语速 / 音调 / 音量Edge TTS 朗读属性;RVC 模式下作用于转换前底噪,语调会透传到最终音色0 = 默认;语速 ±10-20% 听感自然
服务地址本地 RVC 推理服务地址默认 http://127.0.0.1:4892
模型路径 (.pth)RVC 模型文件,即音色来源必填;可用「浏览」从本机选择(.pth)
索引路径 (.index)音色检索索引,提升音色还原度留空 = 免索引(还原度略降,仍可用);「浏览」限 .index
底噪音色转换前的原始语音,决定语调/停顿男声/女声按喜好选
说话人 ID (spk_id)多说话人模型选择说话人单说话人模型保持 0
f0 方法音高检测算法:rmvpe 效果最好;pm 最快;harvest 低音好但慢;crepe 吃 GPU默认 rmvpe;CPU 建议 pm
变调 (f0_up_key)对音高整体升降,单位半音0 默认;±2-3 可微调声线
索引权重 (index_rate)越高音色越接近模型训练者,越低越接近底噪原声0.5-0.75 常用
输出采样率 (resample_sr)输出音频采样率,越高细节越好、文件越大40000 默认
响度混合 (rms_mix_rate)输出音量包络混合比例,越高越接近训练者响度习惯0.25 默认
辅音保护 (protect)保护清辅音与呼吸声,过高保留更多原声细节0.33 默认
滤波半径 (filter_radius)音高平滑滤波(仅 harvest 有效),越大曲线越平滑≥3 启用平滑
F0 曲线文件手动指定音高曲线文件,覆盖自动提取留空 = 自动提取

实测延迟(NVIDIA GPU,服务常驻)

场景延迟
热转换(短句)带 index ~1s / 免 index ~0.4s
完整链路(Edge 合成 + 转换)~2-6s
首次请求(含 hubert/模型加载)数秒到十余秒

版权提示

演示用音色(azusa-test)仅限本机开发验证,请勿对外分发(声音版权)。对外发布的音色包必须使用版权干净的声音。

疑难排查

  • 403 / Sec-MS-GEC 被拒:Edge 端点协议或版本校验变更,更新 lib/index.mjs 内 worker 的 CHROMIUM_FULL_VERSION / TRUSTED_CLIENT_TOKEN
  • 1007 Unsupported voice:所选音色已被端点移除,换用上表列出的音色。
  • 无声音:确认系统音量、浏览器自动播放策略(先与页面交互一次)或合成日志 (dsh web 控制台 [tts] 前缀错误)。

开发

node tests/smoke.mjs   # 冒烟测试:fake ctx 注册路由 + 真实 Edge TTS 合成 + 音频回放断言

lib/ 后的热更新(Windows 下 file: 安装是复制而非符号链接, 运行中的 dsh 读的是 profile 副本):

Copy-Item lib/* $env:USERPROFILE\.dsh\profiles\web\node_modules\@dsh-external\dsh-plugin-tts\lib\ -Recurse -Force
# 然后刷新浏览器即可(bundle 每次请求重新读盘;勿用 pnpm install --force 覆盖)

已知限制

  • 音色 / 自动朗读开关状态保存在内存(动态设置面板,不落盘),刷新页面后复位默认值。
  • 合成音频写入 OS 临时目录,由系统清理。

License

MIT


dsh-plugin-tts — Edge TTS voice integration for DeepSeek Harness

A dual-sided (Host + Web UI) DeepSeek Harness plugin that reads assistant replies aloud using Microsoft Edge's online TTS (node-edge-tts protocol — free, no API key).

Features

  1. Read-aloud button on every finalized assistant message (in the copy / feedback / branch action row): click to speak that message (the button shows an animated equalizer), click again to stop.
  2. Auto-read toggle in the composer tool row (between the command and the access-mode buttons): when on, every newly completed assistant reply is read aloud automatically (the toggle gets a circular highlight); when off, nothing is auto-read.
  3. Voice settings panel under 设置 → 插件 → 语音:
    • TTS provider: Edge TTS (free, no API key)
    • Voice: 22 live-verified Edge TTS voices (default 晓萱 zh-CN-XiaoxuanNeural)
    • Preview: type text and press the play (triangle) button — a spinning loader shows while it is synthesizing/playing (click again to stop), failures show an inline message.

Requirements

  • DeepSeek Harness web profile (dsh web)
  • Node.js >= 22 (the worker uses the native WebSocket)

Install

# published form:
dsh plugin --profile web add "github:1624318455/dsh-plugin-tts#main"
# or local development:
dsh plugin --profile web add "file:/path/to/dsh-plugin-tts"

Restart dsh web; the plugin then loads automatically as a profile bundle.

Voices (live-verified)

RegionVoices
Simplified ChineseXiaoxuan 晓萱 · Xiaoyi 晓伊 · Yunxi 云希 · Yunyang 云扬 · Xiaoxiao 晓晓 · Yunjian 云健 · Yunxia 云夏 · liaoning-Xiaobei 晓北 · shaanxi-Xiaoni 晓妮
TaiwanHsiaoChen 曉臻 · HsiaoYu 曉雨 · YunJhe 雲哲
Hong KongHiuGaai 曉佳 · HiuMaan 曉曼 · WanLung 雲龍
EnglishAria · Jenny · Guy · Sonia (UK)
OtherNanami 七海 (ja-JP) · SunHi (ko-KR) · Denise (fr-FR)

Note: legacy voices such as Xiaohan / Xiaomeng / Xiaorui / Xiaoshuang were removed by the Edge endpoint (1007 Unsupported voice) and are not listed.

Architecture

LayerLocationRole
Hostlib/index.mjsRegisters POST /dsh-tts-api/speak (synthesis) and GET /dsh-tts-audio/<id> (audio) webServer routes; runs a zero-dependency worker via node -e
Clientlib/client.jsHidden <audio> host in shell.overlay + the three UI entries; talks to the Host through fetch

The TTS worker mirrors node-edge-tts@1.2.10: Sec-MS-GEC query params (ticks rounded to the 5-minute boundary), Sec-MS-GEC-Version=1-143.0.3650.75, Path:audio binary framing, xml:lang derived from the voice locale, one retry on abnormal (1006) closures. Audio is audio-24khz-48kbitrate-mono-mp3.

Edge cases handled

  • Clicking the read button of the message being auto-read stops it; another message's button switches to manual reading.
  • Disabling auto-read never interrupts a manual read; it stops auto reads.
  • A newly completed message (auto on) interrupts the current read; text-less messages are skipped; session switches only stop auto reads.
  • Synthesis / playback failures silently reset the icon state (the preview panel shows an inline error message).

Custom voice (RVC)

Use your locally trained RVC model for voice conversion: switch the TTS provider to "自定义音色(RVC)" in the settings panel and the read pipeline becomes Edge TTS base audio → local RVC inference server (rvc-server.py) → converted wav → playback, all computed on the user's own GPU/CPU.

Start the local RVC inference server

# any RVC-Project WebUI install (azusa-test below is a local dev example only)
E:\AI\RVC20240604Nvidia\RVC20240604Nvidia\runtime\python.exe rvc-server.py \
    --rvc-dir "E:\AI\RVC20240604Nvidia\RVC20240604Nvidia" \
    --model "E:\AI\RVC20240604Nvidia\RVC20240604Nvidia\assets\weights\azusa-test.pth" \
    --index "E:\AI\RVC20240604Nvidia\RVC20240604Nvidia\assets\indices\azusa-test_..._v2.index" \
    --port 4892

rvc-server.py exposes GET /health, POST /load {model,index} and POST /convert {audio_base64,params} (JSON + base64, no extra deps); mp3 base audio is decoded with the env's bundled ffmpeg.exe. Device auto-selects cuda:0 (NVIDIA) or cpu; override with --device.

Settings-panel RVC config

  • Service URL (default http://127.0.0.1:4892)
  • Model path (.pth) and Index path (.index)leave index empty = index-free mode (index_rate forced to 0; slightly lower quality, still works)
  • Base voice: the Edge voice synthesized before conversion
  • Advanced (collapsible): base voice rate/pitch/volume (e.g. +10%), speaker id spk_id (multi-speaker models), f0 method (rmvpe quality / pm speed), pitch shift, index_rate, resample_sr, rms_mix_rate, protect, filter_radius (harvest only), F0 curve file (manual pitch)

Settings explained (meaning & guidance)

SettingEffectGuidance
Rate / Pitch / VolumeEdge TTS properties; in RVC mode they shape the base audio and the prosody carries into the final voice0 = default; ±10-20% rate sounds natural
Service URLLocal RVC inference service addressdefault http://127.0.0.1:4892
Model path (.pth)The RVC model — your voice sourcerequired
Index path (.index)Voice retrieval index; improves identityempty = index-free (slightly lower fidelity)
Base voiceOriginal voice before conversion; decides prosody/pausespick male/female as you like
Speaker id (spk_id)Picks the speaker for multi-speaker modelskeep 0 for single-speaker models
f0 methodPitch detection: rmvpe best; pm fastest; harvest good bass but slow; crepe GPU-heavyrmvpe default; pm on CPU
Pitch shift (f0_up_key)Global pitch shift in semitones0 default; ±2-3 to tune the voice
Index rateHigher = closer to the trained voice; lower = closer to the base0.5-0.75 common
Resample srOutput sample rate; higher = more detail, bigger files40000 default
RMS mix rateOutput volume-envelope mix; higher = closer to the trainer's loudness0.25 default
ProtectProtects unvoiced consonants/breath; too high keeps more of the source0.33 default
Filter radiusPitch smoothing (harvest only); larger = smoother curve≥3 enables smoothing
F0 curve fileManual pitch curve, overrides auto extractionempty = auto

Measured latency (NVIDIA GPU, warm server)

ScenarioLatency
Warm conversion (short clip)with index ~1s / index-free ~0.4s
Full chain (Edge synth + conversion)~2-6s
First request (hubert/model load)seconds to ~15s

Copyright note

The demo voice (azusa-test) is for local development only — do not redistribute (voice copyright). Published voice packs must use copyright-clean voices.

Troubleshooting

  • 403 / Sec-MS-GEC rejected: the Edge endpoint protocol or version check changed; update CHROMIUM_FULL_VERSION / TRUSTED_CLIENT_TOKEN inside the worker in lib/index.mjs.
  • 1007 Unsupported voice: the selected voice was removed from the endpoint; pick one from the table above.
  • No sound: check system volume, the browser autoplay policy (interact with the page once), or the synthesis logs ([tts] errors in the dsh web console).

Development

node tests/smoke.mjs   # fake-ctx route registration + real Edge TTS synthesis + audio serve assertions

Hot-reload after editing lib/ (on Windows a file: install is a COPY, not a symlink, so the running dsh reads the profile copy):

Copy-Item lib/* $env:USERPROFILE\.dsh\profiles\web\node_modules\@dsh-external\dsh-plugin-tts\lib\ -Recurse -Force
# then refresh the browser (bundles are re-read from disk per request; never use pnpm install --force)

Known limits

  • Voice / auto-read toggle state is in-memory (dynamic settings, no disk persistence); a page refresh resets the defaults.
  • Synthesized audio is written to the OS temp dir and cleaned by the OS.

License

MIT

REPOSITORY SIGNALS

보안 및 설치 증거

이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.

출처 추적 가능

공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.

라이선스

저장소가 MIT 라이선스를 선언했습니다.

유지보수 활동

최근 180일 내 코드 업데이트가 있습니다.

설치 증거

재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.

설치 라이프사이클 스크립트

검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.