dsh-voice-mode 0.7.30 → 0.7.32
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 +3 -3
- package/README.md +3 -3
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/lib/client.js +1 -1
- package/lib/msedge-tts.cjs +76 -14
- package/package.json +3 -3
package/README.en.md
CHANGED
|
@@ -18,7 +18,7 @@ interrupts playback and the running turn. No API key.
|
|
|
18
18
|
|
|
19
19
|
> **Latest releases**: **v0.7.29** — adversarial-verification fix batch: long utterances no longer dropped, long read-aloud no longer cut by idle exit, Edge TTS no longer skips sentences containing `&`/`<`, Kokoro works offline, stalled downloads switch mirrors, tap again while connecting to cancel, screen readers no longer flooded by the status bar (20 fixes); **v0.7.28** — `Alt/Option+Enter` inside the composer toggles voice mode, a "Shortcuts" settings group with click-to-record, settings that apply immediately, hold-to-talk that starts from idle and exits after the reply, the mic button no longer steals composer focus, better read-aloud chunking for long text (PR #17 by @dyguests). Full history in the [CHANGELOG](https://github.com/qishuilalala/dsh-voice-mode/blob/main/CHANGELOG.md).
|
|
20
20
|
>
|
|
21
|
-
> **Runtime changes (v0.7.18 – v0.7.24)**: (1) **Settings work on every dsh version** — fixed the settings page and persistence on dsh 0.1.7+ (Settings → Voice Mode page, writes survive restarts); (2) **i18n rebuilt** — the UI follows dsh's official language setting, zh/en fully consistent, switching needs no refresh; (3) **fixed fresh npm/pnpm installs and the dsh ≥0.1.7 installed-form "failed to import"** (0.7.17 and earlier are affected — upgrade to ≥0.7.18); (4) **local Kokoro fixed under the official desktop (Electron) app** — needs Node.js ≥18 on PATH (or set `DSHVM_NODE`); (5) **v0.7.24: Edge cloud read-aloud restored** — since 2026-10-15 Microsoft's service rejects the old handshake (v0.7.23 and earlier are silent on the default Edge engine; local VITS / Kokoro are unaffected), so the inlined msedge-tts is bumped to 2.1.0; when read-aloud **fails several sentences in a row** the plugin now suggests switching to a local engine; plus host hardening (`/models/retry` is same-origin POST only, model-tree path checks, raw error strings no longer sent downstream). Compatible with dsh up to 0.2.
|
|
21
|
+
> **Runtime changes (v0.7.18 – v0.7.24)**: (1) **Settings work on every dsh version** — fixed the settings page and persistence on dsh 0.1.7+ (Settings → Voice Mode page, writes survive restarts); (2) **i18n rebuilt** — the UI follows dsh's official language setting, zh/en fully consistent, switching needs no refresh; (3) **fixed fresh npm/pnpm installs and the dsh ≥0.1.7 installed-form "failed to import"** (0.7.17 and earlier are affected — upgrade to ≥0.7.18); (4) **local Kokoro fixed under the official desktop (Electron) app** — needs Node.js ≥18 on PATH (or set `DSHVM_NODE`); (5) **v0.7.24: Edge cloud read-aloud restored** — since 2026-10-15 Microsoft's service rejects the old handshake (v0.7.23 and earlier are silent on the default Edge engine; local VITS / Kokoro are unaffected), so the inlined msedge-tts is bumped to 2.1.0; when read-aloud **fails several sentences in a row** the plugin now suggests switching to a local engine; plus host hardening (`/models/retry` is same-origin POST only, model-tree path checks, raw error strings no longer sent downstream). Compatible with dsh up to 0.2.2-alpha.2 (from 0.2.1-alpha.4/5 the Settings entry moved into the "Account menu" popover at the bottom of the sidebar; from 0.2.1-rc.3 that button only carries an `aria-label` — "Account menu" in English, "账号菜单" in Chinese — and both of this plugin's entry points still work).
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -295,7 +295,7 @@ flowchart LR
|
|
|
295
295
|
| Barge-in detection | Basic VAD | **3 sensitivity levels + echo gate + yield semantics** |
|
|
296
296
|
| Caption a11y | None | **4 font tiers + 3 width tiers + theme-following** |
|
|
297
297
|
| Wake word | None | **Lightweight streaming match + prefix filler whitelist** |
|
|
298
|
-
| dsh compatibility | — | **full range since 0.1.1-rc.2 (incl. 0.2.
|
|
298
|
+
| dsh compatibility | — | **full range since 0.1.1-rc.2 (incl. 0.2.2-alpha.2)** |
|
|
299
299
|
|
|
300
300
|
---
|
|
301
301
|
|
|
@@ -320,7 +320,7 @@ Also: the on-device recording fixture used for debugging is **off by default**;
|
|
|
320
320
|
|
|
321
321
|
### Compatibility declaration (what the plugin market's version filter reads)
|
|
322
322
|
|
|
323
|
-
`package.json` declares `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"` (the market uses it for "filter by host version"; from dsh 0.2.1-alpha.4 the next/alpha channels enforce `engines.dsh` alone as a hard check and refuse to load a plugin outside the range, so the upper bound is capped at 0.3.0 (written `<0.3.0-0` so 0.3.0 alpha/rc prereleases are excluded too) — an unverified new major is cleanly refused instead of silently broken). Verified range: **0.1.1-rc.2 → 0.2.
|
|
323
|
+
`package.json` declares `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"` (the market uses it for "filter by host version"; from dsh 0.2.1-alpha.4 the next/alpha channels enforce `engines.dsh` alone as a hard check and refuse to load a plugin outside the range, so the upper bound is capped at 0.3.0 (written `<0.3.0-0` so 0.3.0 alpha/rc prereleases are excluded too) — an unverified new major is cleanly refused instead of silently broken). Verified range: **0.1.1-rc.2 → 0.2.2-alpha.2** (including an Electron host equivalent to the official desktop app). 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).
|
|
324
324
|
|
|
325
325
|
## 🚧 Known limitations
|
|
326
326
|
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ dsh ≥0.1.7 上按钮挂在发送键左侧(`conversation.input.activity`)
|
|
|
31
31
|
|
|
32
32
|
> **最近两版**:**v0.7.29** 对抗验证修复批:长句定稿不丢、长朗读不被空闲退出、Edge 朗读 `&`/`<` 不再跳句、Kokoro 可离线、下载卡死自动换源、进入中再点即取消、读屏不再被状态条刷屏等 20 项;**v0.7.28** 输入框内 `Alt/Option+Enter` 切换语音模式 + 快捷键分组与「录制」录入 + 设置即时生效 + 按住说话空闲即录、回复后自动退出 + 点按钮不抢输入框焦点 + 长文本朗读分段改进(PR #17,@dyguests 贡献)。完整记录见 [CHANGELOG](https://github.com/qishuilalala/dsh-voice-mode/blob/main/CHANGELOG.md)。
|
|
33
33
|
>
|
|
34
|
-
> **运行时变更(v0.7.18 ~ v0.7.24)**:① **设置面全版本打通**——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(或设 `DSHVM_NODE`);⑤ **v0.7.24:恢复 Edge 云端朗读**——微软服务端自 2026-10-15 起拒绝旧版握手(v0.7.23 及更早的默认 Edge 朗读无声,本地 VITS / Kokoro 不受影响),内联的 msedge-tts 升到 2.1.0;朗读**连续失败时**会提示切换本地引擎;另有 host 加固(`/models/retry` 仅同源 POST、模型树路径校验、错误原文不下行)。兼容 dsh 至 0.2.
|
|
34
|
+
> **运行时变更(v0.7.18 ~ v0.7.24)**:① **设置面全版本打通**——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(或设 `DSHVM_NODE`);⑤ **v0.7.24:恢复 Edge 云端朗读**——微软服务端自 2026-10-15 起拒绝旧版握手(v0.7.23 及更早的默认 Edge 朗读无声,本地 VITS / Kokoro 不受影响),内联的 msedge-tts 升到 2.1.0;朗读**连续失败时**会提示切换本地引擎;另有 host 加固(`/models/retry` 仅同源 POST、模型树路径校验、错误原文不下行)。兼容 dsh 至 0.2.2-alpha.2(0.2.1-alpha.4/5 起设置入口移入侧栏底部「Account menu」弹出层,0.2.1-rc.3 起该按钮只剩 aria-label、中文标签为「账号菜单」,本插件两处入口仍有效)。
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
@@ -284,7 +284,7 @@ flowchart LR
|
|
|
284
284
|
| 打断检测 | 基础 VAD | **三档灵敏度 + 回声门控 + 让位语义** |
|
|
285
285
|
| 字幕 a11y | 无 | **4 档字号 + 3 档宽度 + 主题跟随** |
|
|
286
286
|
| 唤醒词 | 无 | **轻量流式匹配 + 前缀语气词白名单** |
|
|
287
|
-
| 兼容 dsh | — | **0.1.1-rc.2 起全版本(含 0.2.
|
|
287
|
+
| 兼容 dsh | — | **0.1.1-rc.2 起全版本(含 0.2.2-alpha.2)** |
|
|
288
288
|
|
|
289
289
|
---
|
|
290
290
|
|
|
@@ -309,7 +309,7 @@ flowchart LR
|
|
|
309
309
|
|
|
310
310
|
### 兼容声明(插件市场的版本筛选依据)
|
|
311
311
|
|
|
312
|
-
`package.json` 声明 `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"`(插件市场据此在「按宿主版本筛选」时判定兼容;dsh 0.2.1-alpha.4 起 next/alpha 通道由 `engines.dsh` 单独硬校验,不满足即拒绝加载,故上界封在 0.3.0(写作 `<0.3.0-0`,连 0.3.0 的 alpha/rc 预发布一并排除)——未验证的新大版本会被干净拒绝而非静默破损)。已实测范围 **0.1.1-rc.2 → 0.2.
|
|
312
|
+
`package.json` 声明 `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"`(插件市场据此在「按宿主版本筛选」时判定兼容;dsh 0.2.1-alpha.4 起 next/alpha 通道由 `engines.dsh` 单独硬校验,不满足即拒绝加载,故上界封在 0.3.0(写作 `<0.3.0-0`,连 0.3.0 的 alpha/rc 预发布一并排除)——未验证的新大版本会被干净拒绝而非静默破损)。已实测范围 **0.1.1-rc.2 → 0.2.2-alpha.2**(含官方桌面端等价的 Electron 宿主);由每周 CI 巡检上游新版本并复验,出现未覆盖版本会自动开 issue。`peerDependencies` 仅声明 `@deepseek-ai/cordis` 与 `react`(宿主提供)。
|
|
313
313
|
|
|
314
314
|
## 🚧 已知限制
|
|
315
315
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -35,7 +35,7 @@ comment in `build.mjs` for why). Their licenses are reproduced below. Generated
|
|
|
35
35
|
| mime-db | 1.52.0 | MIT |
|
|
36
36
|
| mime-types | 2.1.35 | MIT |
|
|
37
37
|
| ms | 2.1.3 | MIT |
|
|
38
|
-
| msedge-tts | 2.1.
|
|
38
|
+
| msedge-tts | 2.1.1 | MIT |
|
|
39
39
|
| ws | 8.21.3 | MIT |
|
|
40
40
|
|
|
41
41
|
## agent-base 6.0.0
|
|
@@ -835,7 +835,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
835
835
|
SOFTWARE.
|
|
836
836
|
```
|
|
837
837
|
|
|
838
|
-
## msedge-tts 2.1.
|
|
838
|
+
## msedge-tts 2.1.1
|
|
839
839
|
|
|
840
840
|
- License: MIT
|
|
841
841
|
- Source: https://github.com/Migushthe2nd/MsEdgeTTS.git
|
package/lib/client.js
CHANGED
|
@@ -3984,7 +3984,7 @@ function telemetryDeltas(tel) {
|
|
|
3984
3984
|
}
|
|
3985
3985
|
return out;
|
|
3986
3986
|
}
|
|
3987
|
-
var BUILD_TAG = "
|
|
3987
|
+
var BUILD_TAG = "f0f7b09";
|
|
3988
3988
|
var TELEMETRY_FLAG = "dsh-voice-mode.telemetry";
|
|
3989
3989
|
var telemetryEnabled = typeof localStorage !== "undefined" && localStorage.getItem(TELEMETRY_FLAG) === "1";
|
|
3990
3990
|
console.log("[dsh-voice] build=" + BUILD_TAG);
|
package/lib/msedge-tts.cjs
CHANGED
|
@@ -22601,9 +22601,9 @@ var require_buffer = __commonJS({
|
|
|
22601
22601
|
}
|
|
22602
22602
|
});
|
|
22603
22603
|
|
|
22604
|
-
// node_modules/.pnpm/msedge-tts@2.1.
|
|
22604
|
+
// node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/Output.js
|
|
22605
22605
|
var require_Output = __commonJS({
|
|
22606
|
-
"node_modules/.pnpm/msedge-tts@2.1.
|
|
22606
|
+
"node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/Output.js"(exports2) {
|
|
22607
22607
|
"use strict";
|
|
22608
22608
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22609
22609
|
exports2.OUTPUT_EXTENSIONS = exports2.OUTPUT_FORMAT = void 0;
|
|
@@ -22621,9 +22621,9 @@ var require_Output = __commonJS({
|
|
|
22621
22621
|
}
|
|
22622
22622
|
});
|
|
22623
22623
|
|
|
22624
|
-
// node_modules/.pnpm/msedge-tts@2.1.
|
|
22624
|
+
// node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/Prosody.js
|
|
22625
22625
|
var require_Prosody = __commonJS({
|
|
22626
|
-
"node_modules/.pnpm/msedge-tts@2.1.
|
|
22626
|
+
"node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/Prosody.js"(exports2) {
|
|
22627
22627
|
"use strict";
|
|
22628
22628
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22629
22629
|
exports2.VOLUME = exports2.PITCH = exports2.RATE = exports2.ProsodyOptions = void 0;
|
|
@@ -22679,9 +22679,9 @@ var require_Prosody = __commonJS({
|
|
|
22679
22679
|
}
|
|
22680
22680
|
});
|
|
22681
22681
|
|
|
22682
|
-
// node_modules/.pnpm/msedge-tts@2.1.
|
|
22682
|
+
// node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/utils.js
|
|
22683
22683
|
var require_utils = __commonJS({
|
|
22684
|
-
"node_modules/.pnpm/msedge-tts@2.1.
|
|
22684
|
+
"node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/utils.js"(exports2) {
|
|
22685
22685
|
"use strict";
|
|
22686
22686
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22687
22687
|
exports2.joinPath = void 0;
|
|
@@ -22692,9 +22692,73 @@ var require_utils = __commonJS({
|
|
|
22692
22692
|
}
|
|
22693
22693
|
});
|
|
22694
22694
|
|
|
22695
|
-
// node_modules/.pnpm/msedge-tts@2.1.
|
|
22695
|
+
// node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/SecMsGec.js
|
|
22696
|
+
var require_SecMsGec = __commonJS({
|
|
22697
|
+
"node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/SecMsGec.js"(exports2) {
|
|
22698
|
+
"use strict";
|
|
22699
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22700
|
+
exports2.hashSecMsGecV2 = hashSecMsGecV2;
|
|
22701
|
+
var EDGE_COPYRIGHT = "Copyright (C) Microsoft Corporation. All rights reserved.";
|
|
22702
|
+
var SWAP_FIRST_WORD = { swappedWord: 4010109435, swappedSum: 1995771700, swappedProduct: 3287280279 };
|
|
22703
|
+
var SWAP_SECOND_WORD = { swappedWord: 3273069531, swappedSum: 411160124, swappedProduct: 901586633 };
|
|
22704
|
+
var MIX_FIRST_WORD = [3482890513, 2265471903, 315537773, 629022083];
|
|
22705
|
+
var MIX_SECOND_WORD = [2725517045, 3548616447, 2090019721, 3215236969];
|
|
22706
|
+
async function hashSecMsGecV2(ticksAndToken) {
|
|
22707
|
+
const message = new TextEncoder().encode(EDGE_COPYRIGHT + ticksAndToken);
|
|
22708
|
+
const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", message));
|
|
22709
|
+
return `${toUpperHex(cs64(message, digest))}-${toUpperHex(digest)}`;
|
|
22710
|
+
}
|
|
22711
|
+
function cs64(message, digest) {
|
|
22712
|
+
const digestView = new DataView(digest.buffer, digest.byteOffset, digest.byteLength);
|
|
22713
|
+
const firstKey = (digestView.getUint32(0, true) | 1) >>> 0;
|
|
22714
|
+
const secondKey = (digestView.getUint32(4, true) | 1) >>> 0;
|
|
22715
|
+
const padded = new Uint8Array(Math.ceil(message.length / 8) * 8);
|
|
22716
|
+
padded.set(message);
|
|
22717
|
+
const words = new DataView(padded.buffer);
|
|
22718
|
+
let swapSum = 0;
|
|
22719
|
+
let lastSwap = 0;
|
|
22720
|
+
let mix = 0;
|
|
22721
|
+
let mixSum = 0;
|
|
22722
|
+
for (let offset = 0; offset < padded.length; offset += 8) {
|
|
22723
|
+
const firstWord = words.getUint32(offset, true);
|
|
22724
|
+
const secondWord = words.getUint32(offset + 4, true);
|
|
22725
|
+
const firstSwap = swapTerm(firstWord, firstKey, SWAP_FIRST_WORD);
|
|
22726
|
+
lastSwap = swapTerm(secondWord, secondKey, SWAP_SECOND_WORD);
|
|
22727
|
+
swapSum = swapSum + firstSwap + lastSwap >>> 0;
|
|
22728
|
+
mix = swapAndMultiply(Math.imul(mix + firstWord, firstKey), MIX_FIRST_WORD);
|
|
22729
|
+
mixSum = mixSum + mix >>> 0;
|
|
22730
|
+
mix = swapAndMultiply(Math.imul(mix + secondWord, secondKey), MIX_SECOND_WORD);
|
|
22731
|
+
mixSum = mixSum + mix >>> 0;
|
|
22732
|
+
}
|
|
22733
|
+
const checksum = new Uint8Array(8);
|
|
22734
|
+
const checksumView = new DataView(checksum.buffer);
|
|
22735
|
+
checksumView.setUint32(0, lastSwap ^ mix, true);
|
|
22736
|
+
checksumView.setUint32(4, swapSum ^ mixSum, true);
|
|
22737
|
+
return checksum;
|
|
22738
|
+
}
|
|
22739
|
+
function swapTerm(word, key, multipliers) {
|
|
22740
|
+
const sum = Math.imul(word, key) + Math.imul(swapHalves(word), multipliers.swappedWord);
|
|
22741
|
+
const product = Math.imul(swapHalves(sum), multipliers.swappedSum) >>> 0;
|
|
22742
|
+
return Math.imul(swapHalves(product), multipliers.swappedProduct) + product >>> 0;
|
|
22743
|
+
}
|
|
22744
|
+
function swapAndMultiply(value, multipliers) {
|
|
22745
|
+
for (const multiplier of multipliers) {
|
|
22746
|
+
value = Math.imul(swapHalves(value), multiplier) >>> 0;
|
|
22747
|
+
}
|
|
22748
|
+
return value;
|
|
22749
|
+
}
|
|
22750
|
+
function swapHalves(value) {
|
|
22751
|
+
return (value << 16 | value >>> 16) >>> 0;
|
|
22752
|
+
}
|
|
22753
|
+
function toUpperHex(bytes) {
|
|
22754
|
+
return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("").toUpperCase();
|
|
22755
|
+
}
|
|
22756
|
+
}
|
|
22757
|
+
});
|
|
22758
|
+
|
|
22759
|
+
// node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/MsEdgeTTS.js
|
|
22696
22760
|
var require_MsEdgeTTS = __commonJS({
|
|
22697
|
-
"node_modules/.pnpm/msedge-tts@2.1.
|
|
22761
|
+
"node_modules/.pnpm/msedge-tts@2.1.1_debug@4.4.3/node_modules/msedge-tts/dist/MsEdgeTTS.js"(exports2) {
|
|
22698
22762
|
"use strict";
|
|
22699
22763
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
22700
22764
|
if (k2 === void 0) k2 = k;
|
|
@@ -22736,6 +22800,7 @@ var require_MsEdgeTTS = __commonJS({
|
|
|
22736
22800
|
var fs = __importStar(require("node:fs"));
|
|
22737
22801
|
var Prosody_1 = require_Prosody();
|
|
22738
22802
|
var utils_1 = require_utils();
|
|
22803
|
+
var SecMsGec_1 = require_SecMsGec();
|
|
22739
22804
|
var MetadataOptions = class {
|
|
22740
22805
|
/**
|
|
22741
22806
|
* (optional) any voice locale that is supported by the voice. See the list of all voices for compatibility. If not provided, the locale will be inferred from the `voiceName`.
|
|
@@ -22765,7 +22830,7 @@ var require_MsEdgeTTS = __commonJS({
|
|
|
22765
22830
|
var MsEdgeTTS2 = class _MsEdgeTTS {
|
|
22766
22831
|
static TRUSTED_CLIENT_TOKEN = "6A5AA1D4EAFF4E9FB37E23D68491D6F4";
|
|
22767
22832
|
static VOICES_URL = `https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list?trustedclienttoken=${_MsEdgeTTS.TRUSTED_CLIENT_TOKEN}`;
|
|
22768
|
-
static WSS_URL = "wss://
|
|
22833
|
+
static WSS_URL = "wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1";
|
|
22769
22834
|
static JSON_XML_DELIM = "\r\n\r\n";
|
|
22770
22835
|
static AUDIO_DELIM = "Path:audio\r\n";
|
|
22771
22836
|
static VOICE_LANG_REGEX = /\b[a-z]{2,}-[A-Z]{2}\b/;
|
|
@@ -22809,7 +22874,7 @@ var require_MsEdgeTTS = __commonJS({
|
|
|
22809
22874
|
static async getSynthUrl() {
|
|
22810
22875
|
const req_id = _MsEdgeTTS.generateUUID();
|
|
22811
22876
|
const secMsGEC = await _MsEdgeTTS.generateSecMsGec(this.TRUSTED_CLIENT_TOKEN);
|
|
22812
|
-
return `${this.WSS_URL}?
|
|
22877
|
+
return `${this.WSS_URL}?TrustedClientToken=${this.TRUSTED_CLIENT_TOKEN}&Sec-MS-GEC=${secMsGEC}&Sec-MS-GEC-Version=2-143.0.3650.96&ConnectionId=${req_id}`;
|
|
22813
22878
|
}
|
|
22814
22879
|
_initClient() {
|
|
22815
22880
|
if (this._clientInit)
|
|
@@ -23002,10 +23067,7 @@ Path:${messageTypes.SPEECH_CONFIG}${_MsEdgeTTS.JSON_XML_DELIM}
|
|
|
23002
23067
|
const ticks = Math.floor((Date.now() + _MsEdgeTTS._clockOffsetMs) / 1e3) + 11644473600;
|
|
23003
23068
|
const rounded = ticks - ticks % 300;
|
|
23004
23069
|
const windowsTicks = rounded * 1e7;
|
|
23005
|
-
|
|
23006
|
-
const data = encoder.encode(`${windowsTicks}${trustedClientToken}`);
|
|
23007
|
-
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
|
|
23008
|
-
return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("").toUpperCase();
|
|
23070
|
+
return (0, SecMsGec_1.hashSecMsGecV2)(`${windowsTicks}${trustedClientToken}`);
|
|
23009
23071
|
}
|
|
23010
23072
|
async _send(message, requestId, initialSocket) {
|
|
23011
23073
|
let socket = initialSocket ?? this._ws;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-voice-mode",
|
|
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.
|
|
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.2-alpha.2).",
|
|
4
4
|
"icon": "./icon.svg",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.32",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"repository": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@types/node": "^26.0.0",
|
|
102
102
|
"@types/react": "^19.0.0",
|
|
103
103
|
"esbuild": "^0.25.0",
|
|
104
|
-
"msedge-tts": "^2.1.
|
|
104
|
+
"msedge-tts": "^2.1.1",
|
|
105
105
|
"playwright-core": "1.62.1",
|
|
106
106
|
"typescript": "^5.9.2"
|
|
107
107
|
},
|