dsh-voice-mode 0.7.44 → 0.7.45

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/lib/client.js CHANGED
@@ -59,45 +59,326 @@ function resampleLinear(src, srcRate, dstRate) {
59
59
  return out;
60
60
  }
61
61
 
62
- // src/redact.ts
62
+ // node_modules/.pnpm/@voice-mode+core@file+vendor+voice-mode-core-0.1.0.tgz/node_modules/@voice-mode/core/dist/asr-replacements.js
63
+ var REPLACEMENTS_MAX_PAYLOAD_BYTES = 12e3;
64
+ var UTF8_ENCODER = new TextEncoder();
65
+ function replacementsPayloadBytes(rules) {
66
+ return UTF8_ENCODER.encode(JSON.stringify(rules ?? [])).length;
67
+ }
68
+
69
+ // node_modules/.pnpm/@voice-mode+core@file+vendor+voice-mode-core-0.1.0.tgz/node_modules/@voice-mode/core/dist/redact.js
63
70
  var PREFIXED = [
64
71
  { re: /\b(Bearer\s+)[A-Za-z0-9._~+/=-]{8,}/gi, to: "$1<redacted>" },
65
72
  { re: /\b(Basic\s+)[A-Za-z0-9+/=-]{8,}/gi, to: "$1<redacted>" },
66
73
  { re: /\b((?:api[-_]?key|x-api-key)\s*[:=]\s*)[A-Za-z0-9._~+/=-]{8,}/gi, to: "$1<redacted>" },
67
- // URL 内嵌凭据(https://user:pass@host)与查询参数密钥(?api_key=... / &token=... / &key=...)
68
74
  { re: /(https?:\/\/)([^:@/\s]+:[^@/\s]+)(@)/gi, to: "$1<redacted>$3" },
69
75
  { re: /([?&](?:api[_-]?key|access_token|token|key)=)([^&\s#]+)/gi, to: "$1<redacted>" },
70
- // JSON 形态:{"apiKey":"..."} / {"mimoApiKey":"..."} / {"openaiApiKey":"..."} / {"token":"..."}(只遮引号内的值)
76
+ // Matches both complete JSON string values and values truncated before the closing quote.
71
77
  {
72
- re: /("(?:[a-zA-Z0-9_-]*?(?:api[_-]?key|token|secret|password))"\s*:\s*")([^"\\]{6,})(")/gi,
78
+ re: /("(?:[a-zA-Z0-9_-]*?(?:api[_-]?key|token|secret|password))"\s*:\s*")([^"\\]{6,})("|$)/gi,
73
79
  to: "$1<redacted>$3"
74
80
  }
75
81
  ];
76
82
  var BARE = [
83
+ /\bsk-(?:proj|live|test|ant)-[A-Za-z0-9._-]{8,}/g,
77
84
  /\bsk[-_][A-Za-z0-9._-]{8,}/g,
78
- // 更多厂商前缀(2026-11-20 审计实测:Groq 的 gsk_ 原样漏出,而 Groq 就在本仓预设里)。
79
85
  /\bgsk_[A-Za-z0-9._-]{8,}/g,
80
- /\bsk-(?:proj|live|test)-[A-Za-z0-9._-]{8,}/g,
81
- /\brk_(?:live|test)_[A-Za-z0-9]{8,}/g,
86
+ /\brk_(?:live|test)_[A-Za-z0-9._-]{8,}/g,
82
87
  /\bAIza[A-Za-z0-9._-]{10,}/g,
83
- /\bgh[pousr]_[A-Za-z0-9]{10,}/g,
84
- // 通用兜底:≥20 连续 base64-ish 字符,要求**同时含大写、小写与数字**(真密钥的典型特征),
85
- // 且排除纯十六进制(SHA256/MD5 是排障信息)。这样不会吃掉全小写的模型名、
86
- // 也不会吃掉被 - / 分隔的 UUID 与路径。
87
- // 注意:字符类**不含 '/'**——路径与 provider/model:voice 形态都靠 '/' 分隔,含进来会误伤排障信息。
88
- // 豁免仅限 64 位 sha256(模型摘要);32 位 hex 也可能是 key(审计实测漏遮)。
88
+ /\bgh[pousr]_[A-Za-z0-9_]{10,}/g,
89
+ // Mixed-case + digit high-entropy token (>=20 chars); excludes 64-hex SHA256 digests and '/' paths.
89
90
  /\b(?![0-9a-fA-F]{64}\b)(?=[A-Za-z0-9+=_-]*[A-Z])(?=[A-Za-z0-9+=_-]*[a-z])(?=[A-Za-z0-9+=_-]*[0-9])[A-Za-z0-9+=_-]{20,}\b/g,
90
- // 32 位 hex(md5 形状)也可能是 key:通用规则要求大小写混合,纯小写 hex 会被漏掉。
91
- // 64 位 sha256 不在此列(模型摘要要保留排障)。
91
+ // 32-hex keys (MD5-shaped secrets); 64-hex SHA256 digests remain intact.
92
92
  /\b[0-9a-f]{32}\b/gi
93
93
  ];
94
+ function coerceText(value) {
95
+ if (typeof value === "string")
96
+ return value;
97
+ if (value === null || value === void 0)
98
+ return "";
99
+ if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
100
+ return String(value);
101
+ }
102
+ if (value instanceof Error)
103
+ return value.message;
104
+ try {
105
+ return JSON.stringify(value) ?? "";
106
+ } catch {
107
+ return "";
108
+ }
109
+ }
94
110
  function redactSecrets(text) {
95
- let out = typeof text === "string" ? text : String(text ?? "");
96
- for (const { re, to } of PREFIXED) out = out.replace(re, to);
97
- for (const re of BARE) out = out.replace(re, "<redacted>");
111
+ let out = coerceText(text);
112
+ for (const { re, to } of PREFIXED)
113
+ out = out.replace(re, to);
114
+ for (const re of BARE)
115
+ out = out.replace(re, "<redacted>");
98
116
  return out;
99
117
  }
100
118
 
119
+ // node_modules/.pnpm/@voice-mode+core@file+vendor+voice-mode-core-0.1.0.tgz/node_modules/@voice-mode/core/dist/engine-kind.js
120
+ var CLOUD_TTS_ENGINE_KINDS = ["openai-compat", "mimo"];
121
+ function isCloudTtsEngine(value) {
122
+ return CLOUD_TTS_ENGINE_KINDS.includes(value);
123
+ }
124
+ function isThirdPartyTtsEngine(value) {
125
+ return value === "openai-compat" || value === "mimo";
126
+ }
127
+
128
+ // node_modules/.pnpm/@voice-mode+core@file+vendor+voice-mode-core-0.1.0.tgz/node_modules/@voice-mode/core/dist/voice-catalog.js
129
+ var MIMO_VOICES = [
130
+ "mimo_default",
131
+ "\u51B0\u7CD6",
132
+ "\u8309\u8389",
133
+ "\u82CF\u6253",
134
+ "\u767D\u6866",
135
+ "Mia",
136
+ "Chloe",
137
+ "Milo",
138
+ "Dean"
139
+ ];
140
+ var VITS_SPEAKERS = [
141
+ { name: "suyingxue", sid: 0, zh: "\u7D20\u6620\u96EA", en: "Su Yingxue", gender: "F" },
142
+ { name: "gunian", sid: 1, zh: "\u987E\u5FF5", en: "Gu Nian", gender: "M" },
143
+ { name: "fushiyu", sid: 2, zh: "\u5085\u65AF\u9047", en: "Fu Siyu", gender: "F" },
144
+ { name: "bingjiao", sid: 3, zh: "\u51B0\u5A07", en: "Bing Jiao", gender: "M" },
145
+ { name: "bazong", sid: 4, zh: "\u9738\u603B", en: "Ba Zong", gender: "M" }
146
+ ];
147
+ var KOKORO_F0 = [
148
+ 224,
149
+ 189,
150
+ 154,
151
+ 261,
152
+ 226,
153
+ 222,
154
+ 220,
155
+ 229,
156
+ 198,
157
+ 186,
158
+ 212,
159
+ 293,
160
+ 233,
161
+ 161,
162
+ 247,
163
+ 207,
164
+ 218,
165
+ 216,
166
+ 220,
167
+ 238,
168
+ 242,
169
+ 229,
170
+ 198,
171
+ 286,
172
+ 211,
173
+ 190,
174
+ 264,
175
+ 261,
176
+ 226,
177
+ 147,
178
+ 216,
179
+ 240,
180
+ 233,
181
+ 188,
182
+ 222,
183
+ 247,
184
+ 253,
185
+ 270,
186
+ 276,
187
+ 276,
188
+ 279,
189
+ 320,
190
+ 247,
191
+ 296,
192
+ 276,
193
+ 235,
194
+ 139,
195
+ 240,
196
+ 282,
197
+ 282,
198
+ 238,
199
+ 226,
200
+ 273,
201
+ 216,
202
+ 286,
203
+ 270,
204
+ 198,
205
+ 179,
206
+ 117,
207
+ 130,
208
+ 114,
209
+ 128,
210
+ 108,
211
+ 106,
212
+ 122,
213
+ 136,
214
+ 190,
215
+ 112,
216
+ 108,
217
+ 128,
218
+ 131,
219
+ 111,
220
+ 110,
221
+ 132,
222
+ 138,
223
+ 189,
224
+ 137,
225
+ 148,
226
+ 151,
227
+ 127,
228
+ 135,
229
+ 111,
230
+ 138,
231
+ 114,
232
+ 125,
233
+ 158,
234
+ 128,
235
+ 156,
236
+ 132,
237
+ 162,
238
+ 131,
239
+ 136,
240
+ 142,
241
+ 124,
242
+ 129,
243
+ 136,
244
+ 126,
245
+ 135,
246
+ 161,
247
+ 150,
248
+ 124,
249
+ 104,
250
+ 124
251
+ ];
252
+ var KOKORO_NAMED = {
253
+ 48: { name: "zf_xiaobei", zh: "\u5C0F\u5317", en: "Xiaobei" },
254
+ 49: { name: "zf_xiaoni", zh: "\u5C0F\u59AE", en: "Xiaoni" },
255
+ 50: { name: "zf_xiaoxiao", zh: "\u5C0F\u5C0F", en: "Xiaoxiao" },
256
+ 51: { name: "zf_xiaoyi", zh: "\u5C0F\u827A", en: "Xiaoyi" }
257
+ };
258
+ var KOKORO_POPULAR_MALE = {
259
+ 62: "deep",
260
+ 68: "rich",
261
+ 75: "clear",
262
+ 76: "magnetic"
263
+ };
264
+ var KOKORO_PINNED = [62, 68, 75, 76];
265
+ var KOKORO_VOICES = [
266
+ ...KOKORO_PINNED.map((sid) => ({ name: KOKORO_NAMED[sid]?.name ?? String(sid), sid })),
267
+ ...KOKORO_F0.map((_, sid) => ({ name: KOKORO_NAMED[sid]?.name ?? String(sid), sid })).filter((v) => !KOKORO_PINNED.includes(v.sid))
268
+ ];
269
+ var SILICONFLOW_SYSTEM_VOICES = [
270
+ "alex",
271
+ "benjamin",
272
+ "charles",
273
+ "david",
274
+ "anna",
275
+ "bella",
276
+ "claire",
277
+ "diana"
278
+ ];
279
+ var OPENAI_API_VOICES = [
280
+ "alloy",
281
+ "ash",
282
+ "ballad",
283
+ "coral",
284
+ "echo",
285
+ "fable",
286
+ "marin",
287
+ "cedar",
288
+ "nova",
289
+ "onyx",
290
+ "sage",
291
+ "shimmer"
292
+ ];
293
+ var TTS_OPENAI_PRESETS = {
294
+ "siliconflow-cosyvoice2": {
295
+ id: "siliconflow-cosyvoice2",
296
+ label: "SiliconFlow \xB7 CosyVoice2",
297
+ region: "cn",
298
+ baseUrl: "https://api.siliconflow.cn/v1",
299
+ model: "FunAudioLLM/CosyVoice2-0.5B",
300
+ voice: "FunAudioLLM/CosyVoice2-0.5B:alex",
301
+ voices: SILICONFLOW_SYSTEM_VOICES.map((v) => `FunAudioLLM/CosyVoice2-0.5B:${v}`),
302
+ requiresKey: true
303
+ },
304
+ "siliconflow-fish": {
305
+ id: "siliconflow-fish",
306
+ label: "SiliconFlow \xB7 Fish Speech 1.5",
307
+ region: "cn",
308
+ baseUrl: "https://api.siliconflow.cn/v1",
309
+ model: "fishaudio/fish-speech-1.5",
310
+ voice: "fishaudio/fish-speech-1.5:anna",
311
+ voices: SILICONFLOW_SYSTEM_VOICES.map((v) => `fishaudio/fish-speech-1.5:${v}`),
312
+ requiresKey: true
313
+ },
314
+ "openrouter-openai": {
315
+ id: "openrouter-openai",
316
+ label: "OpenRouter \xB7 GPT-4o Mini TTS",
317
+ region: "global",
318
+ baseUrl: "https://openrouter.ai/api/v1",
319
+ model: "openai/gpt-4o-mini-tts-2025-12-15",
320
+ voice: "alloy",
321
+ voices: [...OPENAI_API_VOICES],
322
+ requiresKey: true
323
+ },
324
+ "openai-official": {
325
+ id: "openai-official",
326
+ label: "OpenAI \xB7 GPT-4o Mini TTS",
327
+ region: "global",
328
+ baseUrl: "https://api.openai.com/v1",
329
+ model: "gpt-4o-mini-tts",
330
+ voice: "marin",
331
+ voices: [...OPENAI_API_VOICES],
332
+ requiresKey: true
333
+ },
334
+ "groq-playai": {
335
+ id: "groq-playai",
336
+ label: "Groq \xB7 PlayAI TTS",
337
+ region: "global",
338
+ baseUrl: "https://api.groq.com/openai/v1",
339
+ model: "playai-tts",
340
+ voice: "Fritz-PlayAI",
341
+ voices: ["Fritz-PlayAI"],
342
+ requiresKey: true
343
+ },
344
+ "selfhosted-kokoro": {
345
+ id: "selfhosted-kokoro",
346
+ label: "Self-hosted \xB7 Kokoro-FastAPI",
347
+ region: "local",
348
+ baseUrl: "http://127.0.0.1:8880/v1",
349
+ model: "kokoro",
350
+ voice: "zf_xiaobei",
351
+ voices: ["zf_xiaobei", "zf_xiaoni", "zf_xiaoxiao", "zf_xiaoyi"],
352
+ requiresKey: false
353
+ },
354
+ "selfhosted-vllm": {
355
+ id: "selfhosted-vllm",
356
+ label: "Self-hosted \xB7 vLLM-Omni",
357
+ region: "local",
358
+ baseUrl: "http://127.0.0.1:8000/v1",
359
+ model: "tts-1",
360
+ voice: "default",
361
+ voices: ["default"],
362
+ requiresKey: false
363
+ }
364
+ };
365
+ var EDGE_COMMON_VOICES = [
366
+ { v: "zh-CN-XiaoxiaoNeural", zh: "\u6653\u6653", en: "Xiaoxiao", gender: "F", accent: "mandarin" },
367
+ { v: "zh-CN-XiaoyiNeural", zh: "\u6653\u4F0A", en: "Xiaoyi", gender: "F", accent: "mandarin" },
368
+ { v: "zh-CN-YunxiNeural", zh: "\u4E91\u5E0C", en: "Yunxi", gender: "M", accent: "mandarin" },
369
+ { v: "zh-CN-YunjianNeural", zh: "\u4E91\u5065", en: "Yunjian", gender: "M", accent: "mandarin" },
370
+ { v: "zh-CN-YunyangNeural", zh: "\u4E91\u626C", en: "Yunyang", gender: "M", accent: "mandarin" },
371
+ { v: "zh-CN-YunxiaNeural", zh: "\u4E91\u590F", en: "Yunxia", gender: "M", accent: "mandarin" },
372
+ { v: "zh-CN-liaoning-XiaobeiNeural", zh: "\u5C0F\u5317", en: "Xiaobei", gender: "F", accent: "northeast" },
373
+ { v: "zh-CN-shaanxi-XiaoniNeural", zh: "\u5C0F\u59AE", en: "Xiaoni", gender: "F", accent: "shaanxi" },
374
+ { v: "zh-HK-HiuMaanNeural", zh: "\u6653\u66FC", en: "HiuMaan", gender: "F", accent: "cantonese" },
375
+ { v: "zh-HK-WanLungNeural", zh: "\u4E91\u9F99", en: "WanLung", gender: "M", accent: "cantonese" },
376
+ { v: "zh-TW-HsiaoYuNeural", zh: "\u5C0F\u96E8", en: "HsiaoYu", gender: "F", accent: "taiwan" },
377
+ { v: "zh-TW-YunJheNeural", zh: "\u4E91\u54F2", en: "YunJhe", gender: "M", accent: "taiwan" },
378
+ { v: "en-US-AriaNeural", zh: "Aria", en: "Aria", gender: "F", accent: "english" },
379
+ { v: "en-US-GuyNeural", zh: "Guy", en: "Guy", gender: "M", accent: "english" }
380
+ ];
381
+
101
382
  // src/wakeword.ts
102
383
  var WAKE_LEAD_CHARS = 3;
103
384
  var WAKE_MAX_EDITS = 1;
@@ -3197,16 +3478,24 @@ function formatShortcutForDisplay(raw, isMac) {
3197
3478
  }
3198
3479
 
3199
3480
  // src/engine-kind.ts
3200
- var TTS_ENGINE_KINDS = ["vits", "kokoro", "edge", "openai", "mimo"];
3201
- var CLOUD_ENGINE_KINDS = ["edge", "openai", "mimo"];
3202
- function asTtsEngineKind(value) {
3203
- return TTS_ENGINE_KINDS.includes(value) ? value : "vits";
3481
+ var TTS_ENGINE_KINDS2 = ["vits", "kokoro", "edge", "openai", "mimo"];
3482
+ var DSH_TO_CORE_TTS = {
3483
+ vits: "vits-wasm",
3484
+ kokoro: "kokoro-daemon",
3485
+ openai: "openai-compat",
3486
+ mimo: "mimo"
3487
+ };
3488
+ function toCoreTtsKind(value) {
3489
+ return typeof value === "string" && Object.hasOwn(DSH_TO_CORE_TTS, value) ? DSH_TO_CORE_TTS[value] : void 0;
3490
+ }
3491
+ function asTtsEngineKind2(value) {
3492
+ return TTS_ENGINE_KINDS2.includes(value) ? value : "vits";
3204
3493
  }
3205
3494
  function isCloudEngine(value) {
3206
- return CLOUD_ENGINE_KINDS.includes(value);
3495
+ return value === "edge" || isCloudTtsEngine(toCoreTtsKind(value));
3207
3496
  }
3208
3497
  function isThirdPartyEngine(value) {
3209
- return value === "openai" || value === "mimo";
3498
+ return isThirdPartyTtsEngine(toCoreTtsKind(value));
3210
3499
  }
3211
3500
 
3212
3501
  // src/voice-resolution.ts
@@ -3230,166 +3519,6 @@ function getRuntimeBoot() {
3230
3519
  var React = __toESM(require("react"), 1);
3231
3520
  var import_react2 = require("react");
3232
3521
 
3233
- // src/voice-catalog.ts
3234
- var MIMO_VOICES = [
3235
- "mimo_default",
3236
- "\u51B0\u7CD6",
3237
- "\u8309\u8389",
3238
- "\u82CF\u6253",
3239
- "\u767D\u6866",
3240
- "Mia",
3241
- "Chloe",
3242
- "Milo",
3243
- "Dean"
3244
- ];
3245
- var EDGE_COMMON_VOICES = [
3246
- { v: "zh-CN-XiaoxiaoNeural", zh: "\u6653\u6653", en: "Xiaoxiao", gender: "F", accent: "mandarin" },
3247
- { v: "zh-CN-XiaoyiNeural", zh: "\u6653\u4F0A", en: "Xiaoyi", gender: "F", accent: "mandarin" },
3248
- { v: "zh-CN-YunxiNeural", zh: "\u4E91\u5E0C", en: "Yunxi", gender: "M", accent: "mandarin" },
3249
- { v: "zh-CN-YunjianNeural", zh: "\u4E91\u5065", en: "Yunjian", gender: "M", accent: "mandarin" },
3250
- { v: "zh-CN-YunyangNeural", zh: "\u4E91\u626C", en: "Yunyang", gender: "M", accent: "mandarin" },
3251
- { v: "zh-CN-YunxiaNeural", zh: "\u4E91\u590F", en: "Yunxia", gender: "M", accent: "mandarin" },
3252
- { v: "zh-CN-liaoning-XiaobeiNeural", zh: "\u5C0F\u5317", en: "Xiaobei", gender: "F", accent: "northeast" },
3253
- { v: "zh-CN-shaanxi-XiaoniNeural", zh: "\u5C0F\u59AE", en: "Xiaoni", gender: "F", accent: "shaanxi" },
3254
- { v: "zh-HK-HiuMaanNeural", zh: "\u6653\u66FC", en: "HiuMaan", gender: "F", accent: "cantonese" },
3255
- { v: "zh-HK-WanLungNeural", zh: "\u4E91\u9F99", en: "WanLung", gender: "M", accent: "cantonese" },
3256
- { v: "zh-TW-HsiaoYuNeural", zh: "\u5C0F\u96E8", en: "HsiaoYu", gender: "F", accent: "taiwan" },
3257
- { v: "zh-TW-YunJheNeural", zh: "\u4E91\u54F2", en: "YunJhe", gender: "M", accent: "taiwan" },
3258
- { v: "en-US-AriaNeural", zh: "Aria", en: "Aria", gender: "F", accent: "english" },
3259
- { v: "en-US-GuyNeural", zh: "Guy", en: "Guy", gender: "M", accent: "english" }
3260
- ];
3261
- var VITS_SPEAKERS = [
3262
- { name: "suyingxue", sid: 0, zh: "\u7D20\u6620\u96EA", en: "Su Yingxue", gender: "F" },
3263
- { name: "gunian", sid: 1, zh: "\u987E\u5FF5", en: "Gu Nian", gender: "M" },
3264
- { name: "fushiyu", sid: 2, zh: "\u5085\u65AF\u9047", en: "Fu Siyu", gender: "F" },
3265
- { name: "bingjiao", sid: 3, zh: "\u51B0\u5A07", en: "Bing Jiao", gender: "M" },
3266
- { name: "bazong", sid: 4, zh: "\u9738\u603B", en: "Ba Zong", gender: "M" }
3267
- ];
3268
- var KOKORO_F0 = [
3269
- 224,
3270
- 189,
3271
- 154,
3272
- 261,
3273
- 226,
3274
- 222,
3275
- 220,
3276
- 229,
3277
- 198,
3278
- 186,
3279
- 212,
3280
- 293,
3281
- 233,
3282
- 161,
3283
- 247,
3284
- 207,
3285
- 218,
3286
- 216,
3287
- 220,
3288
- 238,
3289
- 242,
3290
- 229,
3291
- 198,
3292
- 286,
3293
- 211,
3294
- 190,
3295
- 264,
3296
- 261,
3297
- 226,
3298
- 147,
3299
- 216,
3300
- 240,
3301
- 233,
3302
- 188,
3303
- 222,
3304
- 247,
3305
- 253,
3306
- 270,
3307
- 276,
3308
- 276,
3309
- 279,
3310
- 320,
3311
- 247,
3312
- 296,
3313
- 276,
3314
- 235,
3315
- 139,
3316
- 240,
3317
- 282,
3318
- 282,
3319
- 238,
3320
- 226,
3321
- 273,
3322
- 216,
3323
- 286,
3324
- 270,
3325
- 198,
3326
- 179,
3327
- 117,
3328
- 130,
3329
- 114,
3330
- 128,
3331
- 108,
3332
- 106,
3333
- 122,
3334
- 136,
3335
- 190,
3336
- 112,
3337
- 108,
3338
- 128,
3339
- 131,
3340
- 111,
3341
- 110,
3342
- 132,
3343
- 138,
3344
- 189,
3345
- 137,
3346
- 148,
3347
- 151,
3348
- 127,
3349
- 135,
3350
- 111,
3351
- 138,
3352
- 114,
3353
- 125,
3354
- 158,
3355
- 128,
3356
- 156,
3357
- 132,
3358
- 162,
3359
- 131,
3360
- 136,
3361
- 142,
3362
- 124,
3363
- 129,
3364
- 136,
3365
- 126,
3366
- 135,
3367
- 161,
3368
- 150,
3369
- 124,
3370
- 104,
3371
- 124
3372
- ];
3373
- var KOKORO_NAMED = {
3374
- 48: { name: "zf_xiaobei", zh: "\u5C0F\u5317", en: "Xiaobei" },
3375
- 49: { name: "zf_xiaoni", zh: "\u5C0F\u59AE", en: "Xiaoni" },
3376
- 50: { name: "zf_xiaoxiao", zh: "\u5C0F\u5C0F", en: "Xiaoxiao" },
3377
- 51: { name: "zf_xiaoyi", zh: "\u5C0F\u827A", en: "Xiaoyi" }
3378
- };
3379
- var KOKORO_POPULAR_MALE = {
3380
- 62: "deep",
3381
- 68: "rich",
3382
- 75: "clear",
3383
- 76: "magnetic"
3384
- };
3385
- var KOKORO_PINNED = [62, 68, 75, 76];
3386
- var KOKORO_VOICES = [
3387
- ...KOKORO_PINNED.map((sid) => ({ name: KOKORO_NAMED[sid]?.name ?? String(sid), sid })),
3388
- ...KOKORO_F0.map((_, sid) => ({ name: KOKORO_NAMED[sid]?.name ?? String(sid), sid })).filter(
3389
- (v) => !KOKORO_PINNED.includes(v.sid)
3390
- )
3391
- ];
3392
-
3393
3522
  // src/voice-labels.ts
3394
3523
  var SEP = " \xB7 ";
3395
3524
  var name = (n) => lang() === "zh" ? n.zh : n.en;
@@ -4353,10 +4482,6 @@ var AsrReplacementSchema = Schema.object({
4353
4482
  from: Schema.array(Schema.string()).description('Spellings the recognizer produces, e.g. ["sakeena"]; case-insensitive, whitespace between Latin and CJK text ignored.'),
4354
4483
  to: Schema.string().description('The spelling you want, e.g. "Sakina".')
4355
4484
  });
4356
- var REPLACEMENTS_MAX_PAYLOAD_BYTES = 12e3;
4357
- function replacementsPayloadBytes(rules) {
4358
- return new TextEncoder().encode(JSON.stringify(rules ?? [])).length;
4359
- }
4360
4485
 
4361
4486
  // src/settings-form.tsx
4362
4487
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -6526,7 +6651,7 @@ function VoiceSettingsCard({
6526
6651
  (0, import_react2.useEffect)(() => {
6527
6652
  refreshSecretKeys();
6528
6653
  }, [value.ttsEngine]);
6529
- const engine = asTtsEngineKind(value.ttsEngine);
6654
+ const engine = asTtsEngineKind2(value.ttsEngine);
6530
6655
  const [edgeRaw, setEdgeRaw] = (0, import_react2.useState)(null);
6531
6656
  (0, import_react2.useEffect)(() => {
6532
6657
  if (engine !== "edge") return;
@@ -6715,7 +6840,7 @@ function VoiceSettingsCard({
6715
6840
  score: scope,
6716
6841
  field: "ttsEngine",
6717
6842
  value: engine,
6718
- options: TTS_ENGINE_KINDS.map((k) => ({ v: k, label: ENGINE_NAME[k]() })),
6843
+ options: TTS_ENGINE_KINDS2.map((k) => ({ v: k, label: ENGINE_NAME[k]() })),
6719
6844
  onSelect: (v) => {
6720
6845
  if (v !== engine) {
6721
6846
  void scope.set("voice", ENGINE_DEFAULT_VOICE[String(v)] ?? "zh-CN-XiaoxiaoNeural");
@@ -7160,7 +7285,7 @@ function telemetryDeltas(tel) {
7160
7285
  }
7161
7286
  return out;
7162
7287
  }
7163
- var BUILD_TAG = "5fed894";
7288
+ var BUILD_TAG = "9a8899f";
7164
7289
  var TELEMETRY_FLAG = "dsh-voice-mode.telemetry";
7165
7290
  var telemetryEnabled = (() => {
7166
7291
  try {