dsh-voice-mode 0.7.19 → 0.7.21

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.en.md CHANGED
@@ -16,7 +16,7 @@ interrupts playback and the running turn. No API key.
16
16
 
17
17
  ![Real recording: streaming transcription → auto-send → sentence-by-sentence read-aloud with live captions](https://raw.githubusercontent.com/qishuilalala/dsh-voice-mode/HEAD/plugin/dsh-voice-mode/assets/demo-voice-flow.gif)
18
18
 
19
- > **Runtime changes (most recent batch: v0.7.10, 2026-09-18)**: **Silent-audio causes in the output pipeline fixed** — ① a sentence whose cloud-TTS synthesis fails after 3 retries is no longer dropped silently (the status bar now says one sentence failed and was skipped; previously this showed up as "the reply is occasionally not read" with no way to tell why); ② audio playback no longer goes silent after the browser suspends the AudioContext (background tab / long idle) — the context is resumed on every enqueue and on any click/keypress; ③ dropped incomplete sentences (SSE frame loss) now leave a diagnostic trace. Otherwise as v0.7.9: **Wake-word pipeline overhaul** (Issue #10 + real-machine retest) — a harness driving the real engine pinpointed and fixed five flow defects: ① TTS echo polluting the standby segment while the agent reads (could not wake); ② only above-threshold frames uploaded, so trailing characters never flushed (wake word truncated); ③ discarding the whole segment on a wake hit (saying "wake word + command" in one breath sent only the tail); ④ the command hanging when the hit arrived after you stopped speaking; ⑤ pausing after the wake word closed the command window (command lost). **The wake word may now be said together with your command — it is stripped and never sent**, standby live-shows what it heard, and "wake word … pause … command" works. Otherwise as v0.7.7: Edge cloud TTS by default, local TTS (VITS / Kokoro) optional; silence split defaults to 1500 ms.
19
+ > **Runtime changes (most recent batch: v0.7.17 – v0.7.19, 2026-10-02)**: (1) **Settings work on every dsh version** — fixed the settings page and persistence on dsh 0.1.7+ (dedicated Settings → Voice Mode page, writes survive restarts); (2) **i18n reworked** — the UI follows dsh's official language setting, Chinese/English are fully consistent and switch without a reload; (3) **fixed fresh-install failures with npm/pnpm and `failed to import` on dsh ≥0.1.7** (affects 0.7.17 and earlier — please upgrade to ≥0.7.18); (4) **local Kokoro fixed on the official Electron desktop host** — needs Node.js ≥18 on PATH (see the desktop note below). Earlier batches (v0.7.10: silent-audio fixes, etc.) and the full history are in [`CHANGELOG.md`](https://github.com/qishuilalala/dsh-voice-mode/blob/main/CHANGELOG.md).
20
20
 
21
21
  ---
22
22
 
@@ -303,6 +303,23 @@ flowchart LR
303
303
 
304
304
  ---
305
305
 
306
+ ## 🔐 Permissions and data flow
307
+
308
+ An honest disclosure of what the plugin does (mapped to the awesome-dsh-plugin capability scan: `network / fs-read / fs-write / shell / env`):
309
+
310
+ | Category | What it does | Where data goes |
311
+ | --- | --- | --- |
312
+ | **network** | (1) The default read-aloud engine **Edge** sends the **reply text to be spoken** over WebSocket to Microsoft `speech.platform.bing.com` (cloud synthesis — switch to local VITS / Kokoro to stay fully offline); (2) downloads local models on first use from `huggingface.co` (or your configured mirror `hf-mirror.com`) with a host allowlist and pinned SHA256; (3) registers loopback HTTP routes `/voice-mode/*` on the dsh host (loopback only by default; LAN needs `allowLan`) | Microphone audio **never leaves your machine** (recognition runs locally via sherpa-onnx); only reply text goes to Microsoft, and only with the Edge engine |
313
+ | **fs-read / fs-write** | Model cache (Linux/macOS `~/.cache/dsh-voice-mode/models/`, Windows `%LOCALAPPDATA%\dsh-voice-mode\models\`); the dsh 0.1.7+ settings overlay `$DSH_HOME/voice-mode.settings.json`; **never touches your workspace files** | All local |
314
+ | **shell (child processes)** | Local TTS synthesis runs in a separate child process (`child_process.fork` → `lib/tts-vits-worker.cjs`); when the host is Electron (the official desktop app), it additionally probes and launches a real Node.js for Kokoro (`node -p …` to check the version). **It never executes user input and never builds shell command strings** | Local |
315
+ | **env** | Reads only `DSH_HOME`, `LOCALAPPDATA` (for directories) and the optional `DSHVM_NODE`; **no API key is read or needed** | — |
316
+
317
+ Also: the on-device recording fixture used for debugging is **off by default**; the plugin sends no telemetry. See [`SECURITY.md`](https://github.com/qishuilalala/dsh-voice-mode/blob/main/SECURITY.md) for the threat model and how to report vulnerabilities.
318
+
319
+ ### Compatibility declaration (what the plugin market's version filter reads)
320
+
321
+ `package.json` declares `engines.dsh = ">=0.1.1-rc.2"` (the market uses it for "filter by host version"). Verified range: **0.1.1-rc.2 → 0.2.1-alpha.1** (including an Electron host equivalent to the official desktop app). The upper bound is open; a weekly CI check watches upstream releases and opens an issue for any uncovered version. `peerDependencies` only lists `@deepseek-ai/cordis` and `react` (provided by the host).
322
+
306
323
  ## 🚧 Known limitations
307
324
 
308
325
  - Barge-in relies on browser echo cancellation (`echoCancellation`); loud speaker volume may leak into the mic (no JS-level AEC)
package/README.md CHANGED
@@ -17,7 +17,7 @@ DeepSeek Harness 语音双工对话模式:会话内一键进入 → 边说边
17
17
 
18
18
  ![全双工对话闭环:声音 → 文字 → 声音](https://raw.githubusercontent.com/qishuilalala/dsh-voice-mode/HEAD/plugin/dsh-voice-mode/assets/duplex-banner.png)
19
19
 
20
- > **运行时变更(最近一批:v0.7.10,2026-09-18)**:**输出链路静默丢音根治**——① 云端 TTS 单句重试耗尽后不再静默跳句(现在状态条提示「有一句朗读失败,已跳过」,此前表现为「AI 回复偶尔不朗读」且无从判断);② 浏览器挂起 AudioContext 后的「无声播放」(UI 显示朗读中、字幕照走)现在每次入队 + 任意点击/按键自动恢复;③ SSE 丢帧导致的坏句丢弃留诊断痕迹。其余同 v0.7.9:**唤醒词链路全面修复**(Issue #10 + 真机复测)——台架驱动真引擎逐项定位并修掉五处流程缺陷:① 朗读期 TTS 回声污染待机段(喊不醒);② 只上传超门限帧导致尾字不 flush(唤醒词只剩半截);③ 唤醒命中丢整段(连说「唤醒词+命令」只发出去尾部几个字);④ 命中晚于停口时命令悬挂不定稿;⑤ 只喊唤醒词后停顿会关掉命令窗口(命令丢失)。**现在唤醒词可与命令连说、词头自动剥离不进消息**,待机态实时显示「它听到了什么」,支持「唤醒词…停顿…命令」。其余同 v0.7.7:朗读默认 Edge 云端,本地 TTS(VITS / Kokoro)可选;静音断句默认 1500 毫秒。
20
+ > **运行时变更(最近一批:v0.7.17 ~ v0.7.19,2026-10-02)**:① **设置面全版本打通**——dsh 0.1.7+ 上设置页与持久化修复(Settings → 语音模式 专属页、写入与重启保留);② **国际化重做**——界面语言跟随 dsh 官方语言设置,中/英文完整一致、切换无需刷新;③ **修复 npm/pnpm 全新安装失败与 dsh ≥0.1.7 已安装形态「failed to import」**(0.7.17 及更早版本受影响,请升级到 ≥0.7.18);④ **官方桌面端(Electron)下本地 Kokoro 修复**——需系统 PATH 上有 Node.js ≥18(见下文「桌面端提示」)。此前批次(v0.7.10:输出链路静默丢音根治等)与完整历史见 [`CHANGELOG.md`](https://github.com/qishuilalala/dsh-voice-mode/blob/main/CHANGELOG.md)。
21
21
 
22
22
  ---
23
23
 
@@ -258,10 +258,27 @@ flowchart LR
258
258
  | 热词偏置 | 无 | 无(已移除,详见 v0.7.7 文档说明) |
259
259
  | 字幕 a11y | 无 | **4 档字号 + 3 档宽度 + 主题跟随** |
260
260
  | 唤醒词 | 无 | **轻量流式匹配 + 前缀语气词白名单** |
261
- | 兼容 dsh | — | **0.1.1-rc.2 起全版本(含 0.2.0-rc.2)** |
261
+ | 兼容 dsh | — | **0.1.1-rc.2 起全版本(含 0.2.1-alpha.1)** |
262
262
 
263
263
  ---
264
264
 
265
+ ## 🔐 权限与数据流声明
266
+
267
+ 插件如实声明它会做的事(与 awesome-dsh-plugin 的能力扫描 `network / fs-read / fs-write / shell / env` 一一对应):
268
+
269
+ | 类别 | 具体行为 | 数据去向 |
270
+ | --- | --- | --- |
271
+ | **network** | ① 默认朗读引擎 **Edge**:把**待朗读的回复文本**经 WebSocket 发给微软 `speech.platform.bing.com`(云端合成;想完全离线请切到本地 VITS / Kokoro);② 首次使用本地模型时从 `huggingface.co`(或你配置的镜像 `hf-mirror.com`)下载,主机白名单 + 固定 SHA256 校验;③ 在 dsh 宿主上注册回环 HTTP 路由 `/voice-mode/*`(默认仅回环,需 `allowLan` 才对局域网开放) | 麦克风音频**不出本机**(识别在本地 sherpa-onnx);仅回复文本在 Edge 引擎下发往微软 |
272
+ | **fs-read / fs-write** | 模型缓存(Linux/macOS `~/.cache/dsh-voice-mode/models/`,Windows `%LOCALAPPDATA%\dsh-voice-mode\models\`);dsh 0.1.7+ 的设置覆盖层 `$DSH_HOME/voice-mode.settings.json`;**不读写你的工作区文件** | 全部在本机 |
273
+ | **shell(子进程)** | 本地 TTS 合成跑在独立子进程(`child_process.fork` → `lib/tts-vits-worker.cjs`);宿主为 Electron(官方桌面端)时,为 Kokoro 额外探测并启动一个真正的 Node.js(`node -p …` 探测版本,见 ADR/兼容契约)。**不执行用户输入、不经 shell 拼接命令** | 本机 |
274
+ | **env** | 仅读取 `DSH_HOME`、`LOCALAPPDATA`(取目录)与可选的 `DSHVM_NODE`;**不读取、不需要任何 API Key** | — |
275
+
276
+ 补充:调试用的真机录制(fixture)默认**关闭**;插件不上传遥测。完整威胁模型与漏洞报告方式见仓库根目录 [`SECURITY.md`](https://github.com/qishuilalala/dsh-voice-mode/blob/main/SECURITY.md)。
277
+
278
+ ### 兼容声明(插件市场的版本筛选依据)
279
+
280
+ `package.json` 声明 `engines.dsh = ">=0.1.1-rc.2"`(插件市场据此在「按宿主版本筛选」时判定兼容)。已实测范围 **0.1.1-rc.2 → 0.2.1-alpha.1**(含官方桌面端等价的 Electron 宿主);上限开放,由每周 CI 巡检上游新版本并复验,出现未覆盖版本会自动开 issue。`peerDependencies` 仅声明 `@deepseek-ai/cordis` 与 `react`(宿主提供)。
281
+
265
282
  ## 🚧 已知限制
266
283
 
267
284
  - 发声打断依赖浏览器回声消除(`echoCancellation`);扬声器音量过大时可能漏声到麦克风
package/lib/client.js CHANGED
@@ -3099,7 +3099,7 @@ var TELEMETRY_VIEW = [
3099
3099
  { stage: "first-tts-chunk", key: "telFirstChunk" },
3100
3100
  { stage: "first-audio-played", key: "telFirstPlayed" }
3101
3101
  ];
3102
- var BUILD_TAG = "62781d5";
3102
+ var BUILD_TAG = "b51f379";
3103
3103
  var TELEMETRY_FLAG = "dsh-voice-mode.telemetry";
3104
3104
  var telemetryEnabled = typeof localStorage !== "undefined" && localStorage.getItem(TELEMETRY_FLAG) === "1";
3105
3105
  console.log("[dsh-voice] build=" + BUILD_TAG);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-voice-mode",
3
3
  "description": "Full-duplex voice plugin for DeepSeek Harness: local zipformer2 streaming ASR (no API key) → editable draft; Edge TTS or local VITS / Kokoro read-aloud with live captions; true barge-in; hardened HTTP surface + model SHA256 pinning; compatible with all dsh releases since 0.1.1-rc.2 (verified 0.1.1-rc.2 → 0.2.0-rc.2).",
4
4
  "icon": "./icon.svg",
5
- "version": "0.7.19",
5
+ "version": "0.7.21",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
8
8
  "repository": {
@@ -60,9 +60,7 @@
60
60
  "typecheck:dual": "bash scripts/typecheck-dual.sh",
61
61
  "smoke:runtime": "bash scripts/smoke-runtime.sh",
62
62
  "verify:dual": "bash scripts/verify-dual.sh",
63
- "check:dsh-version": "bash scripts/check-dsh-version.sh",
64
- "e2e:full": "bash scripts/full-e2e.sh",
65
- "release": "bash scripts/release.sh"
63
+ "e2e:full": "bash scripts/full-e2e.sh"
66
64
  },
67
65
  "dsh": {
68
66
  "bundle": {