dsh-gsv-tts 2.3.3 → 3.0.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 +42 -0
- package/CHANGELOG_EN.md +42 -0
- package/README.md +5 -3
- package/README_EN.md +5 -3
- package/docs/voices/cn-changhenge-female.mp3 +0 -0
- package/docs/voices/en-hebang.mp3 +0 -0
- package/docs/voices.json +35 -0
- package/lib/client.js +647 -24
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +340 -16
- 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 +56 -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 +49 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/voice-registry.d.ts +72 -0
- package/lib/voice-registry.d.ts.map +1 -0
- package/lib/voice-registry.js +274 -0
- package/lib/voice-registry.js.map +1 -0
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
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
|
+
## [3.0.0] - 开发中
|
|
6
|
+
|
|
7
|
+
### 音色 Registry 一键安装(P2)
|
|
8
|
+
- 音色市场:包内离线清单(`docs/voices.json`)或自定义远端源(`voiceRegistryUrl`,服务端拉取带 no-cache)
|
|
9
|
+
- 信任规则:信任 = 随插件发版内置——仅包内清单且 `trusted` 为真免确认;**任何远端清单一律两阶段确认**(即便自报 trusted),阶段 1 不下载任何字节
|
|
10
|
+
- 三工具 `tts_voice_registry` / `tts_voice_install` / `tts_voice_remove` + 同源 HTTP 路由 `registry/{list,install,remove}`,共享核心
|
|
11
|
+
- 安装:下载 → sha256 强校验 → 大小/后缀白名单 → 原子落盘 `<installDir>/voices/<id>/` → 写回 `Config.voices`(id + source 账本),失败不留半成品、不写配置
|
|
12
|
+
- 只读托管:`source:'registry'` 音色在设置面板只读、仅可卸载;卸载按 id 精确匹配,自定义音色拒绝删,`defaultVoice` 悬空一并清空
|
|
13
|
+
- 面板新增"音色市场"卡:来源/信任徽标、试听(复用 /preview)、两阶段确认安装、卸载删除文件确认
|
|
14
|
+
- 单测并入 CI:清单校验、信任边界、原子写、卸载护栏、路径穿越
|
|
15
|
+
|
|
16
|
+
## [2.6.0] - 2026-08-29
|
|
17
|
+
|
|
18
|
+
### 设置面板增强(P1-3)
|
|
19
|
+
- 每条音色新增"试听"按钮:用固定试听文案单次合成并播放(**未保存的草稿音色也能直接试听**,便于"靠耳朵挑")
|
|
20
|
+
- 新增"全部试听(循环)":批量合成所有音色后循环播放,边听边对比,可暂停/停止;失败音色给出提示
|
|
21
|
+
- 面板顶栏的引擎运行状态 + 一键启停自 2.2.0 起已提供,本次无改动
|
|
22
|
+
|
|
23
|
+
## [2.5.0] - 2026-08-29
|
|
24
|
+
|
|
25
|
+
### 朗读净化补全(P0-1)
|
|
26
|
+
- 过滤 markdown 表格(数据行与分隔行),只读表格外的正文
|
|
27
|
+
- 超长文本保护:`tts_speak` 单段上限 6000 字符,朗读/自动朗读分段上限 30000 字符,超限给出友好提示
|
|
28
|
+
- 空文本判断与合成口径统一:清洗后为空(只有代码/链接/表格)的回复返回明确提示
|
|
29
|
+
- 新增单元测试(`npm test`,基于 node:test,零新增依赖):净化器与句切分器
|
|
30
|
+
|
|
31
|
+
### 渐进分段播放(P1-1)
|
|
32
|
+
- 服务端新增 `TTSService.synthesizeSegments`:按句切分(中文句末标点、顿号 + 英文句点,单段 ≤ 800 字)逐段流式合成,段间 0 静音
|
|
33
|
+
- `/dsh-gsv-tts/speak` 返回可顺序播放的 URL 队列(`segments`),兼容旧单 URL 字段
|
|
34
|
+
- 前端播放器按 `<audio>` ended 事件自动续播下一段——长回复不再等整段合成完才出声
|
|
35
|
+
|
|
36
|
+
### 朗读控件(P1-2)
|
|
37
|
+
- 朗读按钮新增 暂停 / 继续 / 停止 三键,作用于整个分段队列(记录当前段 + 段内时间)
|
|
38
|
+
- 显示朗读进度(已播 / 总时长 + 段序号)
|
|
39
|
+
- 高亮正在朗读的那条消息(呼吸边框)
|
|
40
|
+
|
|
41
|
+
### 自动朗读打断(P0-2)
|
|
42
|
+
- 自动朗读改为"通知 → 前端按需合成播放":服务端递增 seq,前端轮询感知新回复
|
|
43
|
+
- 新回复到来时默认打断当前朗读(barge-in);设置中可关闭 `interruptOnNew`,朗读中跳过新回复避免叠音
|
|
44
|
+
|
|
5
45
|
## [2.3.2] - 2026-08-28
|
|
6
46
|
|
|
7
47
|
- 对齐 `@deepseek-ai/dsh-tools` peer 依赖范围(`^0.1.0-rc.6`),与 lockfile 一致
|
|
@@ -43,6 +83,8 @@
|
|
|
43
83
|
- 首个正式版本:接入 GSV-TTS-Lite 本地 TTS 引擎
|
|
44
84
|
- 提供 `tts_speak` / `tts_list_voices` / `tts_health_check` / `tts_setup_engine` 四个工具
|
|
45
85
|
|
|
86
|
+
[2.6.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.5.0...v2.6.0
|
|
87
|
+
[2.5.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.2...v2.5.0
|
|
46
88
|
[2.3.2]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.1...v2.3.2
|
|
47
89
|
[2.3.1]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.0...v2.3.1
|
|
48
90
|
[2.3.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.2.0...v2.3.0
|
package/CHANGELOG_EN.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
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
|
+
## [3.0.0] - in development
|
|
6
|
+
|
|
7
|
+
### Voice Registry one-click install (P2)
|
|
8
|
+
- Voice market: bundled offline manifest (`docs/voices.json`) or a custom remote source (`voiceRegistryUrl`, fetched server-side with no-cache)
|
|
9
|
+
- Trust rule: trust = shipped with the plugin — only the bundled manifest with `trusted: true` installs without confirmation; **any remote manifest requires two-phase confirmation** (even if it self-reports trusted), and phase 1 downloads nothing
|
|
10
|
+
- Three tools `tts_voice_registry` / `tts_voice_install` / `tts_voice_remove` plus same-origin HTTP routes `registry/{list,install,remove}`, sharing one core
|
|
11
|
+
- Install: download → sha256 verification → size/extension whitelist → atomic staging under `<installDir>/voices/<id>/` → write back to `Config.voices` (id + source bookkeeping); failures leave no partial files and never touch config
|
|
12
|
+
- Read-only managed voices: `source:'registry'` entries are read-only in the panel (uninstall only); removal matches by id, refuses custom voices, and clears a dangling `defaultVoice`
|
|
13
|
+
- New "Voice Market" card in the panel: source/trust badge, preview (reuses /preview), two-phase confirmed install, delete-files confirm on uninstall
|
|
14
|
+
- Unit tests wired into CI: manifest validation, trust boundaries, atomic writes, uninstall guards, path traversal
|
|
15
|
+
|
|
16
|
+
## [2.6.0] - 2026-08-29
|
|
17
|
+
|
|
18
|
+
### Settings panel enhancements (P1-3)
|
|
19
|
+
- Per-voice "Preview" button: synthesizes a fixed preview sentence and plays it — **unsaved draft voices can be previewed too**, perfect for ear-based voice picking
|
|
20
|
+
- New "Preview all (loop)": synthesizes every voice and loops through them for comparison, with pause/stop; failed voices are reported
|
|
21
|
+
- The engine status bar + one-click start/stop at the top of the panel have been available since 2.2.0; unchanged in this release
|
|
22
|
+
|
|
23
|
+
## [2.5.0] - 2026-08-29
|
|
24
|
+
|
|
25
|
+
### Read-aloud text cleaning (P0-1)
|
|
26
|
+
- Filter Markdown tables (data rows and separator rows); only non-table prose is read
|
|
27
|
+
- Length guards with friendly messages: 6000 chars for `tts_speak`, 30000 for read-aloud/auto-read
|
|
28
|
+
- Unified empty-text handling: replies containing only code/links/tables now get a clear hint
|
|
29
|
+
- Added unit tests (`npm test`, built on node:test, zero new dependencies) for the cleaner and the segmenter
|
|
30
|
+
|
|
31
|
+
### Progressive segmented playback (P1-1)
|
|
32
|
+
- New `TTSService.synthesizeSegments`: splits text into sentences (CJK enders/`、`/English periods, ≤ 800 chars per segment), synthesizes each, 0-gap stitching
|
|
33
|
+
- `/dsh-gsv-tts/speak` now returns an ordered URL queue (`segments`); single-URL fields kept for compatibility
|
|
34
|
+
- The client player auto-advances on `<audio>` `ended` — long replies start speaking without waiting for full synthesis
|
|
35
|
+
|
|
36
|
+
### Playback controls (P1-2)
|
|
37
|
+
- Pause / Resume / Stop across the whole segment queue (current segment + in-segment position remembered)
|
|
38
|
+
- Progress display (elapsed / total + segment index)
|
|
39
|
+
- Highlight the message currently being read (pulsing outline)
|
|
40
|
+
|
|
41
|
+
### Auto-read barge-in (P0-2)
|
|
42
|
+
- Auto-read is now "notify → client synthesizes on demand": the server bumps a seq, the client polls for new replies
|
|
43
|
+
- New replies interrupt current playback by default; toggleable via the new `interruptOnNew` setting (skip while reading instead of overlapping)
|
|
44
|
+
|
|
5
45
|
## [2.3.2] - 2026-08-28
|
|
6
46
|
|
|
7
47
|
- Align the `@deepseek-ai/dsh-tools` peer dependency range (`^0.1.0-rc.6`) with the lockfile
|
|
@@ -43,6 +83,8 @@ All notable changes to dsh-gsv-tts are documented in this file. Format based on
|
|
|
43
83
|
- Initial release: integrates the GSV-TTS-Lite local TTS engine
|
|
44
84
|
- Ships four tools: `tts_speak` / `tts_list_voices` / `tts_health_check` / `tts_setup_engine`
|
|
45
85
|
|
|
86
|
+
[2.6.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.5.0...v2.6.0
|
|
87
|
+
[2.5.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.2...v2.5.0
|
|
46
88
|
[2.3.2]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.1...v2.3.2
|
|
47
89
|
[2.3.1]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.3.0...v2.3.1
|
|
48
90
|
[2.3.0]: https://github.com/TaoruiLiu19/dsh-gsv/compare/v2.2.0...v2.3.0
|
package/README.md
CHANGED
|
@@ -16,9 +16,9 @@ English README: [README_EN.md](README_EN.md) · 变更记录: [CHANGELOG.md](CHA
|
|
|
16
16
|
|
|
17
17
|
- 🎙️ **音色克隆**:按参考音频克隆目标音色,`tts_speak` 按名称选用
|
|
18
18
|
- ⚡ **真流式合成**:SSE 逐块合成,首块到达即推送,低首包延迟
|
|
19
|
-
- 🔊 **一键朗读**:每条助手消息旁的 🔊
|
|
20
|
-
- 🔁
|
|
21
|
-
- 🎛️ **声音设置面板**:设置 →
|
|
19
|
+
- 🔊 **一键朗读**:每条助手消息旁的 🔊 按钮直接朗读(自动排除思考内容);长回复**按句分段渐进播放**,带 暂停/继续/停止 与进度显示,正在朗读的消息会高亮
|
|
20
|
+
- 🔁 **自动朗读**:开启后自动朗读助手回复;新回复默认打断当前朗读(barge-in),可在设置中关闭
|
|
21
|
+
- 🎛️ **声音设置面板**:设置 → 声音设置,可视化配置,**保存即热生效**(无需重启);每条音色可"试听",或"全部试听"循环对比音色
|
|
22
22
|
- 🚀 **引擎一键启停**:一键启动/停止本地 GSV-TTS-Lite 引擎,模型加载约 15~90 秒
|
|
23
23
|
- 🛠️ **一键安装引擎**:`tts_setup_engine` 自动检测 Python、安装依赖、克隆仓库并启动服务
|
|
24
24
|
- 🔗 **同源音频短链接**:合成音频落盘为 WAV,经 DSH Web 服务同源提供,不再撑爆模型上下文
|
|
@@ -126,6 +126,8 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
126
126
|
| `timeout` | 请求超时(毫秒) | `30000` |
|
|
127
127
|
| `installDir` | 引擎安装目录 | `./GSV-TTS-Lite` |
|
|
128
128
|
| `autoPlay` | 自动朗读助手回复 | `false` |
|
|
129
|
+
| `interruptOnNew` | 自动朗读时新回复是否打断当前朗读(关闭则朗读中跳过,避免叠音) | `true` |
|
|
130
|
+
| `voiceRegistryUrl` | 音色市场远端清单地址(留空使用包内离线清单) | 空 |
|
|
129
131
|
| `voices` | 音色预设列表 | 空 |
|
|
130
132
|
|
|
131
133
|
配置保存在 DSH 的 settings(`~/.dsh/settings.yaml` 的 `dsh-gsv-tts:` 段),修改后插件热生效。
|
package/README_EN.md
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
- 🎙️ **Voice cloning**: clone a target voice from reference audio; selectable by name in `tts_speak`
|
|
18
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)
|
|
20
|
-
- 🔁 **Auto-read**: automatically
|
|
21
|
-
- 🎛️ **Voice Settings panel**: Settings → Voice Settings — configure everything visually, **hot-applied** (no restart)
|
|
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); preview any voice individually or loop-preview all for comparison
|
|
22
22
|
- 🚀 **One-click engine control**: start/stop the local GSV-TTS-Lite engine (model loading ~15–90 s)
|
|
23
23
|
- 🛠️ **One-click engine setup**: `tts_setup_engine` auto-detects Python, installs deps, clones the repo, and starts the service
|
|
24
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
|
|
@@ -126,6 +126,8 @@ Ask the agent to call `tts_setup_engine`. It automatically: detects Python → i
|
|
|
126
126
|
| `timeout` | Request timeout (ms) | `30000` |
|
|
127
127
|
| `installDir` | Engine install directory | `./GSV-TTS-Lite` |
|
|
128
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` |
|
|
130
|
+
| `voiceRegistryUrl` | Remote voice-market manifest URL (empty = bundled offline manifest) | empty |
|
|
129
131
|
| `voices` | Voice preset list | empty |
|
|
130
132
|
|
|
131
133
|
Config is stored in DSH settings (the `dsh-gsv-tts:` section of `~/.dsh/settings.yaml`) and hot-applied on change.
|
|
Binary file
|
|
Binary file
|
package/docs/voices.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"trusted": true,
|
|
5
|
+
"voices": [
|
|
6
|
+
{
|
|
7
|
+
"id": "cn-changhenge-female",
|
|
8
|
+
"name": "中文女声·长恨歌",
|
|
9
|
+
"author": "用户提供 (女声无BGM朗读《长恨歌》)",
|
|
10
|
+
"license": "用户提供素材 — 分发前需确认授权",
|
|
11
|
+
"speaker": "https://raw.githubusercontent.com/TaoruiLiu19/dsh-gsv/main/docs/voices/cn-changhenge-female.mp3",
|
|
12
|
+
"prompt": "https://raw.githubusercontent.com/TaoruiLiu19/dsh-gsv/main/docs/voices/cn-changhenge-female.mp3",
|
|
13
|
+
"promptText": "汉皇重色思倾国,御宇多年求不得。杨家有女初长成,养在深闺人未识。",
|
|
14
|
+
"sizeBytes": 644223,
|
|
15
|
+
"sha256": {
|
|
16
|
+
"speaker": "1586061f343434df9ffd7aa48d99f47c9ceac53cca8d3e2b805bce7d23df063d",
|
|
17
|
+
"prompt": "1586061f343434df9ffd7aa48d99f47c9ceac53cca8d3e2b805bce7d23df063d"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "en-hebang",
|
|
22
|
+
"name": "英语听力男声 (HeBang)",
|
|
23
|
+
"author": "用户提供 (高考英语听力试音)",
|
|
24
|
+
"license": "高考英语听力试音音频 — 分发前需确认授权",
|
|
25
|
+
"speaker": "https://raw.githubusercontent.com/TaoruiLiu19/dsh-gsv/main/docs/voices/en-hebang.mp3",
|
|
26
|
+
"prompt": "https://raw.githubusercontent.com/TaoruiLiu19/dsh-gsv/main/docs/voices/en-hebang.mp3",
|
|
27
|
+
"promptText": "Yes. Every day except Thursday we have a language evening. People can come and practice their languages—you know, over a drink or something. We have different languages on different evenings. Monday—Spanish; Tuesday—Italian; Wednesday—German; and Friday—French.",
|
|
28
|
+
"sizeBytes": 740156,
|
|
29
|
+
"sha256": {
|
|
30
|
+
"speaker": "cd962372d586f48a04c4169f2724d114fe07d962fea0819a0e3a0badd678a5c6",
|
|
31
|
+
"prompt": "cd962372d586f48a04c4169f2724d114fe07d962fea0819a0e3a0badd678a5c6"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|