dsh-gsv-tts 2.2.0 → 2.3.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/README.md +33 -4
- package/README_EN.md +154 -0
- package/docs/images/engine-running.png +0 -0
- package/docs/images/read-button.png +0 -0
- package/docs/images/settings-voice.png +0 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
DSH(DeepSeek Harness)插件,接入 [GSV-TTS-Lite](https://github.com/chinokikiss/GSV-TTS-Lite) 本地 TTS 服务:音色克隆、流式合成、自动朗读、一键朗读、引擎一键启停。
|
|
4
4
|
|
|
5
|
+
English README: [README_EN.md](README_EN.md)
|
|
6
|
+
|
|
5
7
|
## 功能
|
|
6
8
|
|
|
7
9
|
- **声音设置面板**:设置 → 声音设置,可视化配置引擎、音色、自动朗读等,**保存即热生效**(无需重启)
|
|
@@ -13,11 +15,23 @@ DSH(DeepSeek Harness)插件,接入 [GSV-TTS-Lite](https://github.com/chino
|
|
|
13
15
|
|
|
14
16
|
## 安装
|
|
15
17
|
|
|
18
|
+
两种方式任选其一,然后在设置中启用:
|
|
19
|
+
|
|
20
|
+
### 方式一:从 npm 安装
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
dsh plugin --profile web add dsh-gsv-tts
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 方式二:从 GitHub 安装
|
|
27
|
+
|
|
16
28
|
```bash
|
|
17
29
|
dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
18
30
|
```
|
|
19
31
|
|
|
20
|
-
|
|
32
|
+
> **关于 profile**:以上以 `web` profile 为例;当前桌面应用常用 `desktop` profile,把命令里的 `web` 换成 `desktop` 即可。
|
|
33
|
+
|
|
34
|
+
安装后重启 DSH,工具自动注册到 agent,设置中出现"声音设置"项。
|
|
21
35
|
|
|
22
36
|
> 依赖 DSH 的 `webServer` 服务(Web / Desktop profile 自带)提供音频下载;`settings` 服务提供设置面板。无这些服务的环境仅保留工具能力。
|
|
23
37
|
|
|
@@ -28,6 +42,20 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
28
42
|
3. **添加音色**:设置 → 声音设置 → "音色预设" → 添加音色 → 填写四字段 → 保存
|
|
29
43
|
4. **朗读**:点任意助手消息旁的 🔊,或让 agent 调用 `tts_speak`
|
|
30
44
|
|
|
45
|
+
## 截图
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
*设置 → 声音设置:引擎开关、TTS 配置、帮助文档*
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
*消息操作区的 🔊 朗读按钮(悬停显示"朗读结果")*
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
*引擎启动后的"运行中"状态*
|
|
58
|
+
|
|
31
59
|
## 下载安装 GSV-TTS-Lite 引擎
|
|
32
60
|
|
|
33
61
|
### 方式一:自动安装(推荐)
|
|
@@ -103,14 +131,15 @@ dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
|
103
131
|
- TTS 引擎:GSV-TTS-Lite 0.4.7
|
|
104
132
|
- 语言:TypeScript(宿主)/ 手写客户端 bundle(浏览器)/ Python(流式 API)
|
|
105
133
|
|
|
106
|
-
##
|
|
134
|
+
## 构建与发布
|
|
107
135
|
|
|
108
136
|
```bash
|
|
109
137
|
pnpm install
|
|
110
|
-
pnpm build
|
|
138
|
+
pnpm build # 编译宿主代码(lib/)
|
|
139
|
+
pnpm publish # 发布到 npm(files: lib, scripts, cordis.patch.yml)
|
|
111
140
|
```
|
|
112
141
|
|
|
113
|
-
|
|
142
|
+
从 GitHub 安装会自动执行 `prepare` 脚本编译;`lib/client.js` 为手写客户端 bundle,随仓库发布。
|
|
114
143
|
|
|
115
144
|
## 变更记录
|
|
116
145
|
|
package/README_EN.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# dsh-gsv-tts
|
|
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.
|
|
4
|
+
|
|
5
|
+
中文 README: [README.md](README.md)
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Voice Settings panel**: Settings → Voice Settings — configure the engine, voices, auto-read, etc., with **hot-applied changes** (no restart needed)
|
|
10
|
+
- **Engine switch**: start/stop the local GSV-TTS-Lite engine with one toggle (off by default)
|
|
11
|
+
- **Read-aloud button**: a 🔊 button next to copy/like on every assistant message reads that result aloud (thinking/reasoning excluded); when the engine is off it explains why
|
|
12
|
+
- **Auto-read**: automatically synthesize assistant replies when enabled
|
|
13
|
+
- **TTS tools**: `tts_speak` (streaming, returns a same-origin short link), `tts_list_voices`, `tts_health_check`, `tts_setup_engine`
|
|
14
|
+
- **Audio delivery**: synthesized audio is saved as WAV and served through the DSH web server as a same-origin short link (no more giant data URLs in model context)
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Choose one of the two methods, then enable it in Settings:
|
|
19
|
+
|
|
20
|
+
### Option 1: Install from npm
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
dsh plugin --profile web add dsh-gsv-tts
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Option 2: Install from GitHub
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
dsh plugin --profile web add "github:TaoruiLiu19/dsh-gsv"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> **About profiles**: the commands above use the `web` profile as an example. Desktop users typically use the `desktop` profile — just replace `web` with `desktop`.
|
|
33
|
+
|
|
34
|
+
After installing, restart DSH. The tools register automatically and a "Voice Settings" item appears in Settings.
|
|
35
|
+
|
|
36
|
+
> 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.
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
1. **Install the engine**: ask the agent to call `tts_setup_engine` (or install manually below)
|
|
41
|
+
2. **Start the engine**: Settings → Voice Settings → toggle "Start engine" on and wait until it shows "Running" (model loading takes ~15–90 s)
|
|
42
|
+
3. **Add a voice**: Settings → Voice Settings → "Voice presets" → Add voice → fill in the four fields → Save
|
|
43
|
+
4. **Read aloud**: click the 🔊 button next to any assistant message, or ask the agent to call `tts_speak`
|
|
44
|
+
|
|
45
|
+
## Screenshots
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
*Settings → Voice Settings: engine switch, TTS configuration, help*
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
*The 🔊 read-aloud button in the message action row (tooltip "Read result")*
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
*The "Running" state after the engine starts*
|
|
58
|
+
|
|
59
|
+
## Installing the GSV-TTS-Lite Engine
|
|
60
|
+
|
|
61
|
+
### Option 1: Automatic (recommended)
|
|
62
|
+
|
|
63
|
+
Ask the agent to call `tts_setup_engine`. It automatically: detects Python → installs `gsv-tts-lite==0.4.7` → clones the repo → installs dependencies → deploys the streaming API → starts the service.
|
|
64
|
+
|
|
65
|
+
### Option 2: Manual
|
|
66
|
+
|
|
67
|
+
1. Install **Python 3.10+** (3.12 recommended) with `pip` available
|
|
68
|
+
2. Install the core package: `pip install gsv-tts-lite==0.4.7`
|
|
69
|
+
3. Clone the repo: `git clone https://github.com/chinokikiss/GSV-TTS-Lite.git`
|
|
70
|
+
4. Install API dependencies: `pip install -r <repo>/API/requirements.txt`
|
|
71
|
+
5. Copy `dsh_stream_api.py` from this plugin's `scripts/` folder into `<repo>/API/` (true streaming API)
|
|
72
|
+
6. Download the models (`s1v3.ckpt`, `s2Gv2ProPlus.pth`, ...) into `<repo>/models/`
|
|
73
|
+
7. Start: `python <repo>/API/dsh_stream_api.py -p 9880 --models_dir <repo>/models`
|
|
74
|
+
8. In Settings → Voice Settings, toggle the engine on to verify
|
|
75
|
+
|
|
76
|
+
> Example audio lives in `<repo>/examples/` (`laffey.mp3`, `AnAn.ogg`) — usable as test voices.
|
|
77
|
+
|
|
78
|
+
## Adding a Voice
|
|
79
|
+
|
|
80
|
+
1. Open Settings → Voice Settings
|
|
81
|
+
2. Under "Voice presets", click "Add voice"
|
|
82
|
+
3. Fill in the four fields:
|
|
83
|
+
|
|
84
|
+
| Field | Description | Example |
|
|
85
|
+
|-------|-------------|---------|
|
|
86
|
+
| `Voice name` | Voice identifier used by `tts_speak` and the 🔊 button | `Laffey` |
|
|
87
|
+
| `Speaker audio path` | Reference audio of the target voice (defines who it sounds like) | `D:\GSV\GSV-TTS-Lite\examples\laffey.mp3` |
|
|
88
|
+
| `Prompt audio path` | Intonation/emotion reference audio | `D:\GSV\GSV-TTS-Lite\examples\AnAn.ogg` |
|
|
89
|
+
| `Prompt text` | The text of the prompt audio (required — the engine has no ASR fallback) | `ちが……ちがう。レイア、貴様は間違っている。` |
|
|
90
|
+
|
|
91
|
+
4. Click "Save" — changes apply instantly, no restart
|
|
92
|
+
5. Leave the default voice empty to use the first voice in the list
|
|
93
|
+
|
|
94
|
+
> Reference audio paths must be **local paths accessible from the engine host or reachable URLs**.
|
|
95
|
+
|
|
96
|
+
## Voice Settings Reference
|
|
97
|
+
|
|
98
|
+
| Field | Description | Default |
|
|
99
|
+
|-------|-------------|---------|
|
|
100
|
+
| Engine switch | Start/stop the GSV-TTS-Lite engine process | Off |
|
|
101
|
+
| `apiUrl` | Engine API URL | `http://localhost:9880` |
|
|
102
|
+
| `defaultVoice` | Default voice (empty = first voice) | empty |
|
|
103
|
+
| `timeout` | Request timeout (ms) | `30000` |
|
|
104
|
+
| `installDir` | Engine install directory | `./GSV-TTS-Lite` |
|
|
105
|
+
| `autoPlay` | Auto-read assistant replies | `false` |
|
|
106
|
+
| `voices` | Voice preset list | empty |
|
|
107
|
+
|
|
108
|
+
Config is stored in DSH settings (the `dsh-gsv-tts:` section of `~/.dsh/settings.yaml`) and hot-applied on change.
|
|
109
|
+
|
|
110
|
+
## Tools
|
|
111
|
+
|
|
112
|
+
| Tool | Purpose |
|
|
113
|
+
|------|---------|
|
|
114
|
+
| `tts_speak` | Text-to-speech with voice selection; streaming; returns a same-origin short link |
|
|
115
|
+
| `tts_list_voices` | List configured voice presets |
|
|
116
|
+
| `tts_health_check` | Check engine/API/Python/repo status |
|
|
117
|
+
| `tts_setup_engine` | One-click GSV-TTS-Lite engine installation |
|
|
118
|
+
|
|
119
|
+
## FAQ
|
|
120
|
+
|
|
121
|
+
- **Engine not running**: Settings → Voice Settings → toggle on (model loading takes ~15–90 s)
|
|
122
|
+
- **Models missing**: the first start will warn; put the models into the `models` directory
|
|
123
|
+
- **The read button says "engine not started"**: start the engine in Voice Settings first
|
|
124
|
+
- **Reference audio unavailable**: use a local path accessible from the engine host or a reachable URL
|
|
125
|
+
|
|
126
|
+
## Tech Stack
|
|
127
|
+
|
|
128
|
+
- DSH plugin framework: Cordis + `@deepseek-ai/dsh-tools`
|
|
129
|
+
- Config schema: `@deepseek-ai/schemastery`
|
|
130
|
+
- Settings panel: `@deepseek-ai/dsh-settings` + client `settings.section` slots
|
|
131
|
+
- TTS engine: GSV-TTS-Lite 0.4.7
|
|
132
|
+
- Languages: TypeScript (host) / hand-written client bundle (browser) / Python (streaming API)
|
|
133
|
+
|
|
134
|
+
## Build & Publish
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pnpm install
|
|
138
|
+
pnpm build # compile host code (lib/)
|
|
139
|
+
pnpm publish # publish to npm (files: lib, scripts, cordis.patch.yml)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Installing from GitHub runs the `prepare` script automatically; `lib/client.js` is a hand-written client bundle shipped with the repo.
|
|
143
|
+
|
|
144
|
+
## Changelog
|
|
145
|
+
|
|
146
|
+
- **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
|
|
147
|
+
- **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
|
|
148
|
+
|
|
149
|
+
## Known Limitations
|
|
150
|
+
|
|
151
|
+
- Playback is a clickable markdown link; inline `<audio>` playback needs a client extension (planned)
|
|
152
|
+
- Generated audio lives in the system temp dir (`%TEMP%/dsh-gsv-tts`), purged on startup, capped at 200 files per session
|
|
153
|
+
- `tts_setup_engine` shells out to pip/git; those tools must be available
|
|
154
|
+
- Empty `promptText` relies on the engine's ASR capability (capability-probed); synthesis fails with a clear error when unsupported
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gsv-tts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "DSH plugin for GSV-TTS-Lite: voice presets, auto-read, engine setup assistant, read-aloud button, and settings panel",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"lib",
|
|
21
21
|
"scripts",
|
|
22
|
-
"cordis.patch.yml"
|
|
22
|
+
"cordis.patch.yml",
|
|
23
|
+
"docs",
|
|
24
|
+
"README.md",
|
|
25
|
+
"README_EN.md"
|
|
23
26
|
],
|
|
24
27
|
"dsh": {
|
|
25
28
|
"bundle": {
|