dsh-gsv-tts 5.1.0 → 5.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/CHANGELOG.md +28 -0
- package/CHANGELOG_EN.md +28 -0
- package/README.md +315 -290
- package/README_EN.md +315 -290
- package/docs/images/architecture.png +0 -0
- package/docs/voices.json +66 -49
- package/lib/audio-store.d.ts +3 -0
- package/lib/audio-store.d.ts.map +1 -1
- package/lib/audio-store.js +53 -8
- package/lib/audio-store.js.map +1 -1
- package/lib/client.js +414 -86
- package/lib/config.d.ts +3 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +6 -1
- package/lib/config.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +256 -56
- package/lib/index.js.map +1 -1
- 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 +95 -0
- package/lib/providers/deepseek.d.ts.map +1 -0
- package/lib/providers/deepseek.js +265 -0
- package/lib/providers/deepseek.js.map +1 -0
- package/lib/providers/edge.d.ts +18 -2
- package/lib/providers/edge.d.ts.map +1 -1
- package/lib/providers/edge.js +37 -4
- package/lib/providers/edge.js.map +1 -1
- package/lib/tts.service.d.ts +26 -0
- package/lib/tts.service.d.ts.map +1 -1
- package/lib/tts.service.js +185 -8
- package/lib/tts.service.js.map +1 -1
- package/lib/types.d.ts +9 -4
- package/lib/types.d.ts.map +1 -1
- package/package.json +90 -89
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
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.3.0] - 2026-11-14
|
|
6
|
+
|
|
7
|
+
### 官方语音(DeepSeek)
|
|
8
|
+
- 新增第三种 TTS 提供方 `deepseek`:调用 `https://api.deepseek.com/v1/tools/tts`,音色 `stella`(海星)/ `tide`(暗潮),10 种语种按文本自动识别
|
|
9
|
+
- 设置面板新增「官方语音(DeepSeek)」模式;**默认零填写**:通过 `ctx.get('credentials')` 按 `deepseekApiKeyEnv`(默认 `DEEPSEEK_API_KEY`)从 Harness 凭据服务复用模型鉴权那份 Key,不再要求用户重新粘贴
|
|
10
|
+
- 可选 `deepseekApiKey` 手填覆盖(用独立额度);凭据服务缺失/异常时回退同名环境变量;引用名留空则完全不查凭据
|
|
11
|
+
- 官方接口返回完整 WAV:提供方逐段解出 16-bit PCM;短文本装 WAV 落盘,整段朗读边收边写文件(RIFF/data 长度回填),内存不随文本线性增长
|
|
12
|
+
- 单段合成带真实时长(按采样参数换算),进度条可用
|
|
13
|
+
- 「整段播放 / 下载」支持官方语音:`/speak/full` 走 `synthesizeLong`,一次落盘可 seek
|
|
14
|
+
- **修复切换卡顿**:设置面板切到官方语音需等约 1 秒——切换前先 `await` 音色请求,且当时健康探活是真实试合成(1–4 秒),新请求排在它后面。现改为:先本地切换(零等待),官方音色用内置列表(不发请求),Edge 音色拉取一次后缓存,健康探活改用免费 `GET /models`(实测 110–300ms,且不再计费)
|
|
15
|
+
- 切换时把 `defaultVoice` 与 `provider` 一并落定,避免配置快照刷新把下拉冲回旧值
|
|
16
|
+
- 官方语音不参与本地引擎启停与预热;无 Key 时健康检查返回明确提示,不静默失败
|
|
17
|
+
- **未发布**:等实机音质 / 首音延迟 / 实际扣费实测通过后再定版本号
|
|
18
|
+
|
|
19
|
+
## [5.2.0] - 2026-11-10
|
|
20
|
+
|
|
21
|
+
### Edge 在线端点
|
|
22
|
+
- Edge 合成迁移到 `api.msedgeservices.com`(改用 `node-edge-tts`),修复旧 `speech.platform.bing.com` 端点 403 / 握手一直挂起的问题
|
|
23
|
+
- Edge 音色列表仍由 `edge-tts-universal` 提供;健康检查恢复可用
|
|
24
|
+
|
|
25
|
+
### 整段播放 / 下载 + 选中朗读
|
|
26
|
+
- 新增「整段」按钮:按当前回复/选中文字生成完整 WAV,可拖动进度、下载;默认流式朗读不变,首音不受影响
|
|
27
|
+
- 新增选中文字朗读:选中对话正文后浮出「朗读选中」,走流式 `/speak`(支持 `text` 入参)
|
|
28
|
+
- `AudioStore` 支持 HTTP Range / HEAD,完整音频可 seek
|
|
29
|
+
- 本地整段音频用流式 PCM 直接写 WAV,不设 30 秒超时;长回复不会再被截断
|
|
30
|
+
- 整段生成支持取消(停止/关闭页面即中断)
|
|
31
|
+
- Edge 整段返回可用的 `duration`(24 kHz / 48 kbps CBR 按字节换算),并把 AbortSignal 传入在途分段
|
|
32
|
+
|
|
5
33
|
## [5.1.0] - 2026-11-06
|
|
6
34
|
|
|
7
35
|
### 首音性能优化(GSV 本地)
|
package/CHANGELOG_EN.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
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.3.0] - 2026-11-14
|
|
6
|
+
|
|
7
|
+
### Official voices (DeepSeek TTS)
|
|
8
|
+
- Third TTS provider `deepseek`: calls `https://api.deepseek.com/v1/tools/tts` with voices `stella` and `tide`; language is auto-detected from the text
|
|
9
|
+
- 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
|
|
10
|
+
- 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
|
|
11
|
+
- 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
|
|
12
|
+
- Per-segment synthesis reports real duration (derived from sample format) for the progress bar
|
|
13
|
+
- "Full audio / download" supports official voices through `synthesizeLong` on `/speak/full`
|
|
14
|
+
- **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)
|
|
15
|
+
- Persist `defaultVoice` together with `provider` on switch so a config snapshot refresh cannot reset the dropdown
|
|
16
|
+
- Official voices never start or warm up the local engine; a missing key produces an explicit health message instead of a silent failure
|
|
17
|
+
- **Not released**: wait for real-device quality / latency / billing checks before choosing a version number
|
|
18
|
+
|
|
19
|
+
## [5.2.0] - 2026-11-10
|
|
20
|
+
|
|
21
|
+
### Edge online endpoint
|
|
22
|
+
- Edge synthesis now uses `api.msedgeservices.com` via `node-edge-tts`, fixing the old `speech.platform.bing.com` 403 / hanging handshake
|
|
23
|
+
- Edge voice list still comes from `edge-tts-universal`; health check is available again
|
|
24
|
+
|
|
25
|
+
### Full audio / download + read selection
|
|
26
|
+
- New "Full" player action: generates a complete WAV for the current reply or selected text, with seek and download; normal read-aloud still streams, so first audio is unchanged
|
|
27
|
+
- Read selected text from the chat with a floating "Read selection" button; it uses streaming `/speak` (`text` input)
|
|
28
|
+
- `AudioStore` supports HTTP Range / HEAD for seekable complete audio
|
|
29
|
+
- Local full audio is streamed straight into a WAV file with no 30 s timeout, so long replies are no longer cut off
|
|
30
|
+
- Full-audio generation can be cancelled by stop / closing the page
|
|
31
|
+
- Edge full audio now returns a usable `duration` (24 kHz / 48 kbps CBR from bytes) and passes AbortSignal into the in-flight segment
|
|
32
|
+
|
|
5
33
|
## [5.1.0] - 2026-11-06
|
|
6
34
|
|
|
7
35
|
### Faster first audio (local GSV)
|