dsh-gsv-tts 5.2.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/CHANGELOG_EN.md +37 -0
- package/README.md +80 -12
- package/README_EN.md +79 -11
- package/docs/images/architecture.png +0 -0
- package/docs/voices.json +66 -66
- package/lib/audio-store.d.ts +5 -0
- package/lib/audio-store.d.ts.map +1 -1
- package/lib/audio-store.js +4 -0
- package/lib/audio-store.js.map +1 -1
- package/lib/catalog.d.ts +79 -0
- package/lib/catalog.d.ts.map +1 -0
- package/lib/catalog.js +111 -0
- package/lib/catalog.js.map +1 -0
- package/lib/client.js +173 -54
- package/lib/config.d.ts +3 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +7 -1
- package/lib/config.js.map +1 -1
- package/lib/doctor.d.ts +88 -0
- package/lib/doctor.d.ts.map +1 -0
- package/lib/doctor.js +89 -0
- package/lib/doctor.js.map +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +403 -30
- package/lib/index.js.map +1 -1
- package/lib/lexicon.d.ts +46 -0
- package/lib/lexicon.d.ts.map +1 -0
- package/lib/lexicon.js +90 -0
- package/lib/lexicon.js.map +1 -0
- package/lib/migration.d.ts +1 -1
- package/lib/migration.js +2 -2
- package/lib/migration.js.map +1 -1
- package/lib/providers/deepseek.d.ts +112 -0
- package/lib/providers/deepseek.d.ts.map +1 -0
- package/lib/providers/deepseek.js +309 -0
- package/lib/providers/deepseek.js.map +1 -0
- package/lib/providers/edge.d.ts +3 -0
- package/lib/providers/edge.d.ts.map +1 -1
- package/lib/providers/edge.js +10 -1
- package/lib/providers/edge.js.map +1 -1
- package/lib/tts.service.d.ts +34 -0
- package/lib/tts.service.d.ts.map +1 -1
- package/lib/tts.service.js +207 -35
- package/lib/tts.service.js.map +1 -1
- package/lib/types.d.ts +11 -4
- package/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
本文件记录 dsh-gsv-tts 的所有版本更新。格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [5.4.0] - 2026-11-23
|
|
6
|
+
|
|
7
|
+
### 目录驱动(provider / 引擎目录)
|
|
8
|
+
- 新增 `src/catalog.ts`:provider 描述符(能力、默认音色、i18n 键、badge)与 GSV 引擎模型清单(`s1v3.ckpt` / `s2Gv2ProPlus.pth`)
|
|
9
|
+
- 设置面板从新增的 `/dsh-gsv-tts/provider/catalog` 渲染模式 Tab、字段与能力,不再硬编码 provider 分支;`isCloud`、Key 字段、本地区块、默认音色均由能力推导
|
|
10
|
+
- 服务端路由校验、`tts_list_voices` 渲染与 provider 迁移守卫统一读同一份目录;客户端保留兜底目录,服务端不可用时仍可切换
|
|
11
|
+
- 配置 schema 的 `provider` 联合类型改为由 `providerIds()` 生成;客户端遇到未知 provider 不再静默回落到 gsv,描述符回落也按 id 查找
|
|
12
|
+
- 音色合法性(`voiceIdPattern`)与默认音色移入目录:Edge / DeepSeek 的硬编码校验改为 `isValidVoiceId` / `defaultVoiceFor`
|
|
13
|
+
|
|
14
|
+
### 发音词典
|
|
15
|
+
- 新增 `lexicon` 配置(多行 `原词=读法`,`#`/`//` 注释)与设置面板 textarea
|
|
16
|
+
- 新增 `src/lexicon.ts`:长词优先、英文不区分大小写、单次替换不链式、坏行跳过
|
|
17
|
+
- 在文本清洗之后、分段之前统一应用:`tts_speak`、自动朗读、整段朗读与三种 provider 全部生效
|
|
18
|
+
- 支持按模式分节:`[edge]` / `[deepseek]` / `[gsv]`,更具体的作用域覆盖全局;未知分节后的规则跳过
|
|
19
|
+
- 新增 `tts_lexicon_preview` 工具与 `/dsh-gsv-tts/lexicon/preview` 路由:只做文本替换预览,不合成、不产生费用
|
|
20
|
+
|
|
21
|
+
### 可解释失败(tts_doctor)
|
|
22
|
+
- 新增 `tts_doctor` 工具与 `src/doctor.ts`:凭据是否配置及来源(插件设置 / Harness 凭据服务 / 环境变量)、引擎安装与运行、缺失模型、最近 10 分钟失败、音频缓存与词典规则数,并给出可执行建议(不返回密钥)
|
|
23
|
+
- `/speak` 失败与 `tts_speak` 工具异常都会记录最近失败,供诊断复用
|
|
24
|
+
- 失败记录写入临时文件,插件重载后仍可诊断;并覆盖所有合成路径(`synthesize` / `streamPcm` / 整段朗读),由 `TTSService` 统一上报
|
|
25
|
+
- 新增 `deep=true` 深度探活:调用免费 `GET /models` 验证凭据,不再只判断“有没有配置”
|
|
26
|
+
- 本地模式补充前置条件检查(Python / gsv-tts-lite / 仓库)与引擎日志末尾 12 行,均进入报告与修复建议
|
|
27
|
+
|
|
28
|
+
## [5.3.0] - 2026-11-14
|
|
29
|
+
|
|
30
|
+
### 官方语音(DeepSeek)
|
|
31
|
+
- 新增第三种 TTS 提供方 `deepseek`:调用 `https://api.deepseek.com/v1/tools/tts`,音色 `stella`(海星)/ `tide`(暗潮),10 种语种按文本自动识别
|
|
32
|
+
- 设置面板新增「官方语音(DeepSeek)」模式;**默认零填写**:通过 `ctx.get('credentials')` 按 `deepseekApiKeyEnv`(默认 `DEEPSEEK_API_KEY`)从 Harness 凭据服务复用模型鉴权那份 Key,不再要求用户重新粘贴
|
|
33
|
+
- 可选 `deepseekApiKey` 手填覆盖(用独立额度);凭据服务缺失/异常时回退同名环境变量;引用名留空则完全不查凭据
|
|
34
|
+
- 官方接口返回完整 WAV:提供方逐段解出 16-bit PCM;短文本装 WAV 落盘,整段朗读边收边写文件(RIFF/data 长度回填),内存不随文本线性增长
|
|
35
|
+
- 单段合成带真实时长(按采样参数换算),进度条可用
|
|
36
|
+
- 「整段播放 / 下载」支持官方语音:`/speak/full` 走 `synthesizeLong`,一次落盘可 seek
|
|
37
|
+
- **修复切换卡顿**:设置面板切到官方语音需等约 1 秒——切换前先 `await` 音色请求,且当时健康探活是真实试合成(1–4 秒),新请求排在它后面。现改为:先本地切换(零等待),官方音色用内置列表(不发请求),Edge 音色拉取一次后缓存,健康探活改用免费 `GET /models`(实测 110–300ms,且不再计费)
|
|
38
|
+
- 切换时把 `defaultVoice` 与 `provider` 一并落定,避免配置快照刷新把下拉冲回旧值
|
|
39
|
+
- 官方语音不参与本地引擎启停与预热;无 Key 时健康检查返回明确提示,不静默失败
|
|
40
|
+
- **未发布**:等实机音质 / 首音延迟 / 实际扣费实测通过后再定版本号
|
|
41
|
+
|
|
5
42
|
## [5.2.0] - 2026-11-10
|
|
6
43
|
|
|
7
44
|
### Edge 在线端点
|
package/CHANGELOG_EN.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to dsh-gsv-tts are documented in this file. Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [5.4.0] - 2026-11-23
|
|
6
|
+
|
|
7
|
+
### Catalog-driven providers and engines
|
|
8
|
+
- New `src/catalog.ts`: provider descriptors (capabilities, default voice, i18n key, badge) and the GSV engine model list (`s1v3.ckpt` / `s2Gv2ProPlus.pth`)
|
|
9
|
+
- Settings renders mode tabs, fields and capabilities from the new `/dsh-gsv-tts/provider/catalog` endpoint instead of hard-coding provider branches; `isCloud`, key fields, local sections and default voice all derive from capabilities
|
|
10
|
+
- Route validation, `tts_list_voices` rendering and the provider migration guard read the same catalog; the client keeps a fallback catalog so switching still works if the endpoint is unavailable
|
|
11
|
+
- The config `provider` union is now generated from `providerIds()`; an unknown provider is no longer silently treated as gsv, and descriptor fallback looks up by id
|
|
12
|
+
- Voice validity (`voiceIdPattern`) and the default voice moved into the catalog: hard-coded Edge/DeepSeek checks became `isValidVoiceId` / `defaultVoiceFor`
|
|
13
|
+
|
|
14
|
+
### Pronunciation lexicon
|
|
15
|
+
- New `lexicon` config (multi-line `word=reading`, `#`/`//` comments) with a settings textarea
|
|
16
|
+
- New `src/lexicon.ts`: longest match first, ASCII case-insensitive, single pass without chaining, malformed lines skipped
|
|
17
|
+
- Applied after text cleaning and before segmentation, covering `tts_speak`, auto-read, full-audio reads and all three providers
|
|
18
|
+
- Per-mode sections (`[edge]` / `[deepseek]` / `[gsv]`) with the more specific scope overriding global; entries after an unknown section are skipped
|
|
19
|
+
- New `tts_lexicon_preview` tool and `/dsh-gsv-tts/lexicon/preview` route: text replacement preview only, no synthesis and no cost
|
|
20
|
+
|
|
21
|
+
### Explainable failures (tts_doctor)
|
|
22
|
+
- New `tts_doctor` tool plus `src/doctor.ts`: credential presence and source (plugin settings / Harness credentials / env), engine installed and running, missing models, last failure within 10 minutes, audio cache and lexicon rule count, with actionable hints (never returns a key)
|
|
23
|
+
- `/speak` failures and `tts_speak` tool errors record the last failure for diagnosis
|
|
24
|
+
- The last failure is persisted to a temp file so it survives a plugin reload, and every synthesis path (`synthesize` / `streamPcm` / full reads) now reports through `TTSService`
|
|
25
|
+
- New `deep=true` probe: validates the credential with the free `GET /models` instead of only checking presence
|
|
26
|
+
- Local mode now checks prerequisites (Python / gsv-tts-lite / repo) and includes the last 12 engine log lines in the report and hints
|
|
27
|
+
|
|
28
|
+
## [5.3.0] - 2026-11-14
|
|
29
|
+
|
|
30
|
+
### Official voices (DeepSeek TTS)
|
|
31
|
+
- Third TTS provider `deepseek`: calls `https://api.deepseek.com/v1/tools/tts` with voices `stella` and `tide`; language is auto-detected from the text
|
|
32
|
+
- New "Official (DeepSeek)" mode; **zero setup**: resolves the key from the Harness credentials service via `ctx.get('credentials')` using `deepseekApiKeyEnv` (default `DEEPSEEK_API_KEY`) — the same credential as model auth, so no re-pasting
|
|
33
|
+
- Optional `deepseekApiKey` overrides it (separate quota); a missing/unavailable credential service falls back to the same-named environment variable, and an empty reference name skips credentials entirely
|
|
34
|
+
- The API returns complete WAV audio: the provider extracts 16-bit PCM per request; short text is written as one WAV, while full reads stream to disk with RIFF/data sizes backfilled, so memory does not grow with text length
|
|
35
|
+
- Per-segment synthesis reports real duration (derived from sample format) for the progress bar
|
|
36
|
+
- "Full audio / download" supports official voices through `synthesizeLong` on `/speak/full`
|
|
37
|
+
- **Fix switching lag**: switching to Official Voices in settings took ~1s because the tab awaited a voices request while the health probe was a real 1–4s synthesis, queueing behind it. Now the tab switches locally with zero waiting, official voices come from a built-in list, the Edge list is cached, and health uses a free `GET /models` (measured 110–300ms, no billing)
|
|
38
|
+
- Persist `defaultVoice` together with `provider` on switch so a config snapshot refresh cannot reset the dropdown
|
|
39
|
+
- Official voices never start or warm up the local engine; a missing key produces an explicit health message instead of a silent failure
|
|
40
|
+
- **Not released**: wait for real-device quality / latency / billing checks before choosing a version number
|
|
41
|
+
|
|
5
42
|
## [5.2.0] - 2026-11-10
|
|
6
43
|
|
|
7
44
|
### Edge online endpoint
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-gsv-tts
|
|
2
2
|
|
|
3
|
-
> 为 DSH(DeepSeek Harness)接入语音朗读能力 ——
|
|
3
|
+
> 为 DSH(DeepSeek Harness)接入语音朗读能力 —— 三模式可选:**云端快速体验**(Edge,免安装、装上即听)+ **本地专业**(GSV-TTS-Lite,音色克隆、完全离线)+ **官方语音**(DeepSeek TTS,按字符计费、复用已有 Key)。
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|

|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|

|
|
9
9
|
[](https://awesome-dsh-plugin.com/p/TaoruiLiu19/dsh-gsv/)
|
|
10
10
|
[](https://taoruiliu19.github.io/gsv-market/)
|
|
11
|
+
[](https://dsh-insights.com/p/TaoruiLiu19/dsh-gsv/?utm_source=badge&utm_medium=readme&utm_campaign=TaoruiLiu19/dsh-gsv)
|
|
11
12
|
|
|
12
13
|
音色市场:[taoruiliu19.github.io/gsv-market](https://taoruiliu19.github.io/gsv-market/) · 投稿指南:[docs/VOICE_MARKET.md](docs/VOICE_MARKET.md)
|
|
13
14
|
|
|
@@ -18,11 +19,14 @@ English README: [README_EN.md](README_EN.md) · 变更记录: [CHANGELOG.md](CHA
|
|
|
18
19
|
## ✨ 功能亮点
|
|
19
20
|
|
|
20
21
|
- 🌐 **云端快速体验(Edge)**:**零配置、装上即用**,无需 Python / 模型 / 引擎;20+ 种免费自然语言音色(晓晓、云希、Aria 等),联网即用,出声较快
|
|
22
|
+
- ☁️ **官方语音(DeepSeek)**:官方 TTS 接口,音色 `stella`(海星)/ `tide`(暗潮),10 种语种按文本自动识别;按字符计费(刊例 3 元/万字符,汉字算 2 字符),复用已有 DeepSeek Key,**非默认模式**
|
|
21
23
|
- 🖥️ **本地专业(GSV)**:按参考音频**克隆目标音色**、**完全离线**;由云端简单模式一键升级引导而来
|
|
22
24
|
- 🔊 **一键朗读**:每条助手消息旁的 🔊 按钮直接朗读(自动排除思考内容);长回复**流式播放**(首块到达即出声,不再等整段合成完),带暂停/继续/停止与进度显示,正在朗读的消息会高亮
|
|
23
25
|
- ⚡ **首音更快**:可选**常驻模式(性能优先)**,插件加载后自动启动并预热默认音色;朗读走**流式 WAV**,长回复首音明显更快。默认**节能模式(资源优先)**,不后台占资源(与旧版一致)
|
|
24
26
|
- ⏩ **整段播放 / 下载 + 朗读选中**:朗读时点浮动面板的「整段」可生成可拖动进度、可下载的完整音频;选中聊天文字可单独朗读。默认朗读仍走流式,不会因此变慢
|
|
25
27
|
- 🔁 **自动朗读**:开启后自动朗读助手回复;新回复默认打断当前朗读(barge-in),可在设置中关闭
|
|
28
|
+
- 🗣️ **发音词典**:一行 `原词=读法` 修正多音字、缩写与专名(如 `DSH=DeepSeek`),支持按模式分节与零成本预览,**三种模式共用**
|
|
29
|
+
- 🩺 **一句诊断**:`tts_doctor` 直接告诉你凭据从哪来、引擎/模型缺什么、最近一次失败是什么、下一步该做什么
|
|
26
30
|
- 🔄 **模式切换**:设置面板一键在"快速体验 / 本地专业"间切换,音色与状态实时跟随
|
|
27
31
|
- 🎛️ **声音设置面板**:可视化配置,**保存即热生效**(无需重启);每条音色可"试听",或"全部试听"循环对比
|
|
28
32
|
- 🎪 **音色市场**:从内置/自定义远端清单**一键下载并注入音色**,试听后安装、只读托管;内置可信源免确认,远端源二次确认;欢迎[投稿](docs/VOICE_MARKET.md)分享你喜欢的音色
|
|
@@ -31,12 +35,13 @@ English README: [README_EN.md](README_EN.md) · 变更记录: [CHANGELOG.md](CHA
|
|
|
31
35
|
|
|
32
36
|
---
|
|
33
37
|
|
|
34
|
-
## 🎯
|
|
38
|
+
## 🎯 快速上手(三种模式,任选其一)
|
|
35
39
|
|
|
36
40
|
| 你的诉求 | 用哪种 | 怎么开始 |
|
|
37
41
|
|---|---|---|
|
|
38
42
|
| "我就想**装上就能听**" | 🌐 **快速体验(Edge)** | 见下方「一、快速体验模式」——**无需任何安装** |
|
|
39
43
|
| "我要**克隆自己的声音 / 完全离线**" | 🖥️ **本地专业(GSV)** | 见下方「二、本地专业模式」 |
|
|
44
|
+
| "我**已经有 DeepSeek Key**,想走官方通道" | ☁️ **官方语音(DeepSeek)** | 见下方「三、官方语音模式」——填 Key 即可,**按字符计费** |
|
|
40
45
|
|
|
41
46
|
> **默认模式**:全新安装默认为 **Edge 快速体验**(联网即用);**从旧版本升级的老用户仍保持 GSV 本地模式、声音不变**,可随时在设置面板切换。
|
|
42
47
|
>
|
|
@@ -62,6 +67,20 @@ English README: [README_EN.md](README_EN.md) · 变更记录: [CHANGELOG.md](CHA
|
|
|
62
67
|
|
|
63
68
|
> 本地模式全程离线运行,支持音色克隆,不依赖网络与云端配额。
|
|
64
69
|
|
|
70
|
+
### 三、官方语音模式(DeepSeek,按量计费)
|
|
71
|
+
|
|
72
|
+
1. 安装插件并重启 DSH
|
|
73
|
+
2. 打开 设置 → 声音设置 → **TTS 模式**选 **官方语音(DeepSeek)**
|
|
74
|
+
3. **无需填 Key**:插件默认复用 Harness 凭据服务里的 `DEEPSEEK_API_KEY`(就是模型设置里保存的那份,两者同一凭据);只有想用另一份额度时,才在“DeepSeek API Key”里手填覆盖
|
|
75
|
+
4. 音色下拉选 **海星(stella,女声)** 或 **暗潮(tide,男声)**,可先点「试听」对比
|
|
76
|
+
5. 点任意助手消息旁的 🔊,或让 agent 调用 `tts_speak`
|
|
77
|
+
|
|
78
|
+
> **复用了什么**:插件通过 `ctx.get('credentials')` 按引用名解析 Key(默认 `DEEPSEEK_API_KEY`,可在“凭据名称”里改)。所以 Harness 里能正常对话,这里就能直接朗读;如果 Harness 只用了账号登录、没有保存 API Key,健康提示会告诉你先去模型设置里保存 Key(或导出同名环境变量)。若 Harness 用 `DEEPSEEK_BASE_URL` 指向网关,插件也沿用该地址请求 `/v1/tools/tts`。
|
|
79
|
+
|
|
80
|
+
> **计费提醒**:官方接口按字符计费(刊例 3 元/万字符,汉字算 2 个字符,即 1000 汉字约 0.6 元;限时五折约 0.3 元)。开启**自动朗读**会持续产生费用,请按需开启。官方语音不支持调速、音色克隆与自定义音色,需要这些能力请用本地 GSV 模式。
|
|
81
|
+
>
|
|
82
|
+
> **Key 存储**:默认不往插件配置写 Key——用的是 Harness 凭据存储里的那份(`.credentials.yaml`,本就由 Harness 明文管理);手填的 Key 才会进入插件配置。
|
|
83
|
+
|
|
65
84
|
## 📦 安装
|
|
66
85
|
|
|
67
86
|
两种方式任选其一,然后在设置中启用:
|
|
@@ -86,33 +105,36 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
86
105
|
|
|
87
106
|
| 项 | 说明 |
|
|
88
107
|
|---|---|
|
|
89
|
-
| 如何切换 | 设置 → 声音设置 → **TTS 模式**(快速体验 / 本地专业),切换即时生效 |
|
|
90
|
-
| 配置项 | `provider: 'edge' \| 'gsv'
|
|
108
|
+
| 如何切换 | 设置 → 声音设置 → **TTS 模式**(快速体验 / 官方语音 / 本地专业),切换即时生效 |
|
|
109
|
+
| 配置项 | `provider: 'edge' \| 'deepseek' \| 'gsv'`(建议经设置面板切换,勿手动改) |
|
|
91
110
|
| 老用户升级 | 无 `provider` 字段的旧配置:**有音色预设 → 保持 `gsv` 本地模式,声音不变** |
|
|
92
111
|
| 全新安装 | 无音色预设 → 默认 `edge` 云端简单模式,联网即用 |
|
|
93
112
|
| 写入时机 | 首次启动判定后写回一次(`settings.update`),之后不再改写 |
|
|
94
113
|
| `schemaVersion` | 配置结构版本,迁移守卫的落点 |
|
|
95
114
|
|
|
96
|
-
> Edge
|
|
115
|
+
> Edge / 官方语音模式需联网;若云端不可用,面板会提示"云端通道拥挤 / 暂不可用",本地 GSV 模式始终可用作降级。
|
|
97
116
|
|
|
98
117
|
---
|
|
99
118
|
|
|
100
119
|
## 🏗️ 系统架构
|
|
101
120
|
|
|
102
|
-

|
|
103
122
|
|
|
104
123
|
> 📖 交互式架构图:[打开 dsh-gsv-tts.architecture.html](docs/architecture/dsh-gsv-tts.architecture.html)(支持缩放、聚焦、主题切换)
|
|
105
124
|
|
|
106
|
-
|
|
125
|
+
**三 provider 架构**:`TTSService` 按 `config.provider` 分发到云端(Edge)、官方(DeepSeek)或本地(GSV),朗读主链路与工具调用两条路径对三种 provider 一致。
|
|
107
126
|
|
|
108
|
-
- 🔊 **朗读主链路(经 webServer)**:用户点击 🔊 → DSH Web 客户端 → `webServer` 的 `/speak` 路由 → `TTSService` 按 provider 请求 →
|
|
127
|
+
- 🔊 **朗读主链路(经 webServer)**:用户点击 🔊 → DSH Web 客户端 → `webServer` 的 `/speak` 路由 → `TTSService` 按 provider 请求 → 云端 / 官方 / 本地引擎返回音频 → `AudioStore` 落盘 → 同源短链接回传浏览器播放(首段 30 字,逐段即到即播)。
|
|
109
128
|
- 🤖 **Agent 工具调用(宿主内直连)**:Agent 调用 `tts_speak` 等工具时,由宿主进程内 tools 服务**直接**执行,**不经 webServer HTTP 网关**。
|
|
129
|
+
- 🔑 **凭据复用**:官方语音通过 Harness 的 `ctx.get('credentials')` 解析 `DEEPSEEK_API_KEY`,与模型鉴权同一份凭据,插件配置里不落 Key。
|
|
130
|
+
- 🧭 **目录驱动**:`src/catalog.ts` 是 provider 能力(是否需要引擎/凭据、是否计费、音色来源、默认音色)与本地引擎模型清单的唯一事实源;客户端从 `/provider/catalog` 渲染模式 Tab 与字段,服务端路由校验、工具渲染与迁移守卫读同一份描述符。
|
|
110
131
|
|
|
111
132
|
| 构成 | 说明 |
|
|
112
133
|
|------|------|
|
|
113
|
-
| DSH 应用(DeepSeek Harness) | 插件宿主:Web 客户端、webServer、settings
|
|
134
|
+
| DSH 应用(DeepSeek Harness) | 插件宿主:Web 客户端、webServer、settings 服务、credentials 凭据服务 |
|
|
114
135
|
| dsh-gsv-tts 插件 | `TTSService`(按 provider 分发)/ `AudioStore`(落盘)/ 引擎管理(启停·安装·健康检查) |
|
|
115
136
|
| Edge provider | `edge-tts-universal`,微软精选网络音色,返回 MP3 流(浏览器解码) |
|
|
137
|
+
| DeepSeek provider | 官方 `POST /v1/tools/tts`,海星 / 暗潮两个音色,返回 16-bit PCM WAV(重新装头落盘,长文本边收边写) |
|
|
116
138
|
| GSV-TTS-Lite 本地引擎 | 本机 Python 进程,FastAPI :9880,真流式 `/tts/stream`,返回 WAV |
|
|
117
139
|
|
|
118
140
|
## 📸 截图
|
|
@@ -204,17 +226,20 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
204
226
|
|
|
205
227
|
| 字段 | 说明 | 默认值 |
|
|
206
228
|
|------|------|--------|
|
|
207
|
-
| TTS 模式 | 快速体验(Edge 云端,免安装)/ 本地专业(GSV,离线/克隆) | 老用户 `gsv` / 新装 `edge` |
|
|
229
|
+
| TTS 模式 | 快速体验(Edge 云端,免安装)/ 官方语音(DeepSeek,按量计费)/ 本地专业(GSV,离线/克隆) | 老用户 `gsv` / 新装 `edge` |
|
|
208
230
|
| 引擎开关 | 启动/停止 GSV-TTS-Lite 引擎进程 | 关 |
|
|
209
231
|
| `engineMode` | 引擎启动方式:`always` 常驻模式(性能优先,自动启动+预热)/ `eco` 节能模式(资源优先,不后台启动,与旧版一致) | `eco` |
|
|
210
232
|
| `apiUrl` | 引擎 API 地址 | `http://localhost:9880` |
|
|
211
|
-
| `defaultVoice` | 默认音色(gsv=预设名 / edge=云端音色 id
|
|
233
|
+
| `defaultVoice` | 默认音色(gsv=预设名 / edge=云端音色 id / deepseek=`stella`\|`tide`,留空用第一个) | 空 |
|
|
234
|
+
| `deepseekApiKey` | 可选:手填 API Key,覆盖 Harness 凭据(用另一份额度时填) | 空 |
|
|
235
|
+
| `deepseekApiKeyEnv` | 凭据引用名,决定复用 Harness 里的哪份 Key;留空则不查凭据服务 | `DEEPSEEK_API_KEY` |
|
|
212
236
|
| `timeout` | 请求超时(毫秒) | `30000` |
|
|
213
237
|
| `installDir` | 引擎安装目录 | `./GSV-TTS-Lite` |
|
|
214
238
|
| `autoPlay` | 自动朗读助手回复 | `false` |
|
|
215
239
|
| `interruptOnNew` | 自动朗读时新回复是否打断当前朗读(关闭则朗读中跳过,避免叠音) | `true` |
|
|
240
|
+
| `lexicon` | 发音词典(多行 `原词=读法`,`[deepseek]/[gsv]/[edge]` 分节,`#` 注释),所有模式生效 | 空 |
|
|
216
241
|
| `voiceRegistryUrl` | 音色市场远端清单地址(默认指向在线试听站点;留空仅用包内离线清单) | 站点 URL |
|
|
217
|
-
| `provider` | `gsv` \| `edge
|
|
242
|
+
| `provider` | `gsv` \| `edge` \| `deepseek`(勿手动改;设置面板切换) | 见"TTS 模式" |
|
|
218
243
|
| `schemaVersion` | 配置结构版本(迁移守卫落点) | `1` |
|
|
219
244
|
| `quotaDaily` | 云端简单模式每日配额(`null`=不限量,仅引导用) | `null` |
|
|
220
245
|
| `voices` | 音色预设列表 | 空 |
|
|
@@ -230,6 +255,44 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
230
255
|
|
|
231
256
|
配置保存在当前 profile 的配置层(`~/.dsh/profiles/<profile>/cordis.patch.yml` 的 `dsh-gsv-tts:` 条目)。DSH 0.2 起这些字段是 **volatile 配置**:设置面板保存后宿主就地更新配置引用,插件无需重载即可读到新值。
|
|
232
257
|
|
|
258
|
+
### 发音词典怎么用
|
|
259
|
+
|
|
260
|
+
设置 → 声音设置 → **发音词典**,一行一条,保存即生效;支持按模式分节:
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
# 注释行以 # 或 // 开头;未分节的规则对所有模式生效
|
|
264
|
+
DSH=DeepSeek
|
|
265
|
+
|
|
266
|
+
[deepseek]
|
|
267
|
+
API=A P I
|
|
268
|
+
|
|
269
|
+
[gsv]
|
|
270
|
+
GSV=G S V
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
规则(参考 VoiceStudio 的词典设计):
|
|
274
|
+
|
|
275
|
+
- `原词=读法`(也接受 `=>`),**字面匹配**,不是正则;
|
|
276
|
+
- Unicode 大小写不敏感(中文不受影响);
|
|
277
|
+
- **长词优先**;同长度时**后写的优先**;
|
|
278
|
+
- 更具体的作用域优先:`[deepseek]` 的同名条目覆盖全局;
|
|
279
|
+
- 只扫描一次,替换结果不会被再次替换(不会 A→B→C 链式)。
|
|
280
|
+
|
|
281
|
+
词典在文本清洗之后、分段之前应用,所以三种模式、`tts_speak`、自动朗读、整段朗读全部生效。想确认某句话会被读成什么,可以不合成、零成本地预览:
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
tts_lexicon_preview text="DSH 和 GSV 怎么读"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### 没声音时先跑 `tts_doctor`
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
tts_doctor # 本地事实:凭据、引擎、模型、最近失败
|
|
291
|
+
tts_doctor deep=true # 额外调用免费 GET /models 验证凭据(不产生合成费用)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
输出包括:当前模式、凭据是否配置及来源(插件设置 / Harness 凭据服务 / 环境变量)、**深度探活结果**、引擎是否安装与运行、缺失的模型文件、**Python / pip 包 / 仓库等前置条件**、最近 10 分钟失败、**引擎日志末尾几行**、音频缓存数量与词典规则数,以及按事实给出的修复建议(例如“未安装:tts_setup_engine”“模型缺失:s1v3.ckpt”)。它**不会返回任何密钥**。
|
|
295
|
+
|
|
233
296
|
## 🧰 工具列表
|
|
234
297
|
|
|
235
298
|
| 工具 | 功能 |
|
|
@@ -237,6 +300,8 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
237
300
|
| `tts_speak` | 文本转语音;按当前 provider 与音色选择,流式合成返回同源短链接 |
|
|
238
301
|
| `tts_list_voices` | 列出当前 provider 可用音色 |
|
|
239
302
|
| `tts_health_check` | 检查当前 provider(引擎/云端)状态 |
|
|
303
|
+
| `tts_doctor` | 诊断“为什么没声音”:凭据来源、引擎/模型/前置条件、最近失败与修复建议;`deep=true` 免费探活 |
|
|
304
|
+
| `tts_lexicon_preview` | 预览发音词典会把文本读成什么(只替换、不合成、不产生费用) |
|
|
240
305
|
| `tts_setup_engine` | 一键安装本地 GSV-TTS-Lite 引擎 |
|
|
241
306
|
|
|
242
307
|
## ❓ 常见问题
|
|
@@ -256,6 +321,7 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
256
321
|
- 配置 Schema:`@deepseek-ai/schemastery`(volatile 字段 + 就地热更新)
|
|
257
322
|
- 设置面板:宿主 `settings` 服务(`describe`/`update`)+ 客户端 `configForms` 服务 + `settings.section` 插槽
|
|
258
323
|
- 云端 Provider:`edge-tts-universal`(微软网络音色,MP3 流)
|
|
324
|
+
- 官方 Provider:DeepSeek 官方 TTS(`/v1/tools/tts`,WAV),凭据走 Harness `credentials` 服务
|
|
259
325
|
- 本地引擎:GSV-TTS-Lite 0.4.7
|
|
260
326
|
- 语言:TypeScript(宿主)/ 手写客户端 bundle(浏览器)/ Python(本地流式 API)
|
|
261
327
|
|
|
@@ -280,6 +346,8 @@ pnpm publish # 发布到 npm(files: lib, scripts, cordis.patch.yml)
|
|
|
280
346
|
- 播放为 markdown 链接点击播放;内嵌 `<audio>` 需客户端扩展(规划中)
|
|
281
347
|
- 合成音频存于系统临时目录(`%TEMP%/dsh-gsv-tts`),启动清空、会话内最多 200 个
|
|
282
348
|
- Edge 云端模式依赖网络;微软限量限流时可能不可用(已有降级引导)
|
|
349
|
+
- 官方语音按字符计费(约 0.3 元/千汉字),且不支持调速、音色克隆与自定义音色;自动朗读会持续产生费用
|
|
350
|
+
- 官方语音需要 Harness 里已保存 `DEEPSEEK_API_KEY`(或同名环境变量);只用账号登录、没有 API Key 时会提示补 Key
|
|
283
351
|
- `tts_setup_engine` 通过 `child_process` 执行 pip/git,需环境有对应工具
|
|
284
352
|
- `promptText` 留空依赖引擎 ASR 能力(能力探测),不支持时合成报错
|
|
285
353
|
|
package/README_EN.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-gsv-tts
|
|
2
2
|
|
|
3
|
-
> Adds text-to-speech read-aloud to DSH (DeepSeek Harness) —
|
|
3
|
+
> Adds text-to-speech read-aloud to DSH (DeepSeek Harness) — three modes: **Cloud Quick Mode** (Edge, zero install, read as soon as it's added) + **Local Pro Mode** (GSV-TTS-Lite, voice cloning, fully offline) + **Official Voices** (DeepSeek TTS, billed per character, reuses your existing key).
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|

|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|

|
|
9
9
|
[](https://awesome-dsh-plugin.com/p/TaoruiLiu19/dsh-gsv/)
|
|
10
10
|
[](https://taoruiliu19.github.io/gsv-market/)
|
|
11
|
+
[](https://dsh-insights.com/p/TaoruiLiu19/dsh-gsv/?utm_source=badge&utm_medium=readme&utm_campaign=TaoruiLiu19/dsh-gsv)
|
|
11
12
|
|
|
12
13
|
Voice Market: [taoruiliu19.github.io/gsv-market](https://taoruiliu19.github.io/gsv-market/) · Submission guide: [docs/VOICE_MARKET.md](docs/VOICE_MARKET.md)
|
|
13
14
|
|
|
@@ -18,11 +19,14 @@ Voice Market: [taoruiliu19.github.io/gsv-market](https://taoruiliu19.github.io/g
|
|
|
18
19
|
## ✨ Features
|
|
19
20
|
|
|
20
21
|
- 🌐 **Cloud Quick Mode (Edge)**: **zero configuration, ready to use** — no Python / models / engines needed; 20+ free natural voices (Xiaoxiao, Yunxi, Aria, etc.), online and fast to first audio
|
|
22
|
+
- ☁️ **Official Voices (DeepSeek)**: the official TTS endpoint with `stella` (female) and `tide` (male), auto-detecting 10 languages; billed per character (CNY 3 per 10k characters, a Chinese character counts as 2), reusing your DeepSeek key — **not the default mode**
|
|
21
23
|
- 🖥️ **Local Pro Mode (GSV)**: **clone a target voice from a reference audio**, **fully offline**; guided one-step upgrade from Cloud Quick Mode
|
|
22
24
|
- 🔊 **One-click read-aloud**: a 🔊 button next to every assistant message (reasoning content excluded); long replies are **streamed** (first chunk starts playback; no need to wait for the whole reply), with Pause/Resume/Stop controls, a progress readout, and a highlight on the message being read
|
|
23
25
|
- ⚡ **Faster first audio**: **Always-on mode (performance)** starts and pre-warms the engine with the plugin; read-aloud uses a **streaming WAV**, so first audio on long replies is much faster. The default **Eco mode (resources first)** does not run in the background, same as before
|
|
24
26
|
- ⏩ **Full audio / download + read selection**: the floating player offers a "Full" action that produces a seekable, downloadable complete audio file; selected chat text can be read on its own. Normal read-aloud still streams, so first audio is unchanged
|
|
25
27
|
- 🔁 **Auto-read**: automatically reads assistant replies; new replies interrupt the current read by default (barge-in), toggleable in settings
|
|
28
|
+
- 🗣️ **Pronunciation lexicon**: one `word=reading` per line fixes polyphones, acronyms and names (e.g. `DSH=DeepSeek`); per-mode sections and a zero-cost preview, shared by **all three modes**
|
|
29
|
+
- 🩺 **One-command diagnosis**: `tts_doctor` reports the credential source, engine/model gaps, the last failure and the next action
|
|
26
30
|
- 🔄 **Mode switching**: one click in the settings panel between "Quick / Local Pro"; voices and status follow live
|
|
27
31
|
- 🎛️ **Voice Settings panel**: configure everything visually, **hot-applied** (no restart); preview any voice individually or loop-preview all for comparison
|
|
28
32
|
- 🎪 **Voice Market**: **one-click download and injection** of voices from the bundled or a custom remote manifest, with preview-before-install and read-only management; bundled trusted sources install without confirmation, remote sources require a second confirmation; [submit your favorite voices](docs/VOICE_MARKET.md)
|
|
@@ -31,12 +35,13 @@ Voice Market: [taoruiliu19.github.io/gsv-market](https://taoruiliu19.github.io/g
|
|
|
31
35
|
|
|
32
36
|
---
|
|
33
37
|
|
|
34
|
-
## 🎯 Quick Start (
|
|
38
|
+
## 🎯 Quick Start (any of the three modes)
|
|
35
39
|
|
|
36
40
|
| What you want | Which mode | How to begin |
|
|
37
41
|
|---|---|---|
|
|
38
42
|
| "I just want it to **read as soon as it's installed**" | 🌐 **Quick Mode (Edge)** | See "Quick Mode (Edge)" below — **no installation needed** |
|
|
39
43
|
| "I want to **clone my own voice / be fully offline**" | 🖥️ **Local Pro Mode (GSV)** | See "Local Pro Mode (GSV)" below |
|
|
44
|
+
| "I **already have a DeepSeek key** and want the official channel" | ☁️ **Official Voices (DeepSeek)** | See "Official Voices (DeepSeek)" below — paste the key, **billed per character** |
|
|
40
45
|
|
|
41
46
|
> **Default mode**: fresh installs default to **Edge Quick Mode** (works online); **existing users upgrading keep GSV local mode with voices unchanged**, and can switch anytime in the settings panel.
|
|
42
47
|
>
|
|
@@ -62,6 +67,20 @@ Voice Market: [taoruiliu19.github.io/gsv-market](https://taoruiliu19.github.io/g
|
|
|
62
67
|
|
|
63
68
|
> Local Pro mode runs fully offline and supports voice cloning — independent of network and cloud quotas.
|
|
64
69
|
|
|
70
|
+
### Official Voices (DeepSeek, billed per character)
|
|
71
|
+
|
|
72
|
+
1. Install the plugin and restart DSH
|
|
73
|
+
2. Open Settings → Voice Settings → **TTS Mode** → select **Official (DeepSeek)**
|
|
74
|
+
3. **No key needed**: the plugin resolves `DEEPSEEK_API_KEY` from the Harness credentials service by default — the same credential saved in model settings. Fill the optional key field only to bill a different quota
|
|
75
|
+
4. Pick **Stella (female)** or **Tide (male)**; use "Preview" to compare them
|
|
76
|
+
5. Click the 🔊 next to any assistant message, or have the agent call `tts_speak`
|
|
77
|
+
|
|
78
|
+
> **What is reused**: `ctx.get('credentials')` resolves the key by reference name (default `DEEPSEEK_API_KEY`, editable under "Credential name"). If the Harness only uses account sign-in with no API key stored, the health line tells you to save a key in model settings (or export the env var).
|
|
79
|
+
>
|
|
80
|
+
> **Billing**: the official endpoint charges per character (CNY 3 per 10k characters; a Chinese character counts as 2, so ~CNY 0.6 per 1000 Chinese characters, ~CNY 0.3 at the current 50% discount). **Auto-read keeps generating cost** — enable it deliberately. Official voices do not support rate control, cloning or custom voices; use Local Pro for those.
|
|
81
|
+
>
|
|
82
|
+
> **Key storage**: nothing is written to the plugin config by default — the Harness credential store (`.credentials.yaml`, already managed by the Harness) supplies the key; only a manually entered key lands in plugin config.
|
|
83
|
+
|
|
65
84
|
## 📦 Installation
|
|
66
85
|
|
|
67
86
|
Choose one of the two methods, then enable it in Settings:
|
|
@@ -86,8 +105,8 @@ After installing, restart DSH. The tools register automatically and a "Voice Set
|
|
|
86
105
|
|
|
87
106
|
| Item | Description |
|
|
88
107
|
|---|---|
|
|
89
|
-
| How to switch | Settings → Voice Settings → **TTS Mode** (Quick / Local Pro), applied instantly |
|
|
90
|
-
| Config field | `provider: 'edge' \| 'gsv'` (
|
|
108
|
+
| How to switch | Settings → Voice Settings → **TTS Mode** (Quick / Official / Local Pro), applied instantly |
|
|
109
|
+
| Config field | `provider: 'edge' \| 'deepseek' \| 'gsv'` (switch from the settings panel rather than editing manually) |
|
|
91
110
|
| Existing users upgrading | Old config with no `provider` field: **voices present → stays `gsv` local mode, voices unchanged** |
|
|
92
111
|
| Fresh installs | No voices → defaults to `edge` cloud Quick mode, ready online |
|
|
93
112
|
| When it is written | Resolved once on first boot and persisted via `settings.update`; never rewritten afterwards |
|
|
@@ -99,20 +118,23 @@ After installing, restart DSH. The tools register automatically and a "Voice Set
|
|
|
99
118
|
|
|
100
119
|
## 🏗️ Architecture
|
|
101
120
|
|
|
102
|
-

|
|
121
|
+

|
|
103
122
|
|
|
104
123
|
> 📖 Interactive diagram: [open dsh-gsv-tts.architecture.html](docs/architecture/dsh-gsv-tts.architecture.html) (zoom, focus, theme switching)
|
|
105
124
|
|
|
106
|
-
**
|
|
125
|
+
**Three-provider architecture**: `TTSService` dispatches to the cloud (Edge), official (DeepSeek), or local (GSV) provider by `config.provider`; the read-aloud main path and the tool-call path are identical for all three.
|
|
107
126
|
|
|
108
|
-
- 🔊 **Read-aloud path (via webServer)**: user clicks 🔊 → DSH Web client → the `webServer` `/speak` route → `TTSService` requests via the active provider → cloud/local engine returns audio
|
|
127
|
+
- 🔊 **Read-aloud path (via webServer)**: user clicks 🔊 → DSH Web client → the `webServer` `/speak` route → `TTSService` requests via the active provider → cloud / official / local engine returns audio → `AudioStore` saves it → a same-origin short link is returned to the browser (first segment is 30 chars, so playback starts early).
|
|
109
128
|
- 🤖 **Agent tool calls (in-process, direct)**: when the agent calls `tts_speak` and friends, the host's in-process tools service executes the plugin logic **directly — no webServer HTTP gateway involved**.
|
|
129
|
+
- 🔑 **Credential reuse**: Official Voices resolves `DEEPSEEK_API_KEY` through the Harness `ctx.get('credentials')` service — the same credential as model auth, so no key is stored in plugin config.
|
|
130
|
+
- 🧭 **Catalog-driven**: `src/catalog.ts` is the single source of truth for provider capabilities (engine/key/billing/voice source/default voice) and the local engine model list; the client renders mode tabs and fields from `/provider/catalog`, and routes, tools and migration read the same descriptors.
|
|
110
131
|
|
|
111
132
|
| Part | Description |
|
|
112
133
|
|------|-------------|
|
|
113
|
-
| DSH app (DeepSeek Harness) | Plugin host: Web client, webServer, settings service |
|
|
134
|
+
| DSH app (DeepSeek Harness) | Plugin host: Web client, webServer, settings service, credentials service |
|
|
114
135
|
| dsh-gsv-tts plugin | `TTSService` (provider dispatch) / `AudioStore` (storage) / engine manager (start-stop · setup · health check) |
|
|
115
136
|
| Edge provider | `edge-tts-universal`, curated Microsoft web voices, returns an MP3 stream (decoded by the browser) |
|
|
137
|
+
| DeepSeek provider | Official `POST /v1/tools/tts`, Stella/Tide voices, returns 16-bit PCM WAV (re-wrapped and written to disk) |
|
|
116
138
|
| GSV-TTS-Lite local engine | Local Python process, FastAPI :9880, true streaming `/tts/stream`, returns WAV |
|
|
117
139
|
|
|
118
140
|
## 📸 Screenshots
|
|
@@ -204,17 +226,20 @@ Download and inject voices from the Voice Market in one click — no need to fil
|
|
|
204
226
|
|
|
205
227
|
| Field | Description | Default |
|
|
206
228
|
|-------|-------------|---------|
|
|
207
|
-
| TTS Mode | Quick (Edge cloud, zero setup) / Local Pro (GSV, offline & cloning) | existing users `gsv` / fresh installs `edge` |
|
|
229
|
+
| TTS Mode | Quick (Edge cloud, zero setup) / Official (DeepSeek, billed) / Local Pro (GSV, offline & cloning) | existing users `gsv` / fresh installs `edge` |
|
|
208
230
|
| Engine switch | Start/stop the GSV-TTS-Lite engine process | Off |
|
|
209
231
|
| `engineMode` | Engine startup: `always` = Always-on (performance, auto-start + pre-warm) / `eco` = Eco (resources first, no background start, same as before) | `eco` |
|
|
210
232
|
| `apiUrl` | Engine API URL | `http://localhost:9880` |
|
|
211
|
-
| `defaultVoice` | Default voice (gsv=preset name / edge=cloud voice id
|
|
233
|
+
| `defaultVoice` | Default voice (gsv=preset name / edge=cloud voice id / deepseek=`stella`\|`tide`; empty = first) | empty |
|
|
234
|
+
| `deepseekApiKey` | Optional manual key that overrides the Harness credential | empty |
|
|
235
|
+
| `deepseekApiKeyEnv` | Credential reference name; empty skips the credential service | `DEEPSEEK_API_KEY` |
|
|
212
236
|
| `timeout` | Request timeout (ms) | `30000` |
|
|
213
237
|
| `installDir` | Engine install directory | `./GSV-TTS-Lite` |
|
|
214
238
|
| `autoPlay` | Auto-read assistant replies | `false` |
|
|
215
239
|
| `interruptOnNew` | Whether new replies interrupt the current read in auto-read mode (off = skip new replies while reading to avoid overlap) | `true` |
|
|
240
|
+
| `lexicon` | Pronunciation lexicon (multi-line `word=reading`, `[deepseek]/[gsv]/[edge]` sections, `#` comments), applies to every mode | empty |
|
|
216
241
|
| `voiceRegistryUrl` | Remote voice-market manifest URL (defaults to the online audition site; empty = bundled offline only) | site URL |
|
|
217
|
-
| `provider` | `gsv` \| `edge`
|
|
242
|
+
| `provider` | `gsv` \| `edge` \| `deepseek` (switch in the settings panel) | see "TTS Mode" |
|
|
218
243
|
| `schemaVersion` | Config schema version (migration guard marker) | `1` |
|
|
219
244
|
| `quotaDaily` | Daily quota for cloud simple mode (`null` = unlimited; guidance only) | `null` |
|
|
220
245
|
| `voices` | Voice preset list | empty |
|
|
@@ -230,12 +255,52 @@ Download and inject voices from the Voice Market in one click — no need to fil
|
|
|
230
255
|
|
|
231
256
|
Config is stored in the active profile's config layer (the `dsh-gsv-tts:` entry of `~/.dsh/profiles/<profile>/cordis.patch.yml`). Since DSH 0.2 these fields are **volatile config**: a settings save updates the config references in place, so the plugin reads the new values without a reload.
|
|
232
257
|
|
|
258
|
+
### Using the pronunciation lexicon
|
|
259
|
+
|
|
260
|
+
Settings → Voice Settings → **Pronunciation lexicon**: one entry per line, applied on save.
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
# lines starting with # or // are comments; unsectioned entries apply everywhere
|
|
264
|
+
DSH=DeepSeek
|
|
265
|
+
|
|
266
|
+
[deepseek]
|
|
267
|
+
API=A P I
|
|
268
|
+
|
|
269
|
+
[gsv]
|
|
270
|
+
GSV=G S V
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Rules (borrowing VoiceStudio's dictionary design):
|
|
274
|
+
|
|
275
|
+
- `word=reading` (or `=>`), matched **literally**, not as regex;
|
|
276
|
+
- Unicode case-insensitive (CJK unaffected);
|
|
277
|
+
- **longest match wins**; for equal length, **the later entry wins**;
|
|
278
|
+
- a more specific scope wins: `[deepseek]` overrides the global entry of the same word;
|
|
279
|
+
- a single pass only (no A→B→C chaining).
|
|
280
|
+
|
|
281
|
+
It runs after text cleaning and before segmentation, so all three modes, `tts_speak`, auto-read and full-audio reads pick it up. To check what a sentence will actually say without synthesizing (zero cost):
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
tts_lexicon_preview text="how do DSH and GSV sound"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### When there is no sound, run `tts_doctor`
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
tts_doctor # local facts: credential, engine, models, last failure
|
|
291
|
+
tts_doctor deep=true # also validates the key via the free GET /models (no synthesis cost)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
It reports the active mode, credential presence and source (plugin settings / Harness credentials / environment), the **deep probe result**, whether the engine is installed and running, missing model files, **Python / pip package / repo prerequisites**, the most recent failure (within 10 minutes), **the tail of the engine log**, audio-cache count and lexicon rule count, plus concrete next steps (e.g. "not installed: run tts_setup_engine", "missing model: s1v3.ckpt"). It **never returns a key**.
|
|
295
|
+
|
|
233
296
|
## 🧰 Tools
|
|
234
297
|
|
|
235
298
|
| Tool | Purpose |
|
|
236
299
|
|------|---------|
|
|
237
300
|
| `tts_speak` | Text-to-speech; uses the active provider & voice, streams, returns a same-origin short link |
|
|
238
301
|
| `tts_list_voices` | List voices available for the active provider |
|
|
302
|
+
| `tts_doctor` | Diagnose "why is there no sound": credential source, engine/model/prerequisites, last failure, next steps; `deep=true` probes free |
|
|
303
|
+
| `tts_lexicon_preview` | Preview what the pronunciation lexicon will read (replace only, no synthesis, no cost) |
|
|
239
304
|
| `tts_health_check` | Check the active provider (engine/cloud) status |
|
|
240
305
|
| `tts_setup_engine` | One-click GSV-TTS-Lite engine installation |
|
|
241
306
|
|
|
@@ -256,6 +321,7 @@ Config is stored in the active profile's config layer (the `dsh-gsv-tts:` entry
|
|
|
256
321
|
- Config schema: `@deepseek-ai/schemastery` (volatile fields with in-place live updates)
|
|
257
322
|
- Settings panel: host `settings` service (`describe`/`update`) + client `configForms` service + `settings.section` slots
|
|
258
323
|
- Cloud provider: `edge-tts-universal` (Microsoft web voices, MP3 stream)
|
|
324
|
+
- Official provider: DeepSeek TTS (`/v1/tools/tts`, WAV), credentials from the Harness `credentials` service
|
|
259
325
|
- Local engine: GSV-TTS-Lite 0.4.7
|
|
260
326
|
- Languages: TypeScript (host) / hand-written client bundle (browser) / Python (streaming API)
|
|
261
327
|
|
|
@@ -280,6 +346,8 @@ Full release history: [CHANGELOG_EN.md](CHANGELOG_EN.md).
|
|
|
280
346
|
- Playback is a clickable markdown link; inline `<audio>` playback needs a client extension (planned)
|
|
281
347
|
- Generated audio lives in the system temp dir (`%TEMP%/dsh-gsv-tts`), purged on startup, capped at 200 files per session
|
|
282
348
|
- Edge cloud mode depends on network; when Microsoft rate-limits, it may be unavailable (already has a downgrade guide)
|
|
349
|
+
- Official Voices bill per character (~CNY 0.3 per 1000 Chinese characters) and support neither rate control nor cloning; auto-read keeps generating cost
|
|
350
|
+
- Official Voices need `DEEPSEEK_API_KEY` saved in the Harness (or the same-named env var); account-only sign-in prompts for a key
|
|
283
351
|
- `tts_setup_engine` shells out to pip/git; those tools must be available
|
|
284
352
|
- Empty `promptText` relies on the engine's ASR capability (capability-probed); synthesis fails with a clear error when unsupported
|
|
285
353
|
|
|
Binary file
|