@xrkseek/harness 0.7.5 → 0.7.7
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/node_modules/@xrkseek/a2a/dist/inbound.d.ts.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/inbound.js +72 -2
- package/node_modules/@xrkseek/a2a/dist/inbound.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts +50 -0
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/store.js +240 -16
- package/node_modules/@xrkseek/checkpoint/dist/store.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/types.d.ts +18 -0
- package/node_modules/@xrkseek/checkpoint/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js +2 -0
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/README.md +4 -3
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.d.ts +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.js +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/browser/wav-capture.d.ts +91 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/wav-capture.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/wav-capture.js +269 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/wav-capture.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/download-http.d.ts +27 -0
- package/node_modules/@xrkseek/exec-voice/dist/download-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/download-http.js +179 -0
- package/node_modules/@xrkseek/exec-voice/dist/download-http.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/engine-ids.d.ts +19 -0
- package/node_modules/@xrkseek/exec-voice/dist/engine-ids.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/engine-ids.js +36 -0
- package/node_modules/@xrkseek/exec-voice/dist/engine-ids.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/engines.d.ts +60 -0
- package/node_modules/@xrkseek/exec-voice/dist/engines.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/engines.js +130 -0
- package/node_modules/@xrkseek/exec-voice/dist/engines.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/format.d.ts +13 -0
- package/node_modules/@xrkseek/exec-voice/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/format.js +22 -3
- package/node_modules/@xrkseek/exec-voice/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/index.d.ts +22 -31
- package/node_modules/@xrkseek/exec-voice/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/index.js +16 -66
- package/node_modules/@xrkseek/exec-voice/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/readiness.d.ts +14 -8
- package/node_modules/@xrkseek/exec-voice/dist/readiness.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/readiness.js +36 -27
- package/node_modules/@xrkseek/exec-voice/dist/readiness.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-assets.d.ts +48 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-assets.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-assets.js +64 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-assets.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-local.d.ts +24 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-local.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-local.js +66 -4
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-local.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-runtime.d.ts +76 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-runtime.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-runtime.js +315 -0
- package/node_modules/@xrkseek/exec-voice/dist/sensevoice-runtime.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/system-tts.d.ts +40 -0
- package/node_modules/@xrkseek/exec-voice/dist/system-tts.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/system-tts.js +260 -0
- package/node_modules/@xrkseek/exec-voice/dist/system-tts.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts +13 -12
- package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/tools.js +12 -6
- package/node_modules/@xrkseek/exec-voice/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/types.d.ts +3 -1
- package/node_modules/@xrkseek/exec-voice/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/package.json +36 -31
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +4 -3
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +31 -18
- package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/protocol/dist/sidebar-previews.d.ts +2 -0
- package/node_modules/@xrkseek/protocol/dist/sidebar-previews.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/sidebar-previews.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts +21 -2
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js +56 -7
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts +18 -3
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js +154 -10
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js +4 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/context.d.ts +7 -6
- package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/dispatch.js +16 -0
- package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js +19 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/subagent.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js +4 -17
- package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/voice.d.ts +30 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/voice.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/voice.js +181 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/voice.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts +15 -0
- package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/model-catalog.js +44 -10
- package/node_modules/@xrkseek/server-face/dist/model-catalog.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/presence-dressing.d.ts +3 -3
- package/node_modules/@xrkseek/server-face/dist/presence-dressing.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/presence-dressing.js +70 -3
- package/node_modules/@xrkseek/server-face/dist/presence-dressing.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.js +36 -8
- package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/seat-channel.d.ts +9 -0
- package/node_modules/@xrkseek/server-face/dist/seat-channel.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/seat-channel.js +11 -0
- package/node_modules/@xrkseek/server-face/dist/seat-channel.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/select-session-model.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/select-session-model.js +68 -1
- package/node_modules/@xrkseek/server-face/dist/select-session-model.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.js +2 -0
- package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-tool-copy.d.ts +4 -0
- package/node_modules/@xrkseek/server-face/dist/session-tool-copy.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js +16 -0
- package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-tools.js +2 -0
- package/node_modules/@xrkseek/server-face/dist/session-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-document.js +61 -2
- package/node_modules/@xrkseek/server-face/dist/settings-document.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +36 -14
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts +43 -0
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +293 -24
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/paths.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js +6 -0
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js +16 -3
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js.map +1 -1
- package/node_modules/@xrkseek/server-face/package.json +1 -0
- package/node_modules/@xrkseek/server-host/dist/a2a-inbound-public.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/a2a-inbound-public.js +8 -1
- package/node_modules/@xrkseek/server-host/dist/a2a-inbound-public.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +44 -45
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js +2 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.js +5 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-credentials-bridge.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-credentials-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-credentials-bridge.js +18 -10
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-credentials-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/our-free-model-host.d.ts +39 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/our-free-model-host.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/our-free-model-host.js +137 -5
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/our-free-model-host.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,70 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Voice Host seam: engine registry + Provider contracts + tools.
|
|
3
|
+
*
|
|
4
|
+
* One entry point builds a Provider — {@link createVoiceAccess} — and the Host,
|
|
5
|
+
* the Face handler and the cards all go through it. Adding a Provider is one
|
|
6
|
+
* row in `engines.ts` plus the settings enum; nothing else grows an engine
|
|
7
|
+
* branch.
|
|
8
|
+
*/
|
|
5
9
|
export { VoiceError, isVoiceError, } from "./types.js";
|
|
6
|
-
export {
|
|
10
|
+
export { resolveEngineId } from "./engine-ids.js";
|
|
11
|
+
export { createVoiceAccess, listVoiceEngines, } from "./engines.js";
|
|
12
|
+
export { createVoiceTools, createSpeakTool, describeVoiceAccess, voiceUnavailableMessage, } from "./tools.js";
|
|
13
|
+
export { VOICE_ASR_PROMPT_TEXT, VOICE_PROMPT_TEXT, VOICE_TTS_PROMPT_TEXT, voicePromptText, } from "./format.js";
|
|
7
14
|
export { createMemoryVoiceProvider, minimalWavBytes, } from "./memory.js";
|
|
8
15
|
export { createOpenAiVoiceProvider, } from "./openai-http.js";
|
|
9
|
-
export { createSenseVoiceLocalProvider, inspectSenseVoiceAssets, senseVoiceDataRoot, } from "./sensevoice-local.js";
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (a)
|
|
14
|
-
return a;
|
|
15
|
-
const b = String(env.OPENAI_API_KEY ?? "").trim();
|
|
16
|
-
return b || undefined;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Resolve a voice Provider.
|
|
20
|
-
* - Injected `service` wins.
|
|
21
|
-
* - Non-empty `XRK_VOICE` is CI bypass over Face `product`.
|
|
22
|
-
* - Product / env: `off` · `openai` (`1`) · `memory` (env-only).
|
|
23
|
-
* - Else no service; tools stay registered and fail honestly.
|
|
24
|
-
*/
|
|
25
|
-
export function createDefaultVoiceAccess(options = {}) {
|
|
26
|
-
const env = options.env ?? process.env;
|
|
27
|
-
const unavailableMessage = voiceUnavailableMessage(env, options.product);
|
|
28
|
-
if (options.service) {
|
|
29
|
-
return { service: options.service, unavailableMessage };
|
|
30
|
-
}
|
|
31
|
-
const envRaw = String(env.XRK_VOICE ?? "").trim();
|
|
32
|
-
const productMode = options.product?.mode;
|
|
33
|
-
const flag = envRaw !== ""
|
|
34
|
-
? envRaw.toLowerCase()
|
|
35
|
-
: productMode === "openai"
|
|
36
|
-
? "1"
|
|
37
|
-
: productMode === "local"
|
|
38
|
-
? "local"
|
|
39
|
-
: "";
|
|
40
|
-
if (flag === "memory") {
|
|
41
|
-
return {
|
|
42
|
-
service: createMemoryVoiceProvider(),
|
|
43
|
-
unavailableMessage,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
if (flag === "local" || flag === "sensevoice") {
|
|
47
|
-
return {
|
|
48
|
-
service: createSenseVoiceLocalProvider({ env }),
|
|
49
|
-
unavailableMessage,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
if (flag === "1" || flag === "openai") {
|
|
53
|
-
const apiKey = resolveApiKey(env);
|
|
54
|
-
if (!apiKey) {
|
|
55
|
-
return { unavailableMessage };
|
|
56
|
-
}
|
|
57
|
-
const baseUrl = options.product?.baseUrl?.trim() ||
|
|
58
|
-
String(env.XRK_VOICE_BASE_URL ?? "").trim();
|
|
59
|
-
return {
|
|
60
|
-
service: createOpenAiVoiceProvider({
|
|
61
|
-
apiKey,
|
|
62
|
-
...(baseUrl ? { baseUrl } : {}),
|
|
63
|
-
...(options.fetchImpl ? { fetchImpl: options.fetchImpl } : {}),
|
|
64
|
-
}),
|
|
65
|
-
unavailableMessage,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return { unavailableMessage };
|
|
69
|
-
}
|
|
16
|
+
export { createSenseVoiceLocalProvider, inspectSenseVoiceAssets, probeSenseVoiceEngine, senseVoiceDataRoot, SENSEVOICE_PLATFORMS, } from "./sensevoice-local.js";
|
|
17
|
+
export { createSystemVoiceProvider, listSystemVoices, } from "./system-tts.js";
|
|
18
|
+
export { SENSEVOICE_ASSETS, SENSEVOICE_ORIGINS, SENSEVOICE_TOTAL_BYTES, } from "./sensevoice-assets.js";
|
|
19
|
+
export { SenseVoicePreparer, senseVoicePreparer, } from "./sensevoice-runtime.js";
|
|
70
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,UAAU,EACV,YAAY,GAYb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GAKjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,GAKxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,eAAe,GAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,GAE1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,GAIrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,gBAAgB,GAGjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GAEvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAMnB,MAAM,yBAAyB,CAAC"}
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
* Shared Voice readiness facts for Settings UI, doctor, and tool error text.
|
|
3
3
|
* Wake-word / always-on hotword is intentionally out of scope (see docs/voice.md).
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
import type { VoiceDirection } from "./types.js";
|
|
6
|
+
export type VoiceAccessKind = "off" | "memory" | "local" | "system" | "openai-ready" | "openai-missing-key" | "unknown";
|
|
7
|
+
/** What a caller knows about the Settings side of voice. */
|
|
8
|
+
export interface VoiceAccessFacts {
|
|
9
|
+
readonly direction: VoiceDirection;
|
|
10
|
+
/** Engine id staged by the card (`local` / `openai`). */
|
|
11
|
+
readonly engine?: string;
|
|
12
|
+
}
|
|
6
13
|
export interface VoiceAccessDescription {
|
|
7
14
|
readonly kind: VoiceAccessKind;
|
|
8
15
|
/** True when a VoiceService Provider can be constructed without inject. */
|
|
@@ -13,14 +20,13 @@ export interface VoiceAccessDescription {
|
|
|
13
20
|
readonly summary: string;
|
|
14
21
|
}
|
|
15
22
|
/**
|
|
16
|
-
* Describe how Voice would resolve for this env +
|
|
23
|
+
* Describe how Voice would resolve for this env + Settings engine.
|
|
17
24
|
* Does not construct Providers — only readiness / honest-failure copy.
|
|
25
|
+
* @param env - environment carrying the CI bypass and keys.
|
|
26
|
+
* @param facts - direction and the engine Settings selected.
|
|
27
|
+
* @returns the readiness facts tools and Settings share.
|
|
18
28
|
*/
|
|
19
|
-
export declare function describeVoiceAccess(env
|
|
20
|
-
readonly mode?: string;
|
|
21
|
-
}): VoiceAccessDescription;
|
|
29
|
+
export declare function describeVoiceAccess(env: NodeJS.ProcessEnv, facts: VoiceAccessFacts): VoiceAccessDescription;
|
|
22
30
|
/** Tool execute error string — same facts as {@link describeVoiceAccess}. */
|
|
23
|
-
export declare function voiceUnavailableMessage(env
|
|
24
|
-
readonly mode?: string;
|
|
25
|
-
}): string;
|
|
31
|
+
export declare function voiceUnavailableMessage(env: NodeJS.ProcessEnv, facts: VoiceAccessFacts): string;
|
|
26
32
|
//# sourceMappingURL=readiness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,cAAc,GACd,oBAAoB,GACpB,SAAS,CAAC;AAEd,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,yDAAyD;IACzD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AASD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,KAAK,EAAE,gBAAgB,GACtB,sBAAsB,CAyExB;AAED,6EAA6E;AAC7E,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,KAAK,EAAE,gBAAgB,GACtB,MAAM,CAER"}
|
|
@@ -2,37 +2,36 @@
|
|
|
2
2
|
* Shared Voice readiness facts for Settings UI, doctor, and tool error text.
|
|
3
3
|
* Wake-word / always-on hotword is intentionally out of scope (see docs/voice.md).
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
const envRaw = String(env.XRK_VOICE ?? "").trim();
|
|
7
|
-
if (envRaw !== "")
|
|
8
|
-
return envRaw.toLowerCase();
|
|
9
|
-
if (product?.mode === "openai")
|
|
10
|
-
return "1";
|
|
11
|
-
if (product?.mode === "local")
|
|
12
|
-
return "local";
|
|
13
|
-
return "";
|
|
14
|
-
}
|
|
5
|
+
import { resolveEngineId } from "./engine-ids.js";
|
|
15
6
|
function hasApiKey(env) {
|
|
16
7
|
return Boolean(String(env.XRK_VOICE_OPENAI_KEY ?? "").trim() ||
|
|
17
8
|
String(env.OPENAI_API_KEY ?? "").trim());
|
|
18
9
|
}
|
|
19
10
|
/**
|
|
20
|
-
* Describe how Voice would resolve for this env +
|
|
11
|
+
* Describe how Voice would resolve for this env + Settings engine.
|
|
21
12
|
* Does not construct Providers — only readiness / honest-failure copy.
|
|
13
|
+
* @param env - environment carrying the CI bypass and keys.
|
|
14
|
+
* @param facts - direction and the engine Settings selected.
|
|
15
|
+
* @returns the readiness facts tools and Settings share.
|
|
22
16
|
*/
|
|
23
|
-
export function describeVoiceAccess(env
|
|
24
|
-
const
|
|
25
|
-
|
|
17
|
+
export function describeVoiceAccess(env, facts) {
|
|
18
|
+
const engine = resolveEngineId(env, facts.engine);
|
|
19
|
+
const asr = facts.direction === "asr";
|
|
20
|
+
if (engine === "") {
|
|
26
21
|
return {
|
|
27
22
|
kind: "off",
|
|
28
23
|
ready: false,
|
|
29
|
-
message:
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
message: asr
|
|
25
|
+
? "Error: speech input is not enabled. Turn on Settings → Plugins → ASR, or set " +
|
|
26
|
+
"XRK_VOICE=local (SenseVoice) / XRK_VOICE=1 with XRK_VOICE_OPENAI_KEY. See docs/voice.md."
|
|
27
|
+
: "Error: text-to-speech is not enabled. Turn on Settings → Plugins → TTS, or set " +
|
|
28
|
+
"XRK_VOICE=system / XRK_VOICE=1 with XRK_VOICE_OPENAI_KEY. See docs/voice.md.",
|
|
29
|
+
summary: asr
|
|
30
|
+
? "ASR off — dictation has no Provider"
|
|
31
|
+
: "TTS off — the speak tool has no Provider",
|
|
33
32
|
};
|
|
34
33
|
}
|
|
35
|
-
if (
|
|
34
|
+
if (engine === "memory") {
|
|
36
35
|
return {
|
|
37
36
|
kind: "memory",
|
|
38
37
|
ready: true,
|
|
@@ -40,7 +39,16 @@ export function describeVoiceAccess(env = process.env, product) {
|
|
|
40
39
|
summary: "memory (CI/demo Provider)",
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
|
-
if (
|
|
42
|
+
if (engine === "local") {
|
|
43
|
+
if (!asr) {
|
|
44
|
+
return {
|
|
45
|
+
kind: "system",
|
|
46
|
+
ready: true,
|
|
47
|
+
message: "Error: local TTS could not run this Host's speech command. " +
|
|
48
|
+
"Windows uses PowerShell + System.Speech, macOS uses `say`, Linux uses `espeak-ng`.",
|
|
49
|
+
summary: "local system TTS (SAPI · say · espeak-ng)",
|
|
50
|
+
};
|
|
51
|
+
}
|
|
44
52
|
return {
|
|
45
53
|
kind: "local",
|
|
46
54
|
ready: true,
|
|
@@ -49,14 +57,15 @@ export function describeVoiceAccess(env = process.env, product) {
|
|
|
49
57
|
summary: "local SenseVoice Provider (assets + sherpa-onnx-node required for STT)",
|
|
50
58
|
};
|
|
51
59
|
}
|
|
52
|
-
if (
|
|
60
|
+
if (engine === "openai") {
|
|
53
61
|
if (!hasApiKey(env)) {
|
|
54
62
|
return {
|
|
55
63
|
kind: "openai-missing-key",
|
|
56
64
|
ready: false,
|
|
57
|
-
message:
|
|
58
|
-
"(or OPENAI_API_KEY); optional base URL
|
|
59
|
-
|
|
65
|
+
message: `Error: ${asr ? "speech input" : "text-to-speech"} is enabled but no API key. ` +
|
|
66
|
+
"Set Credentials XRK_VOICE_OPENAI_KEY (or OPENAI_API_KEY); optional base URL " +
|
|
67
|
+
"via Settings or XRK_VOICE_BASE_URL.",
|
|
68
|
+
summary: `openai enabled but API key missing (Credentials XRK_VOICE_OPENAI_KEY)`,
|
|
60
69
|
};
|
|
61
70
|
}
|
|
62
71
|
return {
|
|
@@ -70,11 +79,11 @@ export function describeVoiceAccess(env = process.env, product) {
|
|
|
70
79
|
kind: "unknown",
|
|
71
80
|
ready: false,
|
|
72
81
|
message: "Error: no VoiceService Provider is configured. Inject a service or set XRK_VOICE.",
|
|
73
|
-
summary: `unknown
|
|
82
|
+
summary: `unknown voice engine=${engine}`,
|
|
74
83
|
};
|
|
75
84
|
}
|
|
76
85
|
/** Tool execute error string — same facts as {@link describeVoiceAccess}. */
|
|
77
|
-
export function voiceUnavailableMessage(env
|
|
78
|
-
return describeVoiceAccess(env,
|
|
86
|
+
export function voiceUnavailableMessage(env, facts) {
|
|
87
|
+
return describeVoiceAccess(env, facts).message;
|
|
79
88
|
}
|
|
80
89
|
//# sourceMappingURL=readiness.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness.js","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"readiness.js","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA6BlD,SAAS,SAAS,CAAC,GAAsB;IACvC,OAAO,OAAO,CACZ,MAAM,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;QAC3C,MAAM,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,GAAsB,EACtB,KAAuB;IAEvB,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC;IACtC,IAAI,MAAM,KAAK,EAAE,EAAE,CAAC;QAClB,OAAO;YACL,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,GAAG;gBACV,CAAC,CAAC,+EAA+E;oBAC/E,0FAA0F;gBAC5F,CAAC,CAAC,iFAAiF;oBACjF,8EAA8E;YAClF,OAAO,EAAE,GAAG;gBACV,CAAC,CAAC,qCAAqC;gBACvC,CAAC,CAAC,0CAA0C;SAC/C,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,OAAO;YACL,IAAI,EAAE,QAAQ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D,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SenseVoice ONNX asset lock — the single place a model URL, size, or hash is written.
|
|
3
|
+
*
|
|
4
|
+
* Assets never live in the repo (≈230 MB): a user opts in by pressing download
|
|
5
|
+
* in Settings → Plugins → Voice. Every entry pins a **commit revision** (never
|
|
6
|
+
* `main`) plus a sha256, so a mirror either serves those exact bytes or fails
|
|
7
|
+
* loudly — it cannot silently swap weights.
|
|
8
|
+
*
|
|
9
|
+
* v1 ships int8 only. The fp32 build is 894 MiB (≈4×) for a quality difference
|
|
10
|
+
* nobody has measured here; it stays out until someone does.
|
|
11
|
+
*
|
|
12
|
+
* Third-party provenance — these are NOT first-party weights, and the docs say so:
|
|
13
|
+
* - `model.int8.onnx` / `tokens.txt`: csukuangfj's sherpa-onnx conversion of
|
|
14
|
+
* FunAudioLLM/SenseVoice (upstream MIT).
|
|
15
|
+
* - `silero_vad.onnx`: snakers4/silero-vad via csukuangfj/vad (upstream MIT).
|
|
16
|
+
* Origins: hf-mirror.com first — the direct host black-holes TCP on filtered
|
|
17
|
+
* links and cost the first 20 s of every press — with huggingface.co as the
|
|
18
|
+
* fallback for networks where the mirror is the slower of the two. A Host
|
|
19
|
+
* behind a proxy can be pointed through it from the ASR card (`downloadProxy`).
|
|
20
|
+
*/
|
|
21
|
+
/** One downloadable file, resolved as `origin + path`. */
|
|
22
|
+
export interface SenseVoiceAsset {
|
|
23
|
+
/** Stable id used by the prepare state and the logs. */
|
|
24
|
+
readonly id: string;
|
|
25
|
+
/** Basename inside the data root (`{XRK_HOME}/voice/sensevoice`). */
|
|
26
|
+
readonly file: string;
|
|
27
|
+
/** Appended to an origin; carries the pinned revision. */
|
|
28
|
+
readonly path: string;
|
|
29
|
+
/** Exact byte length — a longer body is a failure, not a bigger model. */
|
|
30
|
+
readonly bytes: number;
|
|
31
|
+
readonly sha256: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Ordered origins; the preparer walks them in this order and stops at the first
|
|
35
|
+
* that serves bytes.
|
|
36
|
+
*
|
|
37
|
+
* Mainland-first: `hf-mirror.com` is Hugging Face's reverse proxy and answers
|
|
38
|
+
* in ≈1 s on a link where `huggingface.co` does not answer at all (the direct
|
|
39
|
+
* host times out at the TCP layer, which used to burn the first 20 s of every
|
|
40
|
+
* press before the fallback was even tried). The order is only a preference —
|
|
41
|
+
* `XRK_SENSEVOICE_ORIGIN` still lets an operator pin one origin.
|
|
42
|
+
*/
|
|
43
|
+
export declare const SENSEVOICE_ORIGINS: readonly string[];
|
|
44
|
+
/** Files a ready local engine needs, in download order (smallest first). */
|
|
45
|
+
export declare const SENSEVOICE_ASSETS: readonly SenseVoiceAsset[];
|
|
46
|
+
/** Total download size a user is agreeing to. */
|
|
47
|
+
export declare const SENSEVOICE_TOTAL_BYTES: number;
|
|
48
|
+
//# sourceMappingURL=sensevoice-assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensevoice-assets.d.ts","sourceRoot":"","sources":["../src/sensevoice-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAMD;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAG/C,CAAA;AAED,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAsBvD,CAAA;AAED,iDAAiD;AACjD,eAAO,MAAM,sBAAsB,QAGlC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SenseVoice ONNX asset lock — the single place a model URL, size, or hash is written.
|
|
3
|
+
*
|
|
4
|
+
* Assets never live in the repo (≈230 MB): a user opts in by pressing download
|
|
5
|
+
* in Settings → Plugins → Voice. Every entry pins a **commit revision** (never
|
|
6
|
+
* `main`) plus a sha256, so a mirror either serves those exact bytes or fails
|
|
7
|
+
* loudly — it cannot silently swap weights.
|
|
8
|
+
*
|
|
9
|
+
* v1 ships int8 only. The fp32 build is 894 MiB (≈4×) for a quality difference
|
|
10
|
+
* nobody has measured here; it stays out until someone does.
|
|
11
|
+
*
|
|
12
|
+
* Third-party provenance — these are NOT first-party weights, and the docs say so:
|
|
13
|
+
* - `model.int8.onnx` / `tokens.txt`: csukuangfj's sherpa-onnx conversion of
|
|
14
|
+
* FunAudioLLM/SenseVoice (upstream MIT).
|
|
15
|
+
* - `silero_vad.onnx`: snakers4/silero-vad via csukuangfj/vad (upstream MIT).
|
|
16
|
+
* Origins: hf-mirror.com first — the direct host black-holes TCP on filtered
|
|
17
|
+
* links and cost the first 20 s of every press — with huggingface.co as the
|
|
18
|
+
* fallback for networks where the mirror is the slower of the two. A Host
|
|
19
|
+
* behind a proxy can be pointed through it from the ASR card (`downloadProxy`).
|
|
20
|
+
*/
|
|
21
|
+
const REVISION = '2365baeacb507f821a0c8120fcee3d484dba7a07';
|
|
22
|
+
const VAD_REVISION = 'fba88cd2e921609e7675c3aaf51e0b9b295da4bc';
|
|
23
|
+
const SENSEVOICE_DIR = '/csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17/resolve';
|
|
24
|
+
/**
|
|
25
|
+
* Ordered origins; the preparer walks them in this order and stops at the first
|
|
26
|
+
* that serves bytes.
|
|
27
|
+
*
|
|
28
|
+
* Mainland-first: `hf-mirror.com` is Hugging Face's reverse proxy and answers
|
|
29
|
+
* in ≈1 s on a link where `huggingface.co` does not answer at all (the direct
|
|
30
|
+
* host times out at the TCP layer, which used to burn the first 20 s of every
|
|
31
|
+
* press before the fallback was even tried). The order is only a preference —
|
|
32
|
+
* `XRK_SENSEVOICE_ORIGIN` still lets an operator pin one origin.
|
|
33
|
+
*/
|
|
34
|
+
export const SENSEVOICE_ORIGINS = [
|
|
35
|
+
'https://hf-mirror.com',
|
|
36
|
+
'https://huggingface.co',
|
|
37
|
+
];
|
|
38
|
+
/** Files a ready local engine needs, in download order (smallest first). */
|
|
39
|
+
export const SENSEVOICE_ASSETS = [
|
|
40
|
+
{
|
|
41
|
+
id: 'tokens',
|
|
42
|
+
file: 'tokens.txt',
|
|
43
|
+
path: `${SENSEVOICE_DIR}/${REVISION}/tokens.txt`,
|
|
44
|
+
bytes: 315_894,
|
|
45
|
+
sha256: 'f449eb28dc567533d7fa59be34e2abca8784f771850c78a47fb731a31429a1dc',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'vad',
|
|
49
|
+
file: 'silero_vad.onnx',
|
|
50
|
+
path: `/csukuangfj/vad/resolve/${VAD_REVISION}/silero_vad.onnx`,
|
|
51
|
+
bytes: 1_807_522,
|
|
52
|
+
sha256: 'a35ebf52fd3ce5f1469b2a36158dba761bc47b973ea3382b3186ca15b1f5af28',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'model',
|
|
56
|
+
file: 'model.int8.onnx',
|
|
57
|
+
path: `${SENSEVOICE_DIR}/${REVISION}/model.int8.onnx`,
|
|
58
|
+
bytes: 239_233_841,
|
|
59
|
+
sha256: 'c71f0ce00bec95b07744e116345e33d8cbbe08cef896382cf907bf4b51a2cd51',
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
/** Total download size a user is agreeing to. */
|
|
63
|
+
export const SENSEVOICE_TOTAL_BYTES = SENSEVOICE_ASSETS.reduce((sum, asset) => sum + asset.bytes, 0);
|
|
64
|
+
//# sourceMappingURL=sensevoice-assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensevoice-assets.js","sourceRoot":"","sources":["../src/sensevoice-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAeH,MAAM,QAAQ,GAAG,0CAA0C,CAAA;AAC3D,MAAM,YAAY,GAAG,0CAA0C,CAAA;AAC/D,MAAM,cAAc,GAAG,wEAAwE,CAAA;AAE/F;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,uBAAuB;IACvB,wBAAwB;CACzB,CAAA;AAED,4EAA4E;AAC5E,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC3D;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,GAAG,cAAc,IAAI,QAAQ,aAAa;QAChD,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,kEAAkE;KAC3E;IACD;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,2BAA2B,YAAY,kBAAkB;QAC/D,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,kEAAkE;KAC3E;IACD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,GAAG,cAAc,IAAI,QAAQ,kBAAkB;QACrD,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,kEAAkE;KAC3E;CACF,CAAA;AAED,iDAAiD;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,MAAM,CAC5D,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,EACjC,CAAC,CACF,CAAA"}
|
|
@@ -23,6 +23,30 @@ export interface SenseVoiceLocalOptions {
|
|
|
23
23
|
export declare function senseVoiceDataRoot(env?: NodeJS.ProcessEnv, override?: string): string;
|
|
24
24
|
/** Disk inspect — no downloads, no model load (DSH activation semantics). */
|
|
25
25
|
export declare function inspectSenseVoiceAssets(options?: SenseVoiceLocalOptions): SenseVoiceInspectResult;
|
|
26
|
+
/**
|
|
27
|
+
* Host-side readiness probe for the Settings card: platform, native binding,
|
|
28
|
+
* assets. It never loads a model — a probe that allocated 228 MB to answer
|
|
29
|
+
* "is it installed?" would cost more than the question.
|
|
30
|
+
*/
|
|
31
|
+
export interface SenseVoiceEngineProbe {
|
|
32
|
+
/** This platform can run the native binding at all. */
|
|
33
|
+
readonly supported: boolean;
|
|
34
|
+
readonly platform: string;
|
|
35
|
+
/** `sherpa-onnx-node` resolved and exported an OfflineRecognizer. */
|
|
36
|
+
readonly engine: boolean;
|
|
37
|
+
readonly reason?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Platforms the published sherpa-onnx-node build ships binaries for. */
|
|
40
|
+
/**
|
|
41
|
+
* Platforms `sherpa-onnx-node@2` ships a prebuilt binding for (checked against
|
|
42
|
+
* its `optionalDependencies`: win-x64/ia32/arm64, linux-x64/arm64,
|
|
43
|
+
* darwin-x64/arm64). Kept as an explicit list rather than a guess from
|
|
44
|
+
* `process.platform`: a 32-bit Linux or an Android user would otherwise be
|
|
45
|
+
* invited to install a package that cannot load.
|
|
46
|
+
*/
|
|
47
|
+
export declare const SENSEVOICE_PLATFORMS: readonly string[];
|
|
48
|
+
/** Resolve platform support + the optional binding, without touching weights. */
|
|
49
|
+
export declare function probeSenseVoiceEngine(env?: NodeJS.ProcessEnv): SenseVoiceEngineProbe;
|
|
26
50
|
/**
|
|
27
51
|
* Local SenseVoice VoiceService. Ready only when ONNX assets + sherpa-onnx-node
|
|
28
52
|
* are present; otherwise transcribe fails with prepare guidance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sensevoice-local.d.ts","sourceRoot":"","sources":["../src/sensevoice-local.ts"],"names":[],"mappings":"AAcA,OAAO,EAKL,KAAK,YAAY,EAKlB,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ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CAoHd"}
|
|
@@ -53,8 +53,14 @@ export function inspectSenseVoiceAssets(options = {}) {
|
|
|
53
53
|
const dataRoot = senseVoiceDataRoot(env, options.dataRoot);
|
|
54
54
|
const paths = resolveAssetPaths(dataRoot, options.precision ?? "int8");
|
|
55
55
|
const missing = [];
|
|
56
|
-
if (!existsSync(paths.model))
|
|
57
|
-
|
|
56
|
+
if (!existsSync(paths.model)) {
|
|
57
|
+
// Name the file the card will actually fetch (`model.int8.onnx`), not the
|
|
58
|
+
// fp32 fallback the loader resolved to when neither weight exists — a list
|
|
59
|
+
// that says `model.onnx` next to a button that downloads `model.int8.onnx`
|
|
60
|
+
// reads like the download is not what the card is waiting for.
|
|
61
|
+
const name = path.basename(paths.model);
|
|
62
|
+
missing.push(name === "model.onnx" ? "model.int8.onnx" : name);
|
|
63
|
+
}
|
|
58
64
|
if (!existsSync(paths.tokens))
|
|
59
65
|
missing.push("tokens.txt");
|
|
60
66
|
if (!existsSync(paths.vad))
|
|
@@ -79,6 +85,55 @@ function tryLoadSherpa() {
|
|
|
79
85
|
};
|
|
80
86
|
}
|
|
81
87
|
}
|
|
88
|
+
/** Platforms the published sherpa-onnx-node build ships binaries for. */
|
|
89
|
+
/**
|
|
90
|
+
* Platforms `sherpa-onnx-node@2` ships a prebuilt binding for (checked against
|
|
91
|
+
* its `optionalDependencies`: win-x64/ia32/arm64, linux-x64/arm64,
|
|
92
|
+
* darwin-x64/arm64). Kept as an explicit list rather than a guess from
|
|
93
|
+
* `process.platform`: a 32-bit Linux or an Android user would otherwise be
|
|
94
|
+
* invited to install a package that cannot load.
|
|
95
|
+
*/
|
|
96
|
+
export const SENSEVOICE_PLATFORMS = [
|
|
97
|
+
'darwin-arm64',
|
|
98
|
+
'darwin-x64',
|
|
99
|
+
'linux-arm64',
|
|
100
|
+
'linux-x64',
|
|
101
|
+
'win32-arm64',
|
|
102
|
+
'win32-x64',
|
|
103
|
+
];
|
|
104
|
+
/**
|
|
105
|
+
* Termux reports `linux` but links Bionic libc, so the glibc build cannot load
|
|
106
|
+
* there. Naming it here keeps the card from inviting an Android user to press
|
|
107
|
+
* a button that is guaranteed to fail.
|
|
108
|
+
*/
|
|
109
|
+
function isTermux(env) {
|
|
110
|
+
return /com\.termux/i.test(String(env.PREFIX ?? ''));
|
|
111
|
+
}
|
|
112
|
+
/** Resolve platform support + the optional binding, without touching weights. */
|
|
113
|
+
export function probeSenseVoiceEngine(env = process.env) {
|
|
114
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
115
|
+
if (isTermux(env)) {
|
|
116
|
+
return {
|
|
117
|
+
supported: false,
|
|
118
|
+
platform,
|
|
119
|
+
engine: false,
|
|
120
|
+
reason: 'Termux (Android) links Bionic libc and the published sherpa-onnx-node ' +
|
|
121
|
+
'build is glibc-only.',
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
if (!SENSEVOICE_PLATFORMS.includes(platform)) {
|
|
125
|
+
return {
|
|
126
|
+
supported: false,
|
|
127
|
+
platform,
|
|
128
|
+
engine: false,
|
|
129
|
+
reason: `Local speech has no build for ${platform}.`,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
const sherpa = tryLoadSherpa();
|
|
133
|
+
return sherpa.ok
|
|
134
|
+
? { supported: true, platform, engine: true }
|
|
135
|
+
: { supported: true, platform, engine: false, reason: sherpa.reason };
|
|
136
|
+
}
|
|
82
137
|
function wavPcm16Mono(bytes) {
|
|
83
138
|
if (bytes.byteLength < 44) {
|
|
84
139
|
throw new VoiceError("audio too short for WAV", "VOICE_BAD_ARGS");
|
|
@@ -121,7 +176,11 @@ export function createSenseVoiceLocalProvider(options = {}) {
|
|
|
121
176
|
"Place DSH-compatible SenseVoiceSmall ONNX + tokens.txt + silero_vad.onnx " +
|
|
122
177
|
"(or set XRK_VOICE_SENSEVOICE_DIR). See docs/voice.md.", "VOICE_UNAVAILABLE");
|
|
123
178
|
}
|
|
124
|
-
|
|
179
|
+
// Chinese-first, not `auto`. SenseVoice's auto-detect answered a short
|
|
180
|
+
// noisy mandarin take with Korean `그.` — a language guess the user never
|
|
181
|
+
// asked for and cannot correct from the composer. `auto` stays available
|
|
182
|
+
// for callers that explicitly pass it.
|
|
183
|
+
const language = String(req.language ?? "zh").trim() || "zh";
|
|
125
184
|
if (!LANGS.includes(language) &&
|
|
126
185
|
language !== "auto") {
|
|
127
186
|
throw new VoiceError(`Unsupported SenseVoice language '${language}' (use ${LANGS.join("|")})`, "VOICE_BAD_ARGS");
|
|
@@ -153,7 +212,10 @@ export function createSenseVoiceLocalProvider(options = {}) {
|
|
|
153
212
|
recognizer.decode(stream);
|
|
154
213
|
const text = String(recognizer.getResult(stream).text ?? "").trim();
|
|
155
214
|
return {
|
|
156
|
-
|
|
215
|
+
// An empty decode is 「nothing heard」, not a transcript. Returning a
|
|
216
|
+
// sentinel here made the card print `[no-speech]` — truncated by the
|
|
217
|
+
// trial box to a bare `[` — which reads like a corrupted result.
|
|
218
|
+
text,
|
|
157
219
|
provider: "sensevoice-local",
|
|
158
220
|
delivery: "local",
|
|
159
221
|
noSpeech: !text,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sensevoice-local.js","sourceRoot":"","sources":["../src/sensevoice-local.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,UAAU,GASX,MAAM,YAAY,CAAC;AAEpB,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAU,CAAC;AAyB/D,SAAS,WAAW,CAAC,GAAsB;IACzC,MAAM,IAAI,GAAG,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