dsh-gsv-tts 2.3.2 → 2.5.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 +74 -0
- package/CHANGELOG_EN.md +74 -0
- package/README.md +58 -32
- package/README_EN.md +58 -32
- package/docs/images/architecture.png +0 -0
- package/lib/client.js +283 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +110 -15
- package/lib/index.js.map +1 -1
- package/lib/segmenter.d.ts +10 -0
- package/lib/segmenter.d.ts.map +1 -0
- package/lib/segmenter.js +50 -0
- package/lib/segmenter.js.map +1 -0
- package/lib/text-cleaner.d.ts +6 -0
- package/lib/text-cleaner.d.ts.map +1 -1
- package/lib/text-cleaner.js +10 -0
- package/lib/text-cleaner.js.map +1 -1
- package/lib/tts.service.d.ts +7 -1
- package/lib/tts.service.d.ts.map +1 -1
- package/lib/tts.service.js +42 -3
- package/lib/tts.service.js.map +1 -1
- package/lib/types.d.ts +20 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +8 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# 变更记录
|
|
2
|
+
|
|
3
|
+
本文件记录 dsh-gsv-tts 的所有版本更新。格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
|
+
|
|
5
|
+
## [2.5.0] - 2026-08-29
|
|
6
|
+
|
|
7
|
+
### 朗读净化补全(P0-1)
|
|
8
|
+
- 过滤 markdown 表格(数据行与分隔行),只读表格外的正文
|
|
9
|
+
- 超长文本保护:`tts_speak` 单段上限 6000 字符,朗读/自动朗读分段上限 30000 字符,超限给出友好提示
|
|
10
|
+
- 空文本判断与合成口径统一:清洗后为空(只有代码/链接/表格)的回复返回明确提示
|
|
11
|
+
- 新增单元测试(`npm test`,基于 node:test,零新增依赖):净化器与句切分器
|
|
12
|
+
|
|
13
|
+
### 渐进分段播放(P1-1)
|
|
14
|
+
- 服务端新增 `TTSService.synthesizeSegments`:按句切分(中文句末标点、顿号 + 英文句点,单段 ≤ 800 字)逐段流式合成,段间 0 静音
|
|
15
|
+
- `/dsh-gsv-tts/speak` 返回可顺序播放的 URL 队列(`segments`),兼容旧单 URL 字段
|
|
16
|
+
- 前端播放器按 `<audio>` ended 事件自动续播下一段——长回复不再等整段合成完才出声
|
|
17
|
+
|
|
18
|
+
### 朗读控件(P1-2)
|
|
19
|
+
- 朗读按钮新增 暂停 / 继续 / 停止 三键,作用于整个分段队列(记录当前段 + 段内时间)
|
|
20
|
+
- 显示朗读进度(已播 / 总时长 + 段序号)
|
|
21
|
+
- 高亮正在朗读的那条消息(呼吸边框)
|
|
22
|
+
|
|
23
|
+
### 自动朗读打断(P0-2)
|
|
24
|
+
- 自动朗读改为"通知 → 前端按需合成播放":服务端递增 seq,前端轮询感知新回复
|
|
25
|
+
- 新回复到来时默认打断当前朗读(barge-in);设置中可关闭 `interruptOnNew`,朗读中跳过新回复避免叠音
|
|
26
|
+
|
|
27
|
+
## [2.3.2] - 2026-08-28
|
|
28
|
+
|
|
29
|
+
- 对齐 `@deepseek-ai/dsh-tools` peer 依赖范围(`^0.1.0-rc.6`),与 lockfile 一致
|
|
30
|
+
- CI:`pnpm/action-setup` 从 `packageManager` 字段读取版本
|
|
31
|
+
- 文档:README 补充 CI/npm 徽章与 2.3.x 变更记录
|
|
32
|
+
|
|
33
|
+
## [2.3.1] - 2026-08-28
|
|
34
|
+
|
|
35
|
+
- 补全 npm 发布元数据(`keywords`、`license`、`repository` 等)以支持插件市场收录
|
|
36
|
+
- 新增 GitHub Actions CI 与发布前 manifest 校验(`npm run verify`)
|
|
37
|
+
- 新增 `docs/PUBLISHING.md` 发布指南
|
|
38
|
+
|
|
39
|
+
## [2.3.0] - 2026-08-27
|
|
40
|
+
|
|
41
|
+
- 真流式客户端改进与引擎兼容补丁
|
|
42
|
+
- 补充引擎安装与语音下载指南
|
|
43
|
+
- 新增界面截图
|
|
44
|
+
- README 双语重写,明确 npm / GitHub 双通道安装
|
|
45
|
+
|
|
46
|
+
## [2.2.0] - 2026-08-26
|
|
47
|
+
|
|
48
|
+
- 声音设置面板(保存即热生效,无需重启)
|
|
49
|
+
- 引擎一键启停开关
|
|
50
|
+
- 🔊 朗读按钮(排除思考内容;引擎未启动时给出明确原因)
|
|
51
|
+
- 设置内帮助文档
|
|
52
|
+
- 音频同源短链接
|
|
53
|
+
|
|
54
|
+
## [2.1.0] - 2026-08-25
|
|
55
|
+
|
|
56
|
+
- 音频改由 DSH Web 服务同源提供(不再用巨型 data URL)
|
|
57
|
+
- WAV 头/时长计算修复
|
|
58
|
+
- `prompt_text` 留空时 ASR 兜底
|
|
59
|
+
- `execFileSync` 消除命令注入风险
|
|
60
|
+
- `py -3` 支持
|
|
61
|
+
- 健康检查路径探测
|
|
62
|
+
|
|
63
|
+
## [2.0.0] - 2026-08-24
|
|
64
|
+
|
|
65
|
+
- 首个正式版本:接入 GSV-TTS-Lite 本地 TTS 引擎
|
|
66
|
+
- 提供 `tts_speak` / `tts_list_voices` / `tts_health_check` / `tts_setup_engine` 四个工具
|
|
67
|
+
|
|
68
|
+
[2.5.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.2...v2.5.0
|
|
69
|
+
[2.3.2]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.1...v2.3.2
|
|
70
|
+
[2.3.1]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.0...v2.3.1
|
|
71
|
+
[2.3.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.2.0...v2.3.0
|
|
72
|
+
[2.2.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.1.0...v2.2.0
|
|
73
|
+
[2.1.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.0.0...v2.1.0
|
|
74
|
+
[2.0.0]: https://github.com/TaoruiLiu19/dsh-gsv/releases/tag/v2.0.0
|
package/CHANGELOG_EN.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## [2.5.0] - 2026-08-29
|
|
6
|
+
|
|
7
|
+
### Read-aloud text cleaning (P0-1)
|
|
8
|
+
- Filter Markdown tables (data rows and separator rows); only non-table prose is read
|
|
9
|
+
- Length guards with friendly messages: 6000 chars for `tts_speak`, 30000 for read-aloud/auto-read
|
|
10
|
+
- Unified empty-text handling: replies containing only code/links/tables now get a clear hint
|
|
11
|
+
- Added unit tests (`npm test`, built on node:test, zero new dependencies) for the cleaner and the segmenter
|
|
12
|
+
|
|
13
|
+
### Progressive segmented playback (P1-1)
|
|
14
|
+
- New `TTSService.synthesizeSegments`: splits text into sentences (CJK enders/`、`/English periods, ≤ 800 chars per segment), synthesizes each, 0-gap stitching
|
|
15
|
+
- `/dsh-gsv-tts/speak` now returns an ordered URL queue (`segments`); single-URL fields kept for compatibility
|
|
16
|
+
- The client player auto-advances on `<audio>` `ended` — long replies start speaking without waiting for full synthesis
|
|
17
|
+
|
|
18
|
+
### Playback controls (P1-2)
|
|
19
|
+
- Pause / Resume / Stop across the whole segment queue (current segment + in-segment position remembered)
|
|
20
|
+
- Progress display (elapsed / total + segment index)
|
|
21
|
+
- Highlight the message currently being read (pulsing outline)
|
|
22
|
+
|
|
23
|
+
### Auto-read barge-in (P0-2)
|
|
24
|
+
- Auto-read is now "notify → client synthesizes on demand": the server bumps a seq, the client polls for new replies
|
|
25
|
+
- New replies interrupt current playback by default; toggleable via the new `interruptOnNew` setting (skip while reading instead of overlapping)
|
|
26
|
+
|
|
27
|
+
## [2.3.2] - 2026-08-28
|
|
28
|
+
|
|
29
|
+
- Align the `@deepseek-ai/dsh-tools` peer dependency range (`^0.1.0-rc.6`) with the lockfile
|
|
30
|
+
- CI: `pnpm/action-setup` reads the version from the `packageManager` field
|
|
31
|
+
- Docs: added CI/npm badges and 2.3.x changelog entries to the READMEs
|
|
32
|
+
|
|
33
|
+
## [2.3.1] - 2026-08-28
|
|
34
|
+
|
|
35
|
+
- Completed npm publish metadata (`keywords`, `license`, `repository`, ...) for plugin-marketplace discovery
|
|
36
|
+
- Added GitHub Actions CI and a pre-publish manifest check (`npm run verify`)
|
|
37
|
+
- Added `docs/PUBLISHING.md`
|
|
38
|
+
|
|
39
|
+
## [2.3.0] - 2026-08-27
|
|
40
|
+
|
|
41
|
+
- True-streaming client improvements and engine compatibility patch
|
|
42
|
+
- Added engine-install and voice-download guides
|
|
43
|
+
- Added UI screenshots
|
|
44
|
+
- Bilingual README rewrite with clear npm/GitHub install paths
|
|
45
|
+
|
|
46
|
+
## [2.2.0] - 2026-08-26
|
|
47
|
+
|
|
48
|
+
- Voice Settings panel (hot-applied, no restart needed)
|
|
49
|
+
- One-click engine switch
|
|
50
|
+
- 🔊 read-aloud button (excludes reasoning; clear error when the engine is off)
|
|
51
|
+
- In-settings help documentation
|
|
52
|
+
- Same-origin audio short links
|
|
53
|
+
|
|
54
|
+
## [2.1.0] - 2026-08-25
|
|
55
|
+
|
|
56
|
+
- Same-origin audio served by the DSH web server (no more giant data URLs)
|
|
57
|
+
- WAV header/duration calculation fixes
|
|
58
|
+
- ASR fallback when `prompt_text` is empty
|
|
59
|
+
- `execFileSync` (no shell injection)
|
|
60
|
+
- `py -3` support
|
|
61
|
+
- Health-check path probing
|
|
62
|
+
|
|
63
|
+
## [2.0.0] - 2026-08-24
|
|
64
|
+
|
|
65
|
+
- Initial release: integrates the GSV-TTS-Lite local TTS engine
|
|
66
|
+
- Ships four tools: `tts_speak` / `tts_list_voices` / `tts_health_check` / `tts_setup_engine`
|
|
67
|
+
|
|
68
|
+
[2.5.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.2...v2.5.0
|
|
69
|
+
[2.3.2]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.1...v2.3.2
|
|
70
|
+
[2.3.1]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.0...v2.3.1
|
|
71
|
+
[2.3.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.2.0...v2.3.0
|
|
72
|
+
[2.2.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.1.0...v2.2.0
|
|
73
|
+
[2.1.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.0.0...v2.1.0
|
|
74
|
+
[2.0.0]: https://github.com/TaoruiLiu19/dsh-gsv/releases/tag/v2.0.0
|
package/README.md
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
# dsh-gsv-tts
|
|
2
2
|
|
|
3
|
+
> 为 DSH(DeepSeek Harness)接入 [GSV-TTS-Lite](https://github.com/chinokikiss/GSV-TTS-Lite) 本地 TTS 引擎 —— 音色克隆、流式合成、自动朗读、一键朗读、引擎一键启停,全程本地运行。
|
|
4
|
+
|
|
3
5
|

|
|
4
6
|

|
|
5
7
|

|
|
6
8
|

|
|
9
|
+
[](https://awesome-dsh-plugin.com/p/TaoruiLiu19/dsh-gsv/)
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
English README: [README_EN.md](README_EN.md) · 变更记录: [CHANGELOG.md](CHANGELOG.md)
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
---
|
|
11
14
|
|
|
12
|
-
##
|
|
15
|
+
## ✨ 功能亮点
|
|
13
16
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
17
|
+
- 🎙️ **音色克隆**:按参考音频克隆目标音色,`tts_speak` 按名称选用
|
|
18
|
+
- ⚡ **真流式合成**:SSE 逐块合成,首块到达即推送,低首包延迟
|
|
19
|
+
- 🔊 **一键朗读**:每条助手消息旁的 🔊 按钮直接朗读(自动排除思考内容);长回复**按句分段渐进播放**,带 暂停/继续/停止 与进度显示,正在朗读的消息会高亮
|
|
20
|
+
- 🔁 **自动朗读**:开启后自动朗读助手回复;新回复默认打断当前朗读(barge-in),可在设置中关闭
|
|
21
|
+
- 🎛️ **声音设置面板**:设置 → 声音设置,可视化配置,**保存即热生效**(无需重启)
|
|
22
|
+
- 🚀 **引擎一键启停**:一键启动/停止本地 GSV-TTS-Lite 引擎,模型加载约 15~90 秒
|
|
23
|
+
- 🛠️ **一键安装引擎**:`tts_setup_engine` 自动检测 Python、安装依赖、克隆仓库并启动服务
|
|
24
|
+
- 🔗 **同源音频短链接**:合成音频落盘为 WAV,经 DSH Web 服务同源提供,不再撑爆模型上下文
|
|
20
25
|
|
|
21
|
-
## 安装
|
|
26
|
+
## 📦 安装
|
|
22
27
|
|
|
23
28
|
两种方式任选其一,然后在设置中启用:
|
|
24
29
|
|
|
25
|
-
### 方式一:从 npm 安装
|
|
26
|
-
|
|
27
30
|
```bash
|
|
31
|
+
# 方式一:从 npm 安装
|
|
28
32
|
dsh plugin --profile web add dsh-gsv-tts
|
|
29
|
-
```
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
+
# 方式二:从 GitHub 安装
|
|
34
35
|
dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
35
36
|
```
|
|
36
37
|
|
|
@@ -40,14 +41,31 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
40
41
|
|
|
41
42
|
> 依赖 DSH 的 `webServer` 服务(Web / Desktop profile 自带)提供音频下载;`settings` 服务提供设置面板。无这些服务的环境仅保留工具能力。
|
|
42
43
|
|
|
43
|
-
## 快速开始
|
|
44
|
+
## 🚀 快速开始
|
|
44
45
|
|
|
45
46
|
1. **安装引擎**:让 agent 调用 `tts_setup_engine` 自动安装(或见下方手动安装)
|
|
46
|
-
2. **启动引擎**:设置 → 声音设置 → 打开"启动引擎"开关,等待状态变为"运行中"
|
|
47
|
+
2. **启动引擎**:设置 → 声音设置 → 打开"启动引擎"开关,等待状态变为"运行中"
|
|
47
48
|
3. **添加音色**:设置 → 声音设置 → "音色预设" → 添加音色 → 填写四字段 → 保存
|
|
48
49
|
4. **朗读**:点任意助手消息旁的 🔊,或让 agent 调用 `tts_speak`
|
|
49
50
|
|
|
50
|
-
##
|
|
51
|
+
## 🏗️ 系统架构
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
> 📖 交互式架构图:[打开 dsh-gsv-tts.architecture.html](docs/architecture/dsh-gsv-tts.architecture.html)(支持缩放、聚焦、主题切换)
|
|
56
|
+
|
|
57
|
+
**两条调用路径**:
|
|
58
|
+
|
|
59
|
+
- 🔊 **朗读主链路(经 webServer)**:用户点击 🔊 → DSH Web 客户端 → `webServer` 的 `/speak` 路由 → 插件从会话中提取消息文本 → `TTSService` 流式请求引擎 → 引擎 SSE 逐块返回音频 → `AudioStore` 拼接 WAV 落盘 → 同源短链接回传浏览器播放。
|
|
60
|
+
- 🤖 **Agent 工具调用(宿主内直连)**:Agent 调用 `tts_speak` 等工具时,由宿主进程内 tools 服务**直接**执行插件逻辑,**不经 webServer HTTP 网关**——图中以虚线表示,与 🔊 按钮路径区分。
|
|
61
|
+
|
|
62
|
+
| 构成 | 说明 |
|
|
63
|
+
|------|------|
|
|
64
|
+
| DSH 应用(DeepSeek Harness) | 插件宿主:Web 客户端、webServer、settings 服务 |
|
|
65
|
+
| dsh-gsv-tts 插件 | `TTSService`(流式合成)/ `AudioStore`(WAV 落盘)/ 引擎管理(启停·安装·健康检查) |
|
|
66
|
+
| GSV-TTS-Lite 本地引擎 | 本机 Python 进程,FastAPI :9880,真流式 `/tts/stream` |
|
|
67
|
+
|
|
68
|
+
## 📸 截图
|
|
51
69
|
|
|
52
70
|

|
|
53
71
|
|
|
@@ -61,7 +79,7 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
61
79
|
|
|
62
80
|
*引擎启动后的"运行中"状态*
|
|
63
81
|
|
|
64
|
-
## 下载安装 GSV-TTS-Lite 引擎
|
|
82
|
+
## 🔧 下载安装 GSV-TTS-Lite 引擎
|
|
65
83
|
|
|
66
84
|
### 方式一:自动安装(推荐)
|
|
67
85
|
|
|
@@ -80,7 +98,7 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
80
98
|
|
|
81
99
|
> 引擎示例音频位于 `<仓库>/examples/`(`laffey.mp3`、`AnAn.ogg`),可直接用作测试音色。
|
|
82
100
|
|
|
83
|
-
## 添加音色
|
|
101
|
+
## 🎙️ 添加音色
|
|
84
102
|
|
|
85
103
|
1. 打开 设置 → 声音设置
|
|
86
104
|
2. "音色预设"下点击"添加音色"
|
|
@@ -98,7 +116,7 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
98
116
|
|
|
99
117
|
> 参考音频路径必须是**引擎服务端能访问的本地路径或可访问 URL**。
|
|
100
118
|
|
|
101
|
-
## 声音设置说明
|
|
119
|
+
## ⚙️ 声音设置说明
|
|
102
120
|
|
|
103
121
|
| 字段 | 说明 | 默认值 |
|
|
104
122
|
|------|------|--------|
|
|
@@ -108,11 +126,12 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
108
126
|
| `timeout` | 请求超时(毫秒) | `30000` |
|
|
109
127
|
| `installDir` | 引擎安装目录 | `./GSV-TTS-Lite` |
|
|
110
128
|
| `autoPlay` | 自动朗读助手回复 | `false` |
|
|
129
|
+
| `interruptOnNew` | 自动朗读时新回复是否打断当前朗读(关闭则朗读中跳过,避免叠音) | `true` |
|
|
111
130
|
| `voices` | 音色预设列表 | 空 |
|
|
112
131
|
|
|
113
132
|
配置保存在 DSH 的 settings(`~/.dsh/settings.yaml` 的 `dsh-gsv-tts:` 段),修改后插件热生效。
|
|
114
133
|
|
|
115
|
-
## 工具列表
|
|
134
|
+
## 🧰 工具列表
|
|
116
135
|
|
|
117
136
|
| 工具 | 功能 |
|
|
118
137
|
|------|------|
|
|
@@ -121,14 +140,14 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
121
140
|
| `tts_health_check` | 检查引擎/API/Python/仓库状态 |
|
|
122
141
|
| `tts_setup_engine` | 一键安装 GSV-TTS-Lite 引擎 |
|
|
123
142
|
|
|
124
|
-
## 常见问题
|
|
143
|
+
## ❓ 常见问题
|
|
125
144
|
|
|
126
145
|
- **引擎未启动**:设置 → 声音设置 → 打开开关(模型加载约 15~90 秒)
|
|
127
146
|
- **模型缺失**:首次启动会提示,把模型放入 `models` 目录
|
|
128
147
|
- **朗读按钮报"语音引擎未启动"**:先到 声音设置 启动引擎
|
|
129
148
|
- **参考音频不可用**:必须是引擎服务端可访问的本地路径或 URL
|
|
130
149
|
|
|
131
|
-
## 技术栈
|
|
150
|
+
## 🛠️ 技术栈
|
|
132
151
|
|
|
133
152
|
- DSH 插件框架:Cordis + `@deepseek-ai/dsh-tools`
|
|
134
153
|
- 配置 Schema:`@deepseek-ai/schemastery`
|
|
@@ -136,7 +155,7 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
136
155
|
- TTS 引擎:GSV-TTS-Lite 0.4.7
|
|
137
156
|
- 语言:TypeScript(宿主)/ 手写客户端 bundle(浏览器)/ Python(流式 API)
|
|
138
157
|
|
|
139
|
-
## 构建与发布
|
|
158
|
+
## 📦 构建与发布
|
|
140
159
|
|
|
141
160
|
```bash
|
|
142
161
|
pnpm install
|
|
@@ -146,16 +165,23 @@ pnpm publish # 发布到 npm(files: lib, scripts, cordis.patch.yml)
|
|
|
146
165
|
|
|
147
166
|
从 GitHub 安装会自动执行 `prepare` 脚本编译;`lib/client.js` 为手写客户端 bundle,随仓库发布。
|
|
148
167
|
|
|
149
|
-
|
|
168
|
+
更多发布细节见 [docs/PUBLISHING.md](docs/PUBLISHING.md)。
|
|
169
|
+
|
|
170
|
+
## 📜 变更记录
|
|
150
171
|
|
|
151
|
-
|
|
152
|
-
- **2.3.0**:真流式客户端改进与引擎兼容补丁;补充引擎安装与语音下载指南;新增界面截图;README 双语重写,明确 npm / GitHub 双通道安装
|
|
153
|
-
- **2.2.0**:声音设置面板(保存即热生效);引擎一键启停开关;🔊 朗读按钮(排除思考,引擎未启动给出原因);设置内帮助文档;音频同源短链接
|
|
154
|
-
- **2.1.0**:音频改由 DSH Web 服务同源提供(不再用巨型 data URL);WAV 头/时长计算修复;`prompt_text` 留空 ASR 兜底;`execFileSync` 消除命令注入;`py -3` 支持;健康检查路径探测
|
|
172
|
+
完整更新历史见 [CHANGELOG.md](CHANGELOG.md)。
|
|
155
173
|
|
|
156
|
-
## 已知限制
|
|
174
|
+
## ⚠️ 已知限制
|
|
157
175
|
|
|
158
176
|
- 播放为 markdown 链接点击播放;内嵌 `<audio>` 需客户端扩展(规划中)
|
|
159
177
|
- 合成音频存于系统临时目录(`%TEMP%/dsh-gsv-tts`),启动清空、会话内最多 200 个
|
|
160
178
|
- `tts_setup_engine` 通过 `child_process` 执行 pip/git,需环境有对应工具
|
|
161
179
|
- `promptText` 留空依赖引擎 ASR 能力(能力探测),不支持时合成报错
|
|
180
|
+
|
|
181
|
+
## 📄 License
|
|
182
|
+
|
|
183
|
+
本项目以 **MIT 许可证** 开源发布。
|
|
184
|
+
|
|
185
|
+
版权所有 © 2026 TaoruiLiu19。在软件的副本或主要部分中包含上述版权声明和本许可声明的前提下,任何人可免费复制、修改、合并、发布、分发、再授权及/或出售本软件副本。
|
|
186
|
+
|
|
187
|
+
本项目按"**原样**"提供,**不附带任何明示或默示保证**。完整许可条款见 [LICENSE](LICENSE) 文件。
|
package/README_EN.md
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
# dsh-gsv-tts
|
|
2
2
|
|
|
3
|
+
> A DSH (DeepSeek Harness) plugin that integrates the [GSV-TTS-Lite](https://github.com/chinokikiss/GSV-TTS-Lite) local TTS engine — voice cloning, streaming synthesis, auto-read, one-click read-aloud, and one-click engine control, all running locally.
|
|
4
|
+
|
|
3
5
|

|
|
4
6
|

|
|
5
7
|

|
|
6
8
|

|
|
9
|
+
[](https://awesome-dsh-plugin.com/p/TaoruiLiu19/dsh-gsv/)
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
中文 README: [README.md](README.md) · Changelog: [CHANGELOG_EN.md](CHANGELOG_EN.md)
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
---
|
|
11
14
|
|
|
12
|
-
## Features
|
|
15
|
+
## ✨ Features
|
|
13
16
|
|
|
14
|
-
- **Voice
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **Auto-read**: automatically
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
17
|
+
- 🎙️ **Voice cloning**: clone a target voice from reference audio; selectable by name in `tts_speak`
|
|
18
|
+
- ⚡ **True streaming synthesis**: SSE chunk-by-chunk synthesis — the first chunk is pushed as soon as it arrives
|
|
19
|
+
- 🔊 **One-click read-aloud**: a 🔊 button next to every assistant message (reasoning content excluded); long replies are **split into sentence segments and played progressively**, with Pause/Resume/Stop controls, a progress readout, and a highlight on the message being read
|
|
20
|
+
- 🔁 **Auto-read**: automatically reads assistant replies; new replies interrupt the current read by default (barge-in), toggleable in settings
|
|
21
|
+
- 🎛️ **Voice Settings panel**: Settings → Voice Settings — configure everything visually, **hot-applied** (no restart)
|
|
22
|
+
- 🚀 **One-click engine control**: start/stop the local GSV-TTS-Lite engine (model loading ~15–90 s)
|
|
23
|
+
- 🛠️ **One-click engine setup**: `tts_setup_engine` auto-detects Python, installs deps, clones the repo, and starts the service
|
|
24
|
+
- 🔗 **Same-origin audio short links**: audio is saved as WAV and served by the DSH web server — no more giant data URLs in the model context
|
|
20
25
|
|
|
21
|
-
## Installation
|
|
26
|
+
## 📦 Installation
|
|
22
27
|
|
|
23
28
|
Choose one of the two methods, then enable it in Settings:
|
|
24
29
|
|
|
25
|
-
### Option 1: Install from npm
|
|
26
|
-
|
|
27
30
|
```bash
|
|
31
|
+
# Option 1: Install from npm
|
|
28
32
|
dsh plugin --profile web add dsh-gsv-tts
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Option 2: Install from GitHub
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
# Option 2: Install from GitHub
|
|
34
35
|
dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
35
36
|
```
|
|
36
37
|
|
|
@@ -40,14 +41,31 @@ After installing, restart DSH. The tools register automatically and a "Voice Set
|
|
|
40
41
|
|
|
41
42
|
> Requires the DSH `webServer` service (bundled with the Web/Desktop profiles) for audio delivery and the `settings` service for the settings panel. Environments without these services keep only the tool capabilities.
|
|
42
43
|
|
|
43
|
-
## Quick Start
|
|
44
|
+
## 🚀 Quick Start
|
|
44
45
|
|
|
45
46
|
1. **Install the engine**: ask the agent to call `tts_setup_engine` (or install manually below)
|
|
46
|
-
2. **Start the engine**: Settings → Voice Settings → toggle "Start engine" on and wait until it shows "Running"
|
|
47
|
+
2. **Start the engine**: Settings → Voice Settings → toggle "Start engine" on and wait until it shows "Running"
|
|
47
48
|
3. **Add a voice**: Settings → Voice Settings → "Voice presets" → Add voice → fill in the four fields → Save
|
|
48
49
|
4. **Read aloud**: click the 🔊 button next to any assistant message, or ask the agent to call `tts_speak`
|
|
49
50
|
|
|
50
|
-
##
|
|
51
|
+
## 🏗️ Architecture
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
> 📖 Interactive diagram: [open dsh-gsv-tts.architecture.html](docs/architecture/dsh-gsv-tts.architecture.html) (zoom, focus, theme switching)
|
|
56
|
+
|
|
57
|
+
**Two call paths**:
|
|
58
|
+
|
|
59
|
+
- 🔊 **Read-aloud path (via webServer)**: user clicks 🔊 → DSH Web client → the `webServer` `/speak` route → the plugin extracts the message text from the session → `TTSService` streams the synthesis request → the engine returns audio chunks over SSE → `AudioStore` assembles and saves a WAV → a same-origin short link is returned to the browser for playback.
|
|
60
|
+
- 🤖 **Agent tool calls (in-process, direct)**: when the agent calls `tts_speak` and friends, the host's tools service executes the plugin logic **directly in-process — no webServer HTTP gateway involved**. Shown as dashed lines to distinguish from the 🔊 button path.
|
|
61
|
+
|
|
62
|
+
| Part | Description |
|
|
63
|
+
|------|-------------|
|
|
64
|
+
| DSH app (DeepSeek Harness) | Plugin host: Web client, webServer, settings service |
|
|
65
|
+
| dsh-gsv-tts plugin | `TTSService` (streaming synthesis) / `AudioStore` (WAV storage) / engine manager (start-stop · setup · health check) |
|
|
66
|
+
| GSV-TTS-Lite local engine | Local Python process, FastAPI :9880, true streaming `/tts/stream` |
|
|
67
|
+
|
|
68
|
+
## 📸 Screenshots
|
|
51
69
|
|
|
52
70
|

|
|
53
71
|
|
|
@@ -61,7 +79,7 @@ After installing, restart DSH. The tools register automatically and a "Voice Set
|
|
|
61
79
|
|
|
62
80
|
*The "Running" state after the engine starts*
|
|
63
81
|
|
|
64
|
-
## Installing the GSV-TTS-Lite Engine
|
|
82
|
+
## 🔧 Installing the GSV-TTS-Lite Engine
|
|
65
83
|
|
|
66
84
|
### Option 1: Automatic (recommended)
|
|
67
85
|
|
|
@@ -80,7 +98,7 @@ Ask the agent to call `tts_setup_engine`. It automatically: detects Python → i
|
|
|
80
98
|
|
|
81
99
|
> Example audio lives in `<repo>/examples/` (`laffey.mp3`, `AnAn.ogg`) — usable as test voices.
|
|
82
100
|
|
|
83
|
-
## Adding a Voice
|
|
101
|
+
## 🎙️ Adding a Voice
|
|
84
102
|
|
|
85
103
|
1. Open Settings → Voice Settings
|
|
86
104
|
2. Under "Voice presets", click "Add voice"
|
|
@@ -98,7 +116,7 @@ Ask the agent to call `tts_setup_engine`. It automatically: detects Python → i
|
|
|
98
116
|
|
|
99
117
|
> Reference audio paths must be **local paths accessible from the engine host or reachable URLs**.
|
|
100
118
|
|
|
101
|
-
## Voice Settings Reference
|
|
119
|
+
## ⚙️ Voice Settings Reference
|
|
102
120
|
|
|
103
121
|
| Field | Description | Default |
|
|
104
122
|
|-------|-------------|---------|
|
|
@@ -108,11 +126,12 @@ Ask the agent to call `tts_setup_engine`. It automatically: detects Python → i
|
|
|
108
126
|
| `timeout` | Request timeout (ms) | `30000` |
|
|
109
127
|
| `installDir` | Engine install directory | `./GSV-TTS-Lite` |
|
|
110
128
|
| `autoPlay` | Auto-read assistant replies | `false` |
|
|
129
|
+
| `interruptOnNew` | Whether new replies interrupt the current read in auto-read mode (off = skip new replies while reading to avoid overlap) | `true` |
|
|
111
130
|
| `voices` | Voice preset list | empty |
|
|
112
131
|
|
|
113
132
|
Config is stored in DSH settings (the `dsh-gsv-tts:` section of `~/.dsh/settings.yaml`) and hot-applied on change.
|
|
114
133
|
|
|
115
|
-
## Tools
|
|
134
|
+
## 🧰 Tools
|
|
116
135
|
|
|
117
136
|
| Tool | Purpose |
|
|
118
137
|
|------|---------|
|
|
@@ -121,14 +140,14 @@ Config is stored in DSH settings (the `dsh-gsv-tts:` section of `~/.dsh/settings
|
|
|
121
140
|
| `tts_health_check` | Check engine/API/Python/repo status |
|
|
122
141
|
| `tts_setup_engine` | One-click GSV-TTS-Lite engine installation |
|
|
123
142
|
|
|
124
|
-
## FAQ
|
|
143
|
+
## ❓ FAQ
|
|
125
144
|
|
|
126
145
|
- **Engine not running**: Settings → Voice Settings → toggle on (model loading takes ~15–90 s)
|
|
127
146
|
- **Models missing**: the first start will warn; put the models into the `models` directory
|
|
128
147
|
- **The read button says "engine not started"**: start the engine in Voice Settings first
|
|
129
148
|
- **Reference audio unavailable**: use a local path accessible from the engine host or a reachable URL
|
|
130
149
|
|
|
131
|
-
## Tech Stack
|
|
150
|
+
## 🛠️ Tech Stack
|
|
132
151
|
|
|
133
152
|
- DSH plugin framework: Cordis + `@deepseek-ai/dsh-tools`
|
|
134
153
|
- Config schema: `@deepseek-ai/schemastery`
|
|
@@ -136,7 +155,7 @@ Config is stored in DSH settings (the `dsh-gsv-tts:` section of `~/.dsh/settings
|
|
|
136
155
|
- TTS engine: GSV-TTS-Lite 0.4.7
|
|
137
156
|
- Languages: TypeScript (host) / hand-written client bundle (browser) / Python (streaming API)
|
|
138
157
|
|
|
139
|
-
## Build & Publish
|
|
158
|
+
## 📦 Build & Publish
|
|
140
159
|
|
|
141
160
|
```bash
|
|
142
161
|
pnpm install
|
|
@@ -146,16 +165,23 @@ pnpm publish # publish to npm (files: lib, scripts, cordis.patch.yml)
|
|
|
146
165
|
|
|
147
166
|
Installing from GitHub runs the `prepare` script automatically; `lib/client.js` is a hand-written client bundle shipped with the repo.
|
|
148
167
|
|
|
149
|
-
|
|
168
|
+
See [docs/PUBLISHING.md](docs/PUBLISHING.md) for publishing details.
|
|
169
|
+
|
|
170
|
+
## 📜 Changelog
|
|
150
171
|
|
|
151
|
-
|
|
152
|
-
- **2.3.0**: True-streaming client improvements and engine compatibility patch; added engine-install and voice-download guide; added UI screenshots; bilingual README rewrite with clear npm/GitHub install paths
|
|
153
|
-
- **2.2.0**: Voice Settings panel (hot-applied); one-click engine switch; 🔊 read-aloud button (excludes reasoning; clear error when the engine is off); in-settings help; same-origin audio short links
|
|
154
|
-
- **2.1.0**: same-origin audio via the DSH web server (no more giant data URLs); WAV header/duration fixes; `prompt_text` ASR fallback; `execFileSync` (no shell injection); `py -3` support; health-check path probing
|
|
172
|
+
Full release history: [CHANGELOG_EN.md](CHANGELOG_EN.md).
|
|
155
173
|
|
|
156
|
-
## Known Limitations
|
|
174
|
+
## ⚠️ Known Limitations
|
|
157
175
|
|
|
158
176
|
- Playback is a clickable markdown link; inline `<audio>` playback needs a client extension (planned)
|
|
159
177
|
- Generated audio lives in the system temp dir (`%TEMP%/dsh-gsv-tts`), purged on startup, capped at 200 files per session
|
|
160
178
|
- `tts_setup_engine` shells out to pip/git; those tools must be available
|
|
161
179
|
- Empty `promptText` relies on the engine's ASR capability (capability-probed); synthesis fails with a clear error when unsupported
|
|
180
|
+
|
|
181
|
+
## 📄 License
|
|
182
|
+
|
|
183
|
+
This project is open-sourced under the **MIT license**.
|
|
184
|
+
|
|
185
|
+
Copyright (c) 2026 TaoruiLiu19. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction, subject to the inclusion of the above copyright notice and this permission notice in all copies or substantial portions of the Software.
|
|
186
|
+
|
|
187
|
+
The Software is provided **"AS IS"**, **without warranty of any kind, express or implied**. See the [LICENSE](LICENSE) file for the full terms.
|
|
Binary file
|