@goodandready/dsh-tts 0.4.28 → 0.4.30

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 CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.30
4
+
5
+ ### Fixed
6
+ - **Supply Chain Security & Updater** (#196, #199):
7
+ - Removed `--config.minimumReleaseAge=0` bypass in `lib/updater.js:installExact`, respecting pnpm supply-chain quarantine during updates.
8
+ - Consolidated updater endpoint to canonical `/api/dsh-tts/update`, removing legacy `/dsh-tts/updater` route alias.
9
+ - Implemented shared `updaterMutex` returning HTTP 409 `Install already in progress` across concurrent requests.
10
+ - **Theme Tokens & Design System** (#197):
11
+ - Replaced legacy CSS custom properties with canonical DSH core theme tokens (`--dsw-state-warn-primary`, `--dsw-brand-primary`, `--dsw-bg-layer-3`).
12
+ - **Client Networking & Timeout Safety** (#198):
13
+ - Wrapped all client `fetch` calls in `clientFetch(url, options)` utility with configurable 15-second `AbortController` timeout.
14
+ - Added error rejection handlers on fire-and-forget telemetry, settings, and player requests.
15
+
16
+ ## 0.4.29
17
+
18
+ ### Fixed
19
+ - **Settings & Revision Management** (#151, #152):
20
+ - Added robust `extractRevision` supporting nested Schemastery namespaces and entries array.
21
+ - Return revision in `GET /dsh-tts/config` and send it in `PUT /dsh-tts/config`.
22
+ - Eliminated stale `savedConfig` caching in `live()`, enabling direct live Schemastery volatile box evaluation.
23
+ - **Audio Pipeline, Tool Schema & Dedup** (#156, #157, #166, #173, #175, #190):
24
+ - Enforced speech preparation, maxChars, and summarizeReply before sentence splitting in `speakAsItGoes`.
25
+ - Added `id: { type: 'string' }` to `speak_text` tool output schema under `additionalProperties: false` preventing core ToolOutputError.
26
+ - Included credential slot reference in cache and flight fingerprints avoiding cross-credential collisions.
27
+ - In-memory index for synthesis cache avoiding O(N) fs scans.
28
+ - **Stream Hub & Web Player** (#158, #159, #160, #161, #174, #176, #186):
29
+ - `skipCurrent()` now cancels active browser SpeechSynthesis and clears busy state.
30
+ - `playAudio` resolves promise on NotAllowedError and detaches gesture listeners cleanly.
31
+ - Disconnect slow SSE subscribers exceeding backpressure buffer threshold.
32
+ - Registered updater routes inside ctx.effect with clean disposers.
33
+ - **Providers & Local Engines** (#165, #167, #168, #169, #170, #171, #172, #177, #178, #179, #180):
34
+ - Nested integrations parser in UI and gated /speak on disabled channels.
35
+ - Canonical EN defaults for Edge and eSpeak.
36
+ - 100% key parity for EN/ZH model hints.
37
+ - Google TTS validates MIME and wraps raw PCM in valid WAV container.
38
+ - Azure SSML includes required xmlns/mstts attributes.
39
+ - Robust model download locking, cancellation awaiting writer cleanup, and HTML error page rejection.
40
+ - **Release Hygiene & Sanitization** (#183, #184, #185):
41
+ - Removed outdated marketing claims from READMEs.
42
+ - Restored internal DEV docs while verifying exclusion from npm pack and GitHub mirror.
43
+ - Cleaned up publish-github script to handle negation patterns.
44
+
3
45
  ## 0.4.28
4
46
 
5
47
  ### Fixed
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- <h3>Multi-Provider Text-to-Speech Voice Synthesis with Local Neural Engines, Sub-300ms Streaming, IT Dictionary & Messenger Integration for DeepSeek Harness</h3>
5
+ <h3>Multi-Provider Text-to-Speech Voice Synthesis with Local Neural Engines, Real-time Streaming, IT Dictionary & Messenger Integration for DeepSeek Harness</h3>
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/@goodandready/dsh-tts"><img src="https://img.shields.io/npm/v/@goodandready/dsh-tts.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
@@ -49,7 +49,7 @@ graph LR
49
49
 
50
50
  subgraph Stream [Low-Latency Streaming]
51
51
  Scrub --> SSE[SSE /dsh-tts/stream]
52
- SSE --> Worklet[AudioWorklet PCM Processor]
52
+ SSE --> Player[Web Audio & HTML Audio Player]
53
53
  end
54
54
 
55
55
  subgraph Cache [Performance Layer]
@@ -59,7 +59,7 @@ graph LR
59
59
 
60
60
  subgraph Fallback [TTS Provider Fallback Chain]
61
61
  LRU -->|Cache Miss| Chain{Active Chain}
62
- Chain -->|Offline| P1[Edge TTS / Piper / eSpeak]
62
+ Chain -->|Online / Local| P1[Edge TTS / Piper / eSpeak]
63
63
  Chain -.->|Cloud Neural| P2[OpenAI / ElevenLabs / Google / Azure / Groq]
64
64
  Chain -.->|OpenAI-compatible| P3[SiliconFlow / DeepInfra / Fireworks / OpenRouter]
65
65
  Chain -.->|Other| P4[MiMo / MiniMax / Custom]
@@ -85,13 +85,14 @@ graph LR
85
85
 
86
86
  ## 🚀 Key Features
87
87
 
88
- ### 1. 📴 Offline system engines + optional future neural runtimes
89
- * **Edge TTS / Piper / eSpeak**: fully offline or free local/system synthesis without cloud API keys (Edge needs the `edge-tts` CLI).
88
+ ### 1. 📴 Local and system engines + optional future neural runtimes
89
+ * **Piper / eSpeak**: fully offline local synthesis without cloud API keys.
90
+ * **Edge TTS**: free online cloud synthesis without API keys (requires network connection and the `edge-tts` CLI).
90
91
  * **Kokoro-82M / F5-TTS**: weight download and status UI only. **Neural inference is not bundled** in this package — those providers fail with a clear reason and the fallback chain continues. Do not enable them expecting speech until a supported runtime is wired.
91
92
  * **ModelManager UI**: Direct manual installation in settings with real-time download progress bar, SHA-256 validation, and deletion. No silent or automatic multi-gigabyte downloads.
92
93
 
93
94
  ### 2. ⚡ Real-Time Streaming Audio (< 300 ms Latency)
94
- * **AudioWorklet (`TTSWorklet`)**: High-performance Web Audio Worklet processor playing seamless Float32Array PCM chunks at 24 kHz without audible clicks or buffer underruns.
95
+ * **HTML Audio & Web Audio Player**: Seamless queued audio playback with prebuffering, barge-in support, playback rate control, and instant browser fallback.
95
96
  * **Server-Sent Events (SSE)**: Dedicated `/dsh-tts/stream` route delivering synthesized chunks to connected browsers instantly.
96
97
 
97
98
  ### 3. 🎙️ Voice Duplex & VAD Barge-In (with `@goodandready/dsh-voice`)
@@ -173,7 +174,7 @@ dsh plugin --profile web add @goodandready/dsh-tts
173
174
 
174
175
  ---
175
176
 
176
- ## ⚙️ Configuration Recipes (`settings.yaml`)
177
+ ## ⚙️ Configuration Recipes (DSH Settings UI)
177
178
 
178
179
  ```yaml
179
180
  dsh-tts:
@@ -212,7 +213,7 @@ The plugin settings card (**Settings → Plugins → Plugin settings**) exposes
212
213
 
213
214
  Provider **API keys are never stored in plugin settings**. Paste them in the chain editor; values go to the DSH credential store via `PUT /dsh-tts/credential`.
214
215
 
215
- Config-only (not in the card): `*KeyEnv` fields (`openaiKeyEnv`, `elevenlabsKeyEnv`, …). They only rename the credential slot the plugin looks up. Change them in `settings.yaml` if you must rebind a key name; the defaults match the usual environment variable names.
216
+ Config-only (not in the card): `*KeyEnv` fields (`openaiKeyEnv`, `elevenlabsKeyEnv`, …). They only rename the credential slot the plugin looks up. Change them in the profile settings if you must rebind a key name; the defaults match the usual environment variable names.
216
217
 
217
218
 
218
219
  ## 🤖 HTTP Endpoints Reference
package/README.ru.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- <h3>Многопровайдерная озвучка ответов агента: облачные и системные offline-движки, потоковый звук, IT-словарь и интеграция с мессенджерами для DeepSeek Harness</h3>
5
+ <h3>Многопровайдерная озвучка ответов агента: облачные, локальные и системные движки, потоковый звук, IT-словарь и интеграция с мессенджерами для DeepSeek Harness</h3>
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/@goodandready/dsh-tts"><img src="https://img.shields.io/npm/v/@goodandready/dsh-tts.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
@@ -37,11 +37,11 @@
37
37
 
38
38
  ## ⚡ Обзор
39
39
 
40
- > **Честно про локальные нейросети:** Kokoro/F5 — только статус и загрузка весов. Inference **не входит** в пакет; эти провайдеры падают с понятной причиной, цепочка идёт дальше. Рабочий offline: Edge TTS, Piper, eSpeak.
40
+ > **Честно про локальные нейросети:** Kokoro/F5 — только статус и загрузка весов. Inference **не входит** в пакет; эти провайдеры падают с понятной причиной, цепочка идёт дальше. Рабочий offline: Piper, eSpeak (Edge TTS — бесплатный онлайн-сервис без ключей).
41
41
 
42
42
  **`dsh-tts`** обеспечивает качественное голосовое озвучивание ответов ассистента в веб-интерфейсе **DeepSeek Harness**. При включённой опции **«Читать ответы агента»**, каждая готовая реплика или потоковый фрагмент синтезируется на хосте и мгновенно воспроизводится в браузере.
43
43
 
44
- API-ключи никогда не передаются в браузер: синтез аудио выполняется на стороне хоста через **независимые цепочки отказоустойчивости (фолбеков)**, включая системные offline-движки (Edge TTS, Piper, eSpeak). Kokoro/F5 — только загрузка весов; inference не входит в пакет.
44
+ API-ключи никогда не передаются в браузер: синтез аудио выполняется на стороне хоста через **независимые цепочки отказоустойчивости (фолбеков)**, включая локальные и системные движки (Edge TTS — онлайн без ключей, Piper и eSpeak — offline). Kokoro/F5 — только загрузка весов; inference не входит в пакет.
45
45
 
46
46
  ```mermaid
47
47
  graph LR
@@ -51,7 +51,7 @@ graph LR
51
51
 
52
52
  subgraph Stream [Потоковый звук < 300 мс]
53
53
  Scrub --> SSE[SSE /dsh-tts/stream]
54
- SSE --> Worklet[AudioWorklet PCM процессор]
54
+ SSE --> Player[Web Audio & HTML Audio плеер]
55
55
  end
56
56
 
57
57
  subgraph Cache [Слой производительности]
@@ -61,7 +61,7 @@ graph LR
61
61
 
62
62
  subgraph Fallback [Цепочка фолбеков TTS]
63
63
  LRU -->|Промах кэша| Chain{Активная цепочка}
64
- Chain -->|Offline| P1[Edge TTS / Piper / eSpeak]
64
+ Chain -->|Online / Local| P1[Edge TTS / Piper / eSpeak]
65
65
  Chain -.->|Cloud| P2[OpenAI / ElevenLabs / Google / Azure / Groq]
66
66
  Chain -.->|Бесплатные облака| P3[EdgeTTS / SiliconFlow]
67
67
  Chain -.->|Системный фолбек| P4[Локальный Piper / eSpeak NG]
@@ -87,13 +87,14 @@ graph LR
87
87
 
88
88
  ## 🚀 Ключевые возможности
89
89
 
90
- ### 1. 📴 Offline-системные движки и честный статус нейросетей
91
- * **Edge TTS / Piper / eSpeak**: рабочий offline/системный синтез без облачных API-ключей.
90
+ ### 1. 📴 Локальные движки и честный статус нейросетей
91
+ * **Piper / eSpeak**: полностью автономный локальный оффлайн-синтез.
92
+ * **Edge TTS**: бесплатный онлайн-синтез через Microsoft без API-ключей (требует интернет и CLI `edge-tts`).
92
93
  * **Kokoro-82M / F5-TTS**: только UI и загрузка весов. **Inference не входит в пакет** — провайдер падает с понятной причиной, цепочка идёт дальше.
93
94
  * **ModelManager в UI**: Ручная загрузка моделей прямо из настроек плагина с отображением процентов и прогресс-бара, проверкой SHA-256 и кнопкой удаления. Никаких скрытых или автозагрузок гигабайтных весов.
94
95
 
95
96
  ### 2. ⚡ Потоковое воспроизведение звука с задержкой < 300 мс
96
- * **AudioWorklet (`TTSWorklet`)**: Высокопроизводительный процессор веб-аудио с бесшовным кольцевым буфером для воспроизведения PCM-чанков (24 кГц) без щелчков и пауз.
97
+ * **HTML Audio & Web Audio плеер**: Бесшовное воспроизведение аудио-очереди с предбуферизацией, поддержкой перебивания речи (barge-in), регулировкой скорости и отказоустойчивым fallback на синтез браузера.
97
98
  * **Server-Sent Events (SSE)**: Роут `/dsh-tts/stream` передаёт синтезированные куски речи сразу в браузер, исключая задержки традиционного полинга.
98
99
 
99
100
  ### 3. 🎙️ Голосовой диалог и VAD Barge-In (в связке с `@goodandready/dsh-voice`)
@@ -156,7 +157,7 @@ dsh plugin --profile web add @goodandready/dsh-tts
156
157
 
157
158
  ---
158
159
 
159
- ## ⚙️ Пример конфигурации (`settings.yaml`)
160
+ ## ⚙️ Пример конфигурации (Интерфейс настроек DSH)
160
161
 
161
162
  ```yaml
162
163
  dsh-tts:
@@ -195,7 +196,7 @@ dsh-tts:
195
196
 
196
197
  **API-ключи не хранятся в настройках плагина.** Вставляйте их в редакторе цепочки — значение уходит в credential store DSH через `PUT /dsh-tts/credential`.
197
198
 
198
- Только в конфиге (нет в карточке): поля `*KeyEnv` (`openaiKeyEnv`, `elevenlabsKeyEnv`, …). Они задают **имя** credential-слота; по умолчанию совпадают с привычными именами env-переменных. Меняйте в `settings.yaml`, если нужно перевязать имя ключа.
199
+ Только в конфиге (нет в карточке): поля `*KeyEnv` (`openaiKeyEnv`, `elevenlabsKeyEnv`, …). Они задают **имя** credential-слота; по умолчанию совпадают с привычными именами env-переменных. Меняйте в настройках профиля, если нужно перевязать имя ключа.
199
200
 
200
201
 
201
202
  ## 🤖 HTTP роуты API
package/README.zh.md CHANGED
@@ -47,9 +47,9 @@ graph LR
47
47
  Reply[💬 智能体生成文本] --> Scrub[智能过滤 & IT术语词典]
48
48
  end
49
49
 
50
- subgraph Stream [低延迟流式音频 < 300ms]
50
+ subgraph Stream [实时流式音频播放]
51
51
  Scrub --> SSE[SSE /dsh-tts/stream]
52
- SSE --> Worklet[AudioWorklet PCM 处理器]
52
+ SSE --> Player[Web Audio & HTML Audio 播放器]
53
53
  end
54
54
 
55
55
  subgraph Cache [性能缓存层]
@@ -90,8 +90,8 @@ graph LR
90
90
  * **Kokoro-82M / F5-TTS**:仅权重下载与状态展示。**推理未捆绑在本包中**,provider 会明确失败并继续 fallback。
91
91
  * **ModelManager 管理界面**:在设置中手动安装模型,实时显示下载进度条、SHA-256 校验和一键删除。无任何静默或自动下载。
92
92
 
93
- ### 2. ⚡ 实时流式音频播放(延迟 < 300ms)
94
- * **AudioWorklet (`TTSWorklet`)**:高性能 Web Audio Worklet 处理器,以 24kHz 采样率无缝播放 Float32Array PCM 数据块,无可感知的爆音或缓冲区欠载。
93
+ ### 2. ⚡ 实时流式音频播放
94
+ * **HTML Audio & Web Audio 播放器**:无缝队列音频播放,支持预缓冲、麦克风打断响应 (barge-in)、播放倍速控制以及浏览器原生语音故障回退。
95
95
  * **Server-Sent Events (SSE)**:专用 `/dsh-tts/stream` 路由将合成音频片段即时推送至浏览器。
96
96
 
97
97
  ### 3. 🎙️ 语音双工对话与 VAD 打断(配合 `@goodandready/dsh-voice`)
@@ -165,7 +165,7 @@ dsh plugin --profile web add @goodandready/dsh-tts
165
165
  API 密钥不写入插件设置,只在链编辑器粘贴,经 `PUT /dsh-tts/credential` 写入 DSH credential store。
166
166
 
167
167
 
168
- ## ⚙️ 配置示例(`settings.yaml`)
168
+ ## ⚙️ 配置说明(DSH 设置面板)
169
169
 
170
170
  ```yaml
171
171
  dsh-tts: