@elizaos/plugin-local-inference 2.0.0-beta.1 → 2.0.11-beta.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/LICENSE +21 -0
- package/README.md +83 -0
- package/package.json +81 -15
- package/src/actions/generate-media.d.ts +59 -0
- package/src/actions/generate-media.d.ts.map +1 -0
- package/src/actions/generate-media.ts +647 -0
- package/src/actions/identify-speaker.d.ts +23 -0
- package/src/actions/identify-speaker.d.ts.map +1 -0
- package/src/actions/identify-speaker.ts +171 -0
- package/src/adapters/capacitor-llama/__tests__/compat-behavior.test.ts +218 -0
- package/src/adapters/capacitor-llama/__tests__/index.test.ts +68 -0
- package/src/adapters/capacitor-llama/__tests__/structured-output.test.ts +215 -0
- package/src/adapters/capacitor-llama/__tests__/text-streaming.test.ts +174 -0
- package/src/adapters/capacitor-llama/environment.ts +71 -0
- package/src/adapters/capacitor-llama/index.browser.ts +83 -0
- package/src/adapters/capacitor-llama/index.ts +807 -0
- package/src/adapters/capacitor-llama/loader.ts +109 -0
- package/src/adapters/capacitor-llama/structured-output.ts +165 -0
- package/src/adapters/capacitor-llama/text-streaming.ts +227 -0
- package/src/adapters/capacitor-llama/types.ts +374 -0
- package/src/backends/apple-foundation.ts +127 -0
- package/src/index.d.ts +7 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.ts +54 -0
- package/src/local-inference-routes.d.ts +38 -0
- package/src/local-inference-routes.d.ts.map +1 -0
- package/src/local-inference-routes.test.ts +344 -0
- package/src/local-inference-routes.ts +1543 -0
- package/src/provider.d.ts +21 -0
- package/src/provider.d.ts.map +1 -0
- package/src/provider.ts +1171 -0
- package/src/routes/compat-helpers.d.ts +18 -0
- package/src/routes/compat-helpers.d.ts.map +1 -0
- package/src/routes/compat-helpers.ts +274 -0
- package/src/routes/family-member-route.d.ts +62 -0
- package/src/routes/family-member-route.d.ts.map +1 -0
- package/src/routes/family-member-route.ts +353 -0
- package/src/routes/index.d.ts +19 -0
- package/src/routes/index.d.ts.map +1 -0
- package/src/routes/index.ts +60 -0
- package/src/routes/live-diarization-route.d.ts +26 -0
- package/src/routes/live-diarization-route.d.ts.map +1 -0
- package/src/routes/live-diarization-route.test.ts +213 -0
- package/src/routes/live-diarization-route.ts +122 -0
- package/src/routes/local-inference-asr-route.d.ts +4 -0
- package/src/routes/local-inference-asr-route.d.ts.map +1 -0
- package/src/routes/local-inference-asr-route.test.ts +190 -0
- package/src/routes/local-inference-asr-route.ts +213 -0
- package/src/routes/local-inference-compat-routes.d.ts +16 -0
- package/src/routes/local-inference-compat-routes.d.ts.map +1 -0
- package/src/routes/local-inference-compat-routes.test.ts +423 -0
- package/src/routes/local-inference-compat-routes.ts +782 -0
- package/src/routes/local-inference-tts-route.d.ts +7 -0
- package/src/routes/local-inference-tts-route.d.ts.map +1 -0
- package/src/routes/local-inference-tts-route.test.ts +179 -0
- package/src/routes/local-inference-tts-route.ts +230 -0
- package/src/routes/voice-first-run-routes.d.ts +62 -0
- package/src/routes/voice-first-run-routes.d.ts.map +1 -0
- package/src/routes/voice-first-run-routes.ts +524 -0
- package/src/routes/voice-models-routes.d.ts +62 -0
- package/src/routes/voice-models-routes.d.ts.map +1 -0
- package/src/routes/voice-models-routes.ts +554 -0
- package/src/routes/voice-profile-plugin-routes.d.ts +19 -0
- package/src/routes/voice-profile-plugin-routes.d.ts.map +1 -0
- package/src/routes/voice-profile-plugin-routes.ts +138 -0
- package/src/routes/voice-profiles-management-routes.d.ts +52 -0
- package/src/routes/voice-profiles-management-routes.d.ts.map +1 -0
- package/src/routes/voice-profiles-management-routes.ts +476 -0
- package/src/routes/voice-speaker-profile-routes.d.ts +57 -0
- package/src/routes/voice-speaker-profile-routes.d.ts.map +1 -0
- package/src/routes/voice-speaker-profile-routes.ts +199 -0
- package/src/runtime/aosp-llama-loader-selection.test.ts +80 -0
- package/src/runtime/capacitor-llama.d.ts +25 -0
- package/src/runtime/embedding-manager-support.d.ts +77 -0
- package/src/runtime/embedding-manager-support.d.ts.map +1 -0
- package/src/runtime/embedding-manager-support.ts +497 -0
- package/src/runtime/embedding-presets.d.ts +16 -0
- package/src/runtime/embedding-presets.d.ts.map +1 -0
- package/src/runtime/embedding-presets.ts +81 -0
- package/src/runtime/embedding-warmup-policy.d.ts +14 -0
- package/src/runtime/embedding-warmup-policy.d.ts.map +1 -0
- package/src/runtime/embedding-warmup-policy.test.ts +53 -0
- package/src/runtime/embedding-warmup-policy.ts +48 -0
- package/src/runtime/ensure-local-inference-handler.d.ts +53 -0
- package/src/runtime/ensure-local-inference-handler.d.ts.map +1 -0
- package/src/runtime/ensure-local-inference-handler.test.ts +528 -0
- package/src/runtime/ensure-local-inference-handler.ts +1398 -0
- package/src/runtime/index.d.ts +14 -0
- package/src/runtime/index.d.ts.map +1 -0
- package/src/runtime/index.ts +27 -0
- package/src/runtime/mobile-local-inference-gate.d.ts +31 -0
- package/src/runtime/mobile-local-inference-gate.d.ts.map +1 -0
- package/src/runtime/mobile-local-inference-gate.test.ts +69 -0
- package/src/runtime/mobile-local-inference-gate.ts +44 -0
- package/src/runtime/voice-entity-binding.d.ts +103 -0
- package/src/runtime/voice-entity-binding.d.ts.map +1 -0
- package/src/runtime/voice-entity-binding.transcript.test.ts +69 -0
- package/src/runtime/voice-entity-binding.ts +328 -0
- package/src/services/README.md +71 -0
- package/src/services/__tests__/backend-selector.test.ts +101 -0
- package/src/services/__tests__/checkpoint-manager.test.ts +376 -0
- package/src/services/__tests__/gpu-autotune.test.ts +400 -0
- package/src/services/__tests__/llm-streaming-binding.test.ts +85 -0
- package/src/services/__tests__/planner-grammar.test.ts +372 -0
- package/src/services/__tests__/runtime-target.test.ts +176 -0
- package/src/services/active-model-switch-rollback.test.ts +183 -0
- package/src/services/active-model.d.ts +282 -0
- package/src/services/active-model.d.ts.map +1 -0
- package/src/services/active-model.ts +1213 -0
- package/src/services/asr/errors.d.ts +21 -0
- package/src/services/asr/errors.d.ts.map +1 -0
- package/src/services/asr/errors.ts +50 -0
- package/src/services/asr/hash.d.ts +28 -0
- package/src/services/asr/hash.d.ts.map +1 -0
- package/src/services/asr/hash.ts +49 -0
- package/src/services/asr/index.d.ts +76 -0
- package/src/services/asr/index.d.ts.map +1 -0
- package/src/services/asr/index.ts +178 -0
- package/src/services/asr/types.d.ts +91 -0
- package/src/services/asr/types.d.ts.map +1 -0
- package/src/services/asr/types.ts +95 -0
- package/src/services/assignments.d.ts +71 -0
- package/src/services/assignments.d.ts.map +1 -0
- package/src/services/assignments.test.ts +80 -0
- package/src/services/assignments.ts +230 -0
- package/src/services/backend-selector.ts +95 -0
- package/src/services/backend.d.ts +346 -0
- package/src/services/backend.d.ts.map +1 -0
- package/src/services/backend.ts +612 -0
- package/src/services/bundled-models.d.ts +34 -0
- package/src/services/bundled-models.d.ts.map +1 -0
- package/src/services/bundled-models.ts +129 -0
- package/src/services/cache-bridge.d.ts +206 -0
- package/src/services/cache-bridge.d.ts.map +1 -0
- package/src/services/cache-bridge.test.ts +516 -0
- package/src/services/cache-bridge.ts +423 -0
- package/src/services/catalog.d.ts +10 -0
- package/src/services/catalog.d.ts.map +1 -0
- package/src/services/catalog.test.ts +240 -0
- package/src/services/catalog.ts +27 -0
- package/src/services/checkpoint-client.d.ts +109 -0
- package/src/services/checkpoint-client.d.ts.map +1 -0
- package/src/services/checkpoint-client.ts +258 -0
- package/src/services/checkpoint-manager.ts +474 -0
- package/src/services/cloud-fallback.d.ts +102 -0
- package/src/services/cloud-fallback.d.ts.map +1 -0
- package/src/services/cloud-fallback.ts +230 -0
- package/src/services/conversation-registry.d.ts +142 -0
- package/src/services/conversation-registry.d.ts.map +1 -0
- package/src/services/conversation-registry.test.ts +235 -0
- package/src/services/conversation-registry.ts +264 -0
- package/src/services/desktop-fused-ffi-backend-runtime.d.ts +92 -0
- package/src/services/desktop-fused-ffi-backend-runtime.d.ts.map +1 -0
- package/src/services/desktop-fused-ffi-backend-runtime.ts +333 -0
- package/src/services/device-bridge.d.ts +188 -0
- package/src/services/device-bridge.d.ts.map +1 -0
- package/src/services/device-bridge.ts +1237 -0
- package/src/services/device-resource-metrics.d.ts +149 -0
- package/src/services/device-resource-metrics.d.ts.map +1 -0
- package/src/services/device-resource-metrics.test.ts +98 -0
- package/src/services/device-resource-metrics.ts +346 -0
- package/src/services/device-tier.d.ts +115 -0
- package/src/services/device-tier.d.ts.map +1 -0
- package/src/services/device-tier.test.ts +371 -0
- package/src/services/device-tier.ts +410 -0
- package/src/services/downloader.d.ts +82 -0
- package/src/services/downloader.d.ts.map +1 -0
- package/src/services/downloader.test.ts +724 -0
- package/src/services/downloader.ts +899 -0
- package/src/services/engine-direct-bundle.test.ts +58 -0
- package/src/services/engine-streaming.test.ts +80 -0
- package/src/services/engine.d.ts +534 -0
- package/src/services/engine.d.ts.map +1 -0
- package/src/services/engine.ts +1891 -0
- package/src/services/ensure-local-artifacts.integration.test.ts +273 -0
- package/src/services/ensure-local-artifacts.test.ts +368 -0
- package/src/services/ensure-local-artifacts.ts +351 -0
- package/src/services/external-scanner.d.ts +17 -0
- package/src/services/external-scanner.d.ts.map +1 -0
- package/src/services/external-scanner.ts +312 -0
- package/src/services/ffi-llm-mock.ts +354 -0
- package/src/services/ffi-llm-streaming-abi.ts +442 -0
- package/src/services/ffi-streaming-backend.d.ts +180 -0
- package/src/services/ffi-streaming-backend.d.ts.map +1 -0
- package/src/services/ffi-streaming-backend.ts +382 -0
- package/src/services/ffi-streaming-runner.d.ts +122 -0
- package/src/services/ffi-streaming-runner.d.ts.map +1 -0
- package/src/services/ffi-streaming-runner.test.ts +60 -0
- package/src/services/ffi-streaming-runner.ts +354 -0
- package/src/services/ffi-unload-ordering.test.ts +162 -0
- package/src/services/gpu-autotune.ts +534 -0
- package/src/services/gpu-detect.ts +139 -0
- package/src/services/handler-registry.d.ts +72 -0
- package/src/services/handler-registry.d.ts.map +1 -0
- package/src/services/handler-registry.ts +240 -0
- package/src/services/hardware.d.ts +63 -0
- package/src/services/hardware.d.ts.map +1 -0
- package/src/services/hardware.test.ts +183 -0
- package/src/services/hardware.ts +404 -0
- package/src/services/hf-search.d.ts +26 -0
- package/src/services/hf-search.d.ts.map +1 -0
- package/src/services/hf-search.test.ts +69 -0
- package/src/services/hf-search.ts +420 -0
- package/src/services/image-description-runtime.d.ts +14 -0
- package/src/services/image-description-runtime.d.ts.map +1 -0
- package/src/services/image-description-runtime.test.ts +61 -0
- package/src/services/image-description-runtime.ts +118 -0
- package/src/services/imagegen/aosp-unavailable.d.ts +134 -0
- package/src/services/imagegen/aosp-unavailable.d.ts.map +1 -0
- package/src/services/imagegen/aosp-unavailable.ts +229 -0
- package/src/services/imagegen/backend-selector.d.ts +118 -0
- package/src/services/imagegen/backend-selector.d.ts.map +1 -0
- package/src/services/imagegen/backend-selector.ts +281 -0
- package/src/services/imagegen/coreml-unavailable.d.ts +105 -0
- package/src/services/imagegen/coreml-unavailable.d.ts.map +1 -0
- package/src/services/imagegen/coreml-unavailable.ts +237 -0
- package/src/services/imagegen/errors.d.ts +16 -0
- package/src/services/imagegen/errors.d.ts.map +1 -0
- package/src/services/imagegen/errors.ts +40 -0
- package/src/services/imagegen/index.d.ts +58 -0
- package/src/services/imagegen/index.d.ts.map +1 -0
- package/src/services/imagegen/index.ts +144 -0
- package/src/services/imagegen/mflux.d.ts +74 -0
- package/src/services/imagegen/mflux.d.ts.map +1 -0
- package/src/services/imagegen/mflux.ts +313 -0
- package/src/services/imagegen/sd-cpp.d.ts +180 -0
- package/src/services/imagegen/sd-cpp.d.ts.map +1 -0
- package/src/services/imagegen/sd-cpp.ts +718 -0
- package/src/services/imagegen/tensorrt-unavailable.d.ts +83 -0
- package/src/services/imagegen/tensorrt-unavailable.d.ts.map +1 -0
- package/src/services/imagegen/tensorrt-unavailable.ts +295 -0
- package/src/services/imagegen/types.d.ts +181 -0
- package/src/services/imagegen/types.d.ts.map +1 -0
- package/src/services/imagegen/types.ts +193 -0
- package/src/services/index.d.ts +30 -0
- package/src/services/index.d.ts.map +1 -0
- package/src/services/index.ts +225 -0
- package/src/services/inference-capabilities.d.ts +132 -0
- package/src/services/inference-capabilities.d.ts.map +1 -0
- package/src/services/inference-capabilities.test.ts +75 -0
- package/src/services/inference-capabilities.ts +204 -0
- package/src/services/inference-telemetry.d.ts +59 -0
- package/src/services/inference-telemetry.d.ts.map +1 -0
- package/src/services/inference-telemetry.ts +143 -0
- package/src/services/ios-llama-streaming.ts +248 -0
- package/src/services/kv-spill.d.ts +189 -0
- package/src/services/kv-spill.d.ts.map +1 -0
- package/src/services/kv-spill.test.ts +222 -0
- package/src/services/kv-spill.ts +356 -0
- package/src/services/latency-trace.d.ts +346 -0
- package/src/services/latency-trace.d.ts.map +1 -0
- package/src/services/latency-trace.test.ts +266 -0
- package/src/services/latency-trace.ts +844 -0
- package/src/services/llama-server-metrics.ts +304 -0
- package/src/services/llm-streaming-binding.d.ts +96 -0
- package/src/services/llm-streaming-binding.d.ts.map +1 -0
- package/src/services/llm-streaming-binding.ts +136 -0
- package/src/services/load-args.d.ts +82 -0
- package/src/services/load-args.d.ts.map +1 -0
- package/src/services/load-args.ts +81 -0
- package/src/services/manifest/eliza-1.manifest.v1.json +708 -0
- package/src/services/manifest/index.d.ts +4 -0
- package/src/services/manifest/index.d.ts.map +1 -0
- package/src/services/manifest/index.ts +66 -0
- package/src/services/manifest/manifest.test.ts +693 -0
- package/src/services/manifest/schema.d.ts +715 -0
- package/src/services/manifest/schema.d.ts.map +1 -0
- package/src/services/manifest/schema.ts +655 -0
- package/src/services/manifest/types.d.ts +30 -0
- package/src/services/manifest/types.d.ts.map +1 -0
- package/src/services/manifest/types.ts +55 -0
- package/src/services/manifest/validator.d.ts +66 -0
- package/src/services/manifest/validator.d.ts.map +1 -0
- package/src/services/manifest/validator.ts +569 -0
- package/src/services/memory-arbiter.d.ts +343 -0
- package/src/services/memory-arbiter.d.ts.map +1 -0
- package/src/services/memory-arbiter.test.ts +419 -0
- package/src/services/memory-arbiter.ts +1000 -0
- package/src/services/memory-monitor.d.ts +119 -0
- package/src/services/memory-monitor.d.ts.map +1 -0
- package/src/services/memory-monitor.test.ts +208 -0
- package/src/services/memory-monitor.ts +296 -0
- package/src/services/memory-pressure.d.ts +127 -0
- package/src/services/memory-pressure.d.ts.map +1 -0
- package/src/services/memory-pressure.ts +413 -0
- package/src/services/mtp-doctor.d.ts +13 -0
- package/src/services/mtp-doctor.d.ts.map +1 -0
- package/src/services/mtp-doctor.ts +78 -0
- package/src/services/network-policy.d.ts +127 -0
- package/src/services/network-policy.d.ts.map +1 -0
- package/src/services/network-policy.ts +346 -0
- package/src/services/paths.d.ts +6 -0
- package/src/services/paths.d.ts.map +1 -0
- package/src/services/paths.ts +25 -0
- package/src/services/planner-skeleton.d.ts +124 -0
- package/src/services/planner-skeleton.d.ts.map +1 -0
- package/src/services/planner-skeleton.ts +175 -0
- package/src/services/providers.d.ts +38 -0
- package/src/services/providers.d.ts.map +1 -0
- package/src/services/providers.ts +507 -0
- package/src/services/ram-budget-cache.test.ts +163 -0
- package/src/services/ram-budget.d.ts +110 -0
- package/src/services/ram-budget.d.ts.map +1 -0
- package/src/services/ram-budget.ts +0 -0
- package/src/services/readiness.d.ts +9 -0
- package/src/services/readiness.d.ts.map +1 -0
- package/src/services/readiness.test.ts +87 -0
- package/src/services/readiness.ts +238 -0
- package/src/services/recommendation.d.ts +111 -0
- package/src/services/recommendation.d.ts.map +1 -0
- package/src/services/recommendation.ts +672 -0
- package/src/services/registry.d.ts +35 -0
- package/src/services/registry.d.ts.map +1 -0
- package/src/services/registry.ts +151 -0
- package/src/services/router-handler.d.ts +92 -0
- package/src/services/router-handler.d.ts.map +1 -0
- package/src/services/router-handler.test.ts +45 -0
- package/src/services/router-handler.ts +376 -0
- package/src/services/routing-policy.d.ts +55 -0
- package/src/services/routing-policy.d.ts.map +1 -0
- package/src/services/routing-policy.ts +228 -0
- package/src/services/routing-preferences.d.ts +8 -0
- package/src/services/routing-preferences.d.ts.map +1 -0
- package/src/services/routing-preferences.ts +15 -0
- package/src/services/runtime-target.d.ts +98 -0
- package/src/services/runtime-target.d.ts.map +1 -0
- package/src/services/runtime-target.ts +154 -0
- package/src/services/service.d.ts +128 -0
- package/src/services/service.d.ts.map +1 -0
- package/src/services/service.test.ts +223 -0
- package/src/services/service.ts +735 -0
- package/src/services/session-pool.d.ts +72 -0
- package/src/services/session-pool.d.ts.map +1 -0
- package/src/services/session-pool.ts +153 -0
- package/src/services/structured-output/deterministic-repair.d.ts +23 -0
- package/src/services/structured-output/deterministic-repair.d.ts.map +1 -0
- package/src/services/structured-output/deterministic-repair.test.ts +169 -0
- package/src/services/structured-output/deterministic-repair.ts +443 -0
- package/src/services/structured-output/index.ts +4 -0
- package/src/services/structured-output.d.ts +311 -0
- package/src/services/structured-output.d.ts.map +1 -0
- package/src/services/structured-output.test.ts +483 -0
- package/src/services/structured-output.ts +712 -0
- package/src/services/transcription-priority.test.ts +211 -0
- package/src/services/tts/errors.ts +46 -0
- package/src/services/tts/index.ts +214 -0
- package/src/services/tts/tts-audio-cache.ts +235 -0
- package/src/services/tts/types.ts +157 -0
- package/src/services/types.d.ts +19 -0
- package/src/services/types.d.ts.map +1 -0
- package/src/services/types.ts +55 -0
- package/src/services/verify-on-device.d.ts +34 -0
- package/src/services/verify-on-device.d.ts.map +1 -0
- package/src/services/verify-on-device.test.ts +87 -0
- package/src/services/verify-on-device.ts +127 -0
- package/src/services/verify.d.ts +8 -0
- package/src/services/verify.d.ts.map +1 -0
- package/src/services/verify.ts +13 -0
- package/src/services/vision/aosp-unavailable.d.ts +115 -0
- package/src/services/vision/aosp-unavailable.d.ts.map +1 -0
- package/src/services/vision/aosp-unavailable.ts +163 -0
- package/src/services/vision/capacitor-llama.d.ts +99 -0
- package/src/services/vision/capacitor-llama.d.ts.map +1 -0
- package/src/services/vision/capacitor-llama.ts +255 -0
- package/src/services/vision/cloud-fallback.d.ts +47 -0
- package/src/services/vision/cloud-fallback.d.ts.map +1 -0
- package/src/services/vision/cloud-fallback.test.ts +243 -0
- package/src/services/vision/cloud-fallback.ts +268 -0
- package/src/services/vision/fallback-chain.test.ts +86 -0
- package/src/services/vision/hash.d.ts +71 -0
- package/src/services/vision/hash.d.ts.map +1 -0
- package/src/services/vision/hash.ts +157 -0
- package/src/services/vision/index.d.ts +95 -0
- package/src/services/vision/index.d.ts.map +1 -0
- package/src/services/vision/index.ts +251 -0
- package/src/services/vision/llama-server.d.ts +73 -0
- package/src/services/vision/llama-server.d.ts.map +1 -0
- package/src/services/vision/llama-server.ts +177 -0
- package/src/services/vision/types.d.ts +153 -0
- package/src/services/vision/types.d.ts.map +1 -0
- package/src/services/vision/types.ts +154 -0
- package/src/services/vision/vast-fallback.d.ts +18 -0
- package/src/services/vision/vast-fallback.d.ts.map +1 -0
- package/src/services/vision/vast-fallback.ts +127 -0
- package/src/services/vision-embedding-cache.d.ts +98 -0
- package/src/services/vision-embedding-cache.d.ts.map +1 -0
- package/src/services/vision-embedding-cache.ts +189 -0
- package/src/services/voice/VOICE_WORKBENCH.md +88 -0
- package/src/services/voice/__test-helpers__/fake-ffi.ts +92 -0
- package/src/services/voice/__test-helpers__/synthetic-speech.ts +124 -0
- package/src/services/voice/__tests__/checkpoint-manager.test.ts +241 -0
- package/src/services/voice/__tests__/checkpoint-policy.test.ts +270 -0
- package/src/services/voice/__tests__/eager-context-builder.test.ts +257 -0
- package/src/services/voice/__tests__/eliza1-eot-scorer.test.ts +288 -0
- package/src/services/voice/__tests__/eot-classifier.test.ts +431 -0
- package/src/services/voice/__tests__/optimistic-rollback.test.ts +312 -0
- package/src/services/voice/__tests__/prefill-client.test.ts +266 -0
- package/src/services/voice/__tests__/prefix-preserving-queue.test.ts +208 -0
- package/src/services/voice/__tests__/streaming-asr.test.ts +450 -0
- package/src/services/voice/__tests__/streaming-transcriber.test.ts +339 -0
- package/src/services/voice/__tests__/turn-detector-resolver.test.ts +197 -0
- package/src/services/voice/__tests__/voice-state-machine-prefill.test.ts +275 -0
- package/src/services/voice/__tests__/voice-state-machine.test.ts +354 -0
- package/src/services/voice/audio-frame-consumer.d.ts +212 -0
- package/src/services/voice/audio-frame-consumer.d.ts.map +1 -0
- package/src/services/voice/audio-frame-consumer.test.ts +343 -0
- package/src/services/voice/audio-frame-consumer.ts +491 -0
- package/src/services/voice/barge-in.d.ts +112 -0
- package/src/services/voice/barge-in.d.ts.map +1 -0
- package/src/services/voice/barge-in.test.ts +244 -0
- package/src/services/voice/barge-in.ts +336 -0
- package/src/services/voice/cancellation-coordinator.d.ts +127 -0
- package/src/services/voice/cancellation-coordinator.d.ts.map +1 -0
- package/src/services/voice/cancellation-coordinator.test.ts +196 -0
- package/src/services/voice/cancellation-coordinator.ts +269 -0
- package/src/services/voice/checkpoint-manager.d.ts +199 -0
- package/src/services/voice/checkpoint-manager.d.ts.map +1 -0
- package/src/services/voice/checkpoint-manager.ts +401 -0
- package/src/services/voice/checkpoint-policy.ts +336 -0
- package/src/services/voice/composite-eot-classifier.test.ts +59 -0
- package/src/services/voice/e2e-harness.test.ts +182 -0
- package/src/services/voice/e2e-harness.ts +743 -0
- package/src/services/voice/eager-context-builder.d.ts +170 -0
- package/src/services/voice/eager-context-builder.d.ts.map +1 -0
- package/src/services/voice/eager-context-builder.ts +262 -0
- package/src/services/voice/eliza1-eot-scorer.d.ts +124 -0
- package/src/services/voice/eliza1-eot-scorer.d.ts.map +1 -0
- package/src/services/voice/eliza1-eot-scorer.ts +242 -0
- package/src/services/voice/embedding-server.ts +200 -0
- package/src/services/voice/embedding.d.ts +133 -0
- package/src/services/voice/embedding.d.ts.map +1 -0
- package/src/services/voice/embedding.test.ts +148 -0
- package/src/services/voice/embedding.ts +244 -0
- package/src/services/voice/emotion-attribution.d.ts +68 -0
- package/src/services/voice/emotion-attribution.d.ts.map +1 -0
- package/src/services/voice/emotion-attribution.test.ts +129 -0
- package/src/services/voice/emotion-attribution.ts +361 -0
- package/src/services/voice/engine-bridge-cancellation.test.ts +422 -0
- package/src/services/voice/engine-bridge.d.ts +746 -0
- package/src/services/voice/engine-bridge.d.ts.map +1 -0
- package/src/services/voice/engine-bridge.test.ts +384 -0
- package/src/services/voice/engine-bridge.ts +2226 -0
- package/src/services/voice/eot-classifier-ggml.d.ts +179 -0
- package/src/services/voice/eot-classifier-ggml.d.ts.map +1 -0
- package/src/services/voice/eot-classifier-ggml.ts +566 -0
- package/src/services/voice/eot-classifier.d.ts +214 -0
- package/src/services/voice/eot-classifier.d.ts.map +1 -0
- package/src/services/voice/eot-classifier.ts +533 -0
- package/src/services/voice/errors.d.ts +20 -0
- package/src/services/voice/errors.d.ts.map +1 -0
- package/src/services/voice/errors.ts +32 -0
- package/src/services/voice/expressive-tags.d.ts +158 -0
- package/src/services/voice/expressive-tags.d.ts.map +1 -0
- package/src/services/voice/expressive-tags.ts +405 -0
- package/src/services/voice/ffi-bindings.d.ts +636 -0
- package/src/services/voice/ffi-bindings.d.ts.map +1 -0
- package/src/services/voice/ffi-bindings.test.ts +671 -0
- package/src/services/voice/ffi-bindings.ts +3050 -0
- package/src/services/voice/first-line-cache.d.ts +181 -0
- package/src/services/voice/first-line-cache.d.ts.map +1 -0
- package/src/services/voice/first-line-cache.ts +725 -0
- package/src/services/voice/fused-eot-scorer.d.ts +51 -0
- package/src/services/voice/fused-eot-scorer.d.ts.map +1 -0
- package/src/services/voice/fused-eot-scorer.ts +135 -0
- package/src/services/voice/index.d.ts +91 -0
- package/src/services/voice/index.d.ts.map +1 -0
- package/src/services/voice/index.ts +481 -0
- package/src/services/voice/kokoro/__tests__/kokoro-backend.test.ts +151 -0
- package/src/services/voice/kokoro/__tests__/kokoro-engine-bridge.real.test.ts +151 -0
- package/src/services/voice/kokoro/__tests__/kokoro-engine-bridge.test.ts +60 -0
- package/src/services/voice/kokoro/__tests__/kokoro-engine-discovery.test.ts +277 -0
- package/src/services/voice/kokoro/__tests__/kokoro-ffi-runtime.test.ts +235 -0
- package/src/services/voice/kokoro/__tests__/kokoro-runtime.test.ts +95 -0
- package/src/services/voice/kokoro/__tests__/phonemizer.test.ts +53 -0
- package/src/services/voice/kokoro/__tests__/runtime-selection.test.ts +231 -0
- package/src/services/voice/kokoro/__tests__/voices.test.ts +57 -0
- package/src/services/voice/kokoro/index.ts +79 -0
- package/src/services/voice/kokoro/kokoro-backend.d.ts +72 -0
- package/src/services/voice/kokoro/kokoro-backend.d.ts.map +1 -0
- package/src/services/voice/kokoro/kokoro-backend.ts +207 -0
- package/src/services/voice/kokoro/kokoro-engine-discovery.d.ts +58 -0
- package/src/services/voice/kokoro/kokoro-engine-discovery.d.ts.map +1 -0
- package/src/services/voice/kokoro/kokoro-engine-discovery.ts +177 -0
- package/src/services/voice/kokoro/kokoro-ffi-runtime.d.ts +75 -0
- package/src/services/voice/kokoro/kokoro-ffi-runtime.d.ts.map +1 -0
- package/src/services/voice/kokoro/kokoro-ffi-runtime.ts +233 -0
- package/src/services/voice/kokoro/kokoro-runtime.d.ts +100 -0
- package/src/services/voice/kokoro/kokoro-runtime.d.ts.map +1 -0
- package/src/services/voice/kokoro/kokoro-runtime.ts +170 -0
- package/src/services/voice/kokoro/phoneme-stream.ts +123 -0
- package/src/services/voice/kokoro/phonemizer.d.ts +50 -0
- package/src/services/voice/kokoro/phonemizer.d.ts.map +1 -0
- package/src/services/voice/kokoro/phonemizer.ts +344 -0
- package/src/services/voice/kokoro/pick-runtime.d.ts +61 -0
- package/src/services/voice/kokoro/pick-runtime.d.ts.map +1 -0
- package/src/services/voice/kokoro/pick-runtime.test.ts +91 -0
- package/src/services/voice/kokoro/pick-runtime.ts +130 -0
- package/src/services/voice/kokoro/runtime-selection.d.ts +92 -0
- package/src/services/voice/kokoro/runtime-selection.d.ts.map +1 -0
- package/src/services/voice/kokoro/runtime-selection.ts +237 -0
- package/src/services/voice/kokoro/types.d.ts +82 -0
- package/src/services/voice/kokoro/types.d.ts.map +1 -0
- package/src/services/voice/kokoro/types.ts +95 -0
- package/src/services/voice/kokoro/voice-presets.d.ts +23 -0
- package/src/services/voice/kokoro/voice-presets.d.ts.map +1 -0
- package/src/services/voice/kokoro/voice-presets.ts +129 -0
- package/src/services/voice/kokoro/voices.d.ts +30 -0
- package/src/services/voice/kokoro/voices.d.ts.map +1 -0
- package/src/services/voice/kokoro/voices.ts +64 -0
- package/src/services/voice/lifecycle.d.ts +135 -0
- package/src/services/voice/lifecycle.d.ts.map +1 -0
- package/src/services/voice/lifecycle.test.ts +315 -0
- package/src/services/voice/lifecycle.ts +301 -0
- package/src/services/voice/live-diarization-session.d.ts +96 -0
- package/src/services/voice/live-diarization-session.d.ts.map +1 -0
- package/src/services/voice/live-diarization-session.ts +289 -0
- package/src/services/voice/mic-source.d.ts +136 -0
- package/src/services/voice/mic-source.d.ts.map +1 -0
- package/src/services/voice/mic-source.test.ts +210 -0
- package/src/services/voice/mic-source.ts +503 -0
- package/src/services/voice/optimistic-policy.d.ts +109 -0
- package/src/services/voice/optimistic-policy.d.ts.map +1 -0
- package/src/services/voice/optimistic-policy.test.ts +101 -0
- package/src/services/voice/optimistic-policy.ts +192 -0
- package/src/services/voice/optimistic-rollback.ts +343 -0
- package/src/services/voice/partial-stabilizer.d.ts +73 -0
- package/src/services/voice/partial-stabilizer.d.ts.map +1 -0
- package/src/services/voice/partial-stabilizer.test.ts +68 -0
- package/src/services/voice/partial-stabilizer.ts +140 -0
- package/src/services/voice/phoneme-tokenizer.d.ts +49 -0
- package/src/services/voice/phoneme-tokenizer.d.ts.map +1 -0
- package/src/services/voice/phoneme-tokenizer.ts +158 -0
- package/src/services/voice/phrase-cache.d.ts +76 -0
- package/src/services/voice/phrase-cache.d.ts.map +1 -0
- package/src/services/voice/phrase-cache.test.ts +242 -0
- package/src/services/voice/phrase-cache.ts +186 -0
- package/src/services/voice/phrase-chunker.d.ts +62 -0
- package/src/services/voice/phrase-chunker.d.ts.map +1 -0
- package/src/services/voice/phrase-chunker.test.ts +239 -0
- package/src/services/voice/phrase-chunker.ts +281 -0
- package/src/services/voice/pipeline-impls.d.ts +151 -0
- package/src/services/voice/pipeline-impls.d.ts.map +1 -0
- package/src/services/voice/pipeline-impls.l6.test.ts +110 -0
- package/src/services/voice/pipeline-impls.test.ts +292 -0
- package/src/services/voice/pipeline-impls.ts +315 -0
- package/src/services/voice/pipeline.d.ts +216 -0
- package/src/services/voice/pipeline.d.ts.map +1 -0
- package/src/services/voice/pipeline.ts +505 -0
- package/src/services/voice/prefill-client.d.ts +123 -0
- package/src/services/voice/prefill-client.d.ts.map +1 -0
- package/src/services/voice/prefill-client.ts +316 -0
- package/src/services/voice/prefix-preserving-queue.d.ts +113 -0
- package/src/services/voice/prefix-preserving-queue.d.ts.map +1 -0
- package/src/services/voice/prefix-preserving-queue.ts +162 -0
- package/src/services/voice/profile-store.d.ts +248 -0
- package/src/services/voice/profile-store.d.ts.map +1 -0
- package/src/services/voice/profile-store.ts +887 -0
- package/src/services/voice/ring-buffer.d.ts +40 -0
- package/src/services/voice/ring-buffer.d.ts.map +1 -0
- package/src/services/voice/ring-buffer.ts +105 -0
- package/src/services/voice/rollback-queue.d.ts +24 -0
- package/src/services/voice/rollback-queue.d.ts.map +1 -0
- package/src/services/voice/rollback-queue.ts +74 -0
- package/src/services/voice/samantha-preset-placeholder.d.ts +67 -0
- package/src/services/voice/samantha-preset-placeholder.d.ts.map +1 -0
- package/src/services/voice/samantha-preset-placeholder.test.ts +97 -0
- package/src/services/voice/samantha-preset-placeholder.ts +148 -0
- package/src/services/voice/samantha-preset-regenerator.d.ts +87 -0
- package/src/services/voice/samantha-preset-regenerator.d.ts.map +1 -0
- package/src/services/voice/samantha-preset-regenerator.ts +393 -0
- package/src/services/voice/scheduler.d.ts +146 -0
- package/src/services/voice/scheduler.d.ts.map +1 -0
- package/src/services/voice/scheduler.t2.test.ts +141 -0
- package/src/services/voice/scheduler.ts +927 -0
- package/src/services/voice/shared-resources.d.ts +190 -0
- package/src/services/voice/shared-resources.d.ts.map +1 -0
- package/src/services/voice/shared-resources.ts +320 -0
- package/src/services/voice/speaker/attribution-pipeline.d.ts +74 -0
- package/src/services/voice/speaker/attribution-pipeline.d.ts.map +1 -0
- package/src/services/voice/speaker/attribution-pipeline.ts +386 -0
- package/src/services/voice/speaker/diarizer-fused.d.ts +59 -0
- package/src/services/voice/speaker/diarizer-fused.d.ts.map +1 -0
- package/src/services/voice/speaker/diarizer-fused.real.test.ts +100 -0
- package/src/services/voice/speaker/diarizer-fused.ts +154 -0
- package/src/services/voice/speaker/diarizer.d.ts +75 -0
- package/src/services/voice/speaker/diarizer.d.ts.map +1 -0
- package/src/services/voice/speaker/diarizer.ts +218 -0
- package/src/services/voice/speaker/encoder-fused.d.ts +60 -0
- package/src/services/voice/speaker/encoder-fused.d.ts.map +1 -0
- package/src/services/voice/speaker/encoder-fused.real.test.ts +113 -0
- package/src/services/voice/speaker/encoder-fused.ts +138 -0
- package/src/services/voice/speaker/encoder-ggml.d.ts +33 -0
- package/src/services/voice/speaker/encoder-ggml.d.ts.map +1 -0
- package/src/services/voice/speaker/encoder-ggml.ts +79 -0
- package/src/services/voice/speaker/encoder.d.ts +37 -0
- package/src/services/voice/speaker/encoder.d.ts.map +1 -0
- package/src/services/voice/speaker/encoder.ts +105 -0
- package/src/services/voice/speaker-imprint.d.ts +83 -0
- package/src/services/voice/speaker-imprint.d.ts.map +1 -0
- package/src/services/voice/speaker-imprint.test.ts +185 -0
- package/src/services/voice/speaker-imprint.ts +312 -0
- package/src/services/voice/speaker-preset-cache.d.ts +77 -0
- package/src/services/voice/speaker-preset-cache.d.ts.map +1 -0
- package/src/services/voice/speaker-preset-cache.test.ts +154 -0
- package/src/services/voice/speaker-preset-cache.ts +195 -0
- package/src/services/voice/streaming-asr/streaming-pipeline-adapter.ts +292 -0
- package/src/services/voice/system-audio-sink.d.ts +73 -0
- package/src/services/voice/system-audio-sink.d.ts.map +1 -0
- package/src/services/voice/system-audio-sink.test.ts +29 -0
- package/src/services/voice/system-audio-sink.ts +366 -0
- package/src/services/voice/transcriber.d.ts +244 -0
- package/src/services/voice/transcriber.d.ts.map +1 -0
- package/src/services/voice/transcriber.test.ts +392 -0
- package/src/services/voice/transcriber.ts +704 -0
- package/src/services/voice/turn-controller.d.ts +183 -0
- package/src/services/voice/turn-controller.d.ts.map +1 -0
- package/src/services/voice/turn-controller.test.ts +575 -0
- package/src/services/voice/turn-controller.ts +596 -0
- package/src/services/voice/types.d.ts +643 -0
- package/src/services/voice/types.d.ts.map +1 -0
- package/src/services/voice/types.ts +699 -0
- package/src/services/voice/vad.d.ts +282 -0
- package/src/services/voice/vad.d.ts.map +1 -0
- package/src/services/voice/vad.test.ts +480 -0
- package/src/services/voice/vad.ts +827 -0
- package/src/services/voice/vad.v1-v4.test.ts +222 -0
- package/src/services/voice/voice-budget.d.ts +241 -0
- package/src/services/voice/voice-budget.d.ts.map +1 -0
- package/src/services/voice/voice-budget.test.ts +420 -0
- package/src/services/voice/voice-budget.ts +656 -0
- package/src/services/voice/voice-duet.test.ts +375 -0
- package/src/services/voice/voice-emotion-classifier.d.ts +95 -0
- package/src/services/voice/voice-emotion-classifier.d.ts.map +1 -0
- package/src/services/voice/voice-emotion-classifier.test.ts +210 -0
- package/src/services/voice/voice-emotion-classifier.ts +273 -0
- package/src/services/voice/voice-preset-format.d.ts +158 -0
- package/src/services/voice/voice-preset-format.d.ts.map +1 -0
- package/src/services/voice/voice-preset-format.ts +700 -0
- package/src/services/voice/voice-preset-generator.test.ts +89 -0
- package/src/services/voice/voice-profile-artifact.d.ts +116 -0
- package/src/services/voice/voice-profile-artifact.d.ts.map +1 -0
- package/src/services/voice/voice-profile-artifact.test.ts +138 -0
- package/src/services/voice/voice-profile-artifact.ts +518 -0
- package/src/services/voice/voice-profile-routes.d.ts +83 -0
- package/src/services/voice/voice-profile-routes.d.ts.map +1 -0
- package/src/services/voice/voice-profile-routes.test.ts +429 -0
- package/src/services/voice/voice-profile-routes.ts +425 -0
- package/src/services/voice/voice-scenario.ts +154 -0
- package/src/services/voice/voice-settings.d.ts +82 -0
- package/src/services/voice/voice-settings.d.ts.map +1 -0
- package/src/services/voice/voice-settings.ts +172 -0
- package/src/services/voice/voice-state-machine.d.ts +364 -0
- package/src/services/voice/voice-state-machine.d.ts.map +1 -0
- package/src/services/voice/voice-state-machine.ts +727 -0
- package/src/services/voice/voice-workbench-report.test.ts +168 -0
- package/src/services/voice/voice-workbench-report.ts +326 -0
- package/src/services/voice/voice-workbench.test.ts +158 -0
- package/src/services/voice/voice.test.ts +1070 -0
- package/src/services/voice/wake-word-ggml.d.ts +101 -0
- package/src/services/voice/wake-word-ggml.d.ts.map +1 -0
- package/src/services/voice/wake-word-ggml.ts +320 -0
- package/src/services/voice/wake-word.d.ts +255 -0
- package/src/services/voice/wake-word.d.ts.map +1 -0
- package/src/services/voice/wake-word.test.ts +298 -0
- package/src/services/voice/wake-word.ts +554 -0
- package/src/services/voice/wrap-with-first-line-cache.d.ts +70 -0
- package/src/services/voice/wrap-with-first-line-cache.d.ts.map +1 -0
- package/src/services/voice/wrap-with-first-line-cache.ts +267 -0
- package/src/services/voice-model-updater.d.ts +240 -0
- package/src/services/voice-model-updater.d.ts.map +1 -0
- package/src/services/voice-model-updater.ts +724 -0
- package/src/services/voice-prewarm.d.ts +3 -0
- package/src/services/voice-prewarm.d.ts.map +1 -0
- package/src/services/voice-prewarm.ts +51 -0
- package/dist/index.d.ts +0 -37
- package/dist/index.js +0 -1098
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fused FFI end-of-turn scorer (ABI v11).
|
|
3
|
+
*
|
|
4
|
+
* The fused replacement for the retired node-llama-cpp `controlledEvaluate()`
|
|
5
|
+
* path the EOT classifiers depended on. Computes P(`<|im_end|>` next | partial
|
|
6
|
+
* transcript) through the single `libelizainference` handle: tokenize the
|
|
7
|
+
* Qwen-formatted partial transcript, then one causal forward pass
|
|
8
|
+
* (`eliza_inference_llm_eot_score`) reads the next-token probability of the
|
|
9
|
+
* end-of-turn marker. No separate model weights, no sampling loop, and no KV
|
|
10
|
+
* growth on the chat session — the dedicated native scoring context clears its
|
|
11
|
+
* KV per call so scores are independent.
|
|
12
|
+
*/
|
|
13
|
+
import type { ElizaInferenceContextHandle, ElizaInferenceFfi } from "./ffi-bindings";
|
|
14
|
+
export interface FfiEotScorerOptions {
|
|
15
|
+
/** The loaded fused inference binding (must expose the v11 EOT symbols). */
|
|
16
|
+
ffi: ElizaInferenceFfi;
|
|
17
|
+
/** Resolves the live inference context handle (the loaded text bundle). */
|
|
18
|
+
getContext: () => ElizaInferenceContextHandle;
|
|
19
|
+
/** Max prompt tokens kept (tail-truncated). LiveKit's recipe uses 128. */
|
|
20
|
+
maxHistoryTokens?: number;
|
|
21
|
+
/** Model label for telemetry. */
|
|
22
|
+
modelLabel?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface FfiEotScoreResult {
|
|
25
|
+
/** Probability of `<|im_end|>` as the next token, ∈ [0, 1]. */
|
|
26
|
+
probability: number;
|
|
27
|
+
/** Wall-clock model latency for this scoring call. */
|
|
28
|
+
latencyMs: number;
|
|
29
|
+
/** Number of prompt tokens evaluated. */
|
|
30
|
+
promptTokens: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Stateful EOT scorer bound to a loaded fused text model. The `<|im_end|>`
|
|
34
|
+
* token id is resolved once and cached. Safe to keep across many voice turns.
|
|
35
|
+
*/
|
|
36
|
+
export declare class FfiEotScorer {
|
|
37
|
+
private readonly ffi;
|
|
38
|
+
private readonly getContext;
|
|
39
|
+
private readonly maxHistoryTokens;
|
|
40
|
+
readonly modelLabel: string;
|
|
41
|
+
private imEndTokenId;
|
|
42
|
+
constructor(options: FfiEotScorerOptions);
|
|
43
|
+
/**
|
|
44
|
+
* True only when the fused build wires the v11 EOT scorer AND the tokenizer
|
|
45
|
+
* it depends on. A v10 (or older) library returns false.
|
|
46
|
+
*/
|
|
47
|
+
static isSupported(ffi: ElizaInferenceFfi | null | undefined): boolean;
|
|
48
|
+
private resolveImEnd;
|
|
49
|
+
score(partialTranscript: string): Promise<FfiEotScoreResult>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=fused-eot-scorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fused-eot-scorer.d.ts","sourceRoot":"","sources":["fused-eot-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EACX,2BAA2B,EAC3B,iBAAiB,EACjB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,mBAAmB;IACnC,4EAA4E;IAC5E,GAAG,EAAE,iBAAiB,CAAC;IACvB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,2BAA2B,CAAC;IAC9C,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IACjC,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAoB;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,YAAY,CAAuB;gBAE/B,OAAO,EAAE,mBAAmB;IAOxC;;;OAGG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;IAUtE,OAAO,CAAC,YAAY;IAsBd,KAAK,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAuClE"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fused FFI end-of-turn scorer (ABI v11).
|
|
3
|
+
*
|
|
4
|
+
* The fused replacement for the retired node-llama-cpp `controlledEvaluate()`
|
|
5
|
+
* path the EOT classifiers depended on. Computes P(`<|im_end|>` next | partial
|
|
6
|
+
* transcript) through the single `libelizainference` handle: tokenize the
|
|
7
|
+
* Qwen-formatted partial transcript, then one causal forward pass
|
|
8
|
+
* (`eliza_inference_llm_eot_score`) reads the next-token probability of the
|
|
9
|
+
* end-of-turn marker. No separate model weights, no sampling loop, and no KV
|
|
10
|
+
* growth on the chat session — the dedicated native scoring context clears its
|
|
11
|
+
* KV per call so scores are independent.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { formatEotPrompt } from "./eliza1-eot-scorer";
|
|
15
|
+
import type {
|
|
16
|
+
ElizaInferenceContextHandle,
|
|
17
|
+
ElizaInferenceFfi,
|
|
18
|
+
} from "./ffi-bindings";
|
|
19
|
+
|
|
20
|
+
const IM_END_TOKEN = "<|im_end|>";
|
|
21
|
+
|
|
22
|
+
export interface FfiEotScorerOptions {
|
|
23
|
+
/** The loaded fused inference binding (must expose the v11 EOT symbols). */
|
|
24
|
+
ffi: ElizaInferenceFfi;
|
|
25
|
+
/** Resolves the live inference context handle (the loaded text bundle). */
|
|
26
|
+
getContext: () => ElizaInferenceContextHandle;
|
|
27
|
+
/** Max prompt tokens kept (tail-truncated). LiveKit's recipe uses 128. */
|
|
28
|
+
maxHistoryTokens?: number;
|
|
29
|
+
/** Model label for telemetry. */
|
|
30
|
+
modelLabel?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface FfiEotScoreResult {
|
|
34
|
+
/** Probability of `<|im_end|>` as the next token, ∈ [0, 1]. */
|
|
35
|
+
probability: number;
|
|
36
|
+
/** Wall-clock model latency for this scoring call. */
|
|
37
|
+
latencyMs: number;
|
|
38
|
+
/** Number of prompt tokens evaluated. */
|
|
39
|
+
promptTokens: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Stateful EOT scorer bound to a loaded fused text model. The `<|im_end|>`
|
|
44
|
+
* token id is resolved once and cached. Safe to keep across many voice turns.
|
|
45
|
+
*/
|
|
46
|
+
export class FfiEotScorer {
|
|
47
|
+
private readonly ffi: ElizaInferenceFfi;
|
|
48
|
+
private readonly getContext: () => ElizaInferenceContextHandle;
|
|
49
|
+
private readonly maxHistoryTokens: number;
|
|
50
|
+
readonly modelLabel: string;
|
|
51
|
+
private imEndTokenId: number | null = null;
|
|
52
|
+
|
|
53
|
+
constructor(options: FfiEotScorerOptions) {
|
|
54
|
+
this.ffi = options.ffi;
|
|
55
|
+
this.getContext = options.getContext;
|
|
56
|
+
this.maxHistoryTokens = options.maxHistoryTokens ?? 128;
|
|
57
|
+
this.modelLabel = options.modelLabel ?? "eliza-1-fused-eot";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* True only when the fused build wires the v11 EOT scorer AND the tokenizer
|
|
62
|
+
* it depends on. A v10 (or older) library returns false.
|
|
63
|
+
*/
|
|
64
|
+
static isSupported(ffi: ElizaInferenceFfi | null | undefined): boolean {
|
|
65
|
+
return (
|
|
66
|
+
!!ffi &&
|
|
67
|
+
typeof ffi.eotSupported === "function" &&
|
|
68
|
+
ffi.eotSupported() &&
|
|
69
|
+
typeof ffi.eotScore === "function" &&
|
|
70
|
+
typeof ffi.tokenize === "function"
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private resolveImEnd(ctx: ElizaInferenceContextHandle): number {
|
|
75
|
+
if (this.imEndTokenId !== null) return this.imEndTokenId;
|
|
76
|
+
const tokenize = this.ffi.tokenize;
|
|
77
|
+
if (!tokenize) {
|
|
78
|
+
throw new Error("[voice] FfiEotScorer: fused tokenizer is unavailable.");
|
|
79
|
+
}
|
|
80
|
+
const ids = tokenize({
|
|
81
|
+
ctx,
|
|
82
|
+
text: IM_END_TOKEN,
|
|
83
|
+
addSpecial: false,
|
|
84
|
+
parseSpecial: true,
|
|
85
|
+
});
|
|
86
|
+
const first = ids[0];
|
|
87
|
+
if (ids.length !== 1 || first === undefined || !Number.isInteger(first)) {
|
|
88
|
+
throw new Error(
|
|
89
|
+
`[voice] FfiEotScorer: tokenizer did not resolve <|im_end|> to a single special token (got ${JSON.stringify([...ids])}). The text bundle must be Qwen-template compatible.`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
this.imEndTokenId = first;
|
|
93
|
+
return first;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async score(partialTranscript: string): Promise<FfiEotScoreResult> {
|
|
97
|
+
const start = performance.now();
|
|
98
|
+
const ctx = this.getContext();
|
|
99
|
+
const tokenize = this.ffi.tokenize;
|
|
100
|
+
const eotScore = this.ffi.eotScore;
|
|
101
|
+
if (!tokenize || !eotScore) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
"[voice] FfiEotScorer: fused EOT symbols are unavailable.",
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
const imEndId = this.resolveImEnd(ctx);
|
|
107
|
+
const formatted = formatEotPrompt(partialTranscript);
|
|
108
|
+
const all = tokenize({
|
|
109
|
+
ctx,
|
|
110
|
+
text: formatted,
|
|
111
|
+
addSpecial: false,
|
|
112
|
+
parseSpecial: true,
|
|
113
|
+
});
|
|
114
|
+
const tokens =
|
|
115
|
+
all.length > this.maxHistoryTokens
|
|
116
|
+
? all.slice(all.length - this.maxHistoryTokens)
|
|
117
|
+
: all;
|
|
118
|
+
if (tokens.length === 0) {
|
|
119
|
+
return {
|
|
120
|
+
probability: 0.5,
|
|
121
|
+
latencyMs: performance.now() - start,
|
|
122
|
+
promptTokens: 0,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const { targetProb } = eotScore({ ctx, tokens, targetTokenId: imEndId });
|
|
126
|
+
const probability = Number.isFinite(targetProb)
|
|
127
|
+
? Math.max(0, Math.min(1, targetProb))
|
|
128
|
+
: 0.5;
|
|
129
|
+
return {
|
|
130
|
+
probability,
|
|
131
|
+
latencyMs: performance.now() - start,
|
|
132
|
+
promptTokens: tokens.length,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export { type AttributedTurn, type AttributedTurnListener, type AttributionPipelineLike, AUDIO_FRAME_PIPELINE_SAMPLE_RATE, AudioFrameConsumer, type AudioFrameConsumerConfig, type AudioFrameConsumerDeps, AudioFrameDecodeError, type AudioFrameEvent, decodeAudioFramePcm, type RuntimeEventSink, type VadSegmenter, } from "./audio-frame-consumer";
|
|
2
|
+
export { BargeInController, type BargeInControllerConfig, type BargeInListener, type CancelSignal, } from "./barge-in";
|
|
3
|
+
export { type CoordinatorRuntime, VoiceCancellationCoordinator, type VoiceCancellationCoordinatorOptions, } from "./cancellation-coordinator";
|
|
4
|
+
export { type CheckpointHandle, CheckpointHandleInvalidError, CheckpointManager, type CheckpointManagerLike, type CheckpointManagerOptions, MockCheckpointManager, type MockCheckpointSnapshot, type MockSnapshotSource, } from "./checkpoint-manager";
|
|
5
|
+
export { type BuildDeterministicFn, type BuildMessageDependentFn, type ContextPartial, EagerContextBuilder, type EagerContextBuilderOptions, type FullContext, mergeContext, } from "./eager-context-builder";
|
|
6
|
+
export type { LlamaContextLike as Eliza1EotLlamaContext, LlamaContextSequenceLike as Eliza1EotLlamaSequence, LlamaModelLike as Eliza1EotLlamaModel, } from "./eliza1-eot-scorer";
|
|
7
|
+
export { Eliza1EotScorer, formatEotPrompt as formatEliza1EotPrompt, } from "./eliza1-eot-scorer";
|
|
8
|
+
export { buildLocalEmbeddingRoute, EMBEDDING_DIR_REL_PATH, EMBEDDING_FULL_DIM, EMBEDDING_MATRYOSHKA_DIMS, isValidEmbeddingDim, type LocalEmbeddingRoute, type LocalEmbeddingSource, POOLED_TEXT_EMBEDDING_TIERS, resolveLocalEmbeddingSource, truncateMatryoshka, } from "./embedding";
|
|
9
|
+
export { attributeVoiceEmotion, type VoiceEmotionAsrFeatures, type VoiceEmotionAttribution, type VoiceEmotionAttributionInput, type VoiceEmotionAttributionMethod, type VoiceEmotionAudioFeatures, type VoiceEmotionEvidence, } from "./emotion-attribution";
|
|
10
|
+
export { decodeMonoPcm16Wav, defaultLifecycleLoaders, EngineVoiceBridge, type EngineVoiceBridgeOptions, encodeMonoPcm16Wav, FfiOmniVoiceBackend, StubOmniVoiceBackend, type VoiceTurnEvents, } from "./engine-bridge";
|
|
11
|
+
export { Eliza1EotClassifier, type Eliza1EotScoreResult, type Eliza1EotScorerOptions, EOT_COMMIT_SILENCE_MS, EOT_COMMIT_THRESHOLD, EOT_HANGOVER_EXTENSION_MS, EOT_MID_CLAUSE_THRESHOLD, EOT_TENTATIVE_SILENCE_MS, EOT_TENTATIVE_THRESHOLD, type EotClassifier, HeuristicEotClassifier, LIVEKIT_TURN_DETECTOR_EN_REVISION, LIVEKIT_TURN_DETECTOR_INTL_REVISION, RemoteEotClassifier, type RemoteEotClassifierOptions, turnDetectorRevisionForTier, turnSignalFromProbability, type VoiceNextSpeaker, type VoiceTurnSignal, } from "./eot-classifier";
|
|
12
|
+
export { applyQwenUserTemplate, createBundledLiveKitGgmlTurnDetector, DEFAULT_LIVEKIT_TURN_DETECTOR_GGML_DIR, DEFAULT_LIVEKIT_TURN_DETECTOR_GGUF_EN, DEFAULT_LIVEKIT_TURN_DETECTOR_GGUF_INTL, EotGgmlUnavailableError, LIVEKIT_IM_END_TOKEN, LiveKitGgmlTurnDetector, type LiveKitGgmlTurnDetectorOptions, turnDetectorGgufForTier, } from "./eot-classifier-ggml";
|
|
13
|
+
export { VoiceStartupError } from "./errors";
|
|
14
|
+
export * from "./ffi-bindings";
|
|
15
|
+
export { _resetSharedFirstLineCacheForTesting, _resetVoiceRevisionMemoForTesting, computeLocalVoiceRevision, FIRST_SENTENCE_MAX_WORDS, FIRST_SENTENCE_SNIP_VERSION, FirstLineCache, type FirstLineCacheEntry, type FirstLineCacheKey, type FirstLineCacheOptions, type FirstLineCacheStats, type FirstSentenceSnipResult, fingerprintVoiceSettings, firstLineCacheBypassFromEnv, firstSentenceSnip, getSharedFirstLineCache, hashCacheKey, type PutInput, wordCount, } from "./first-line-cache";
|
|
16
|
+
export { type ArmedResources, type TextResources, VoiceLifecycle, VoiceLifecycleError, type VoiceLifecycleEvents, type VoiceLifecycleLoaders, type VoiceLifecycleState, } from "./lifecycle";
|
|
17
|
+
export { DesktopMicSource, type DesktopMicSourceOptions, PushMicSource, pipeMicToRingBuffer, resolveDesktopRecorder, } from "./mic-source";
|
|
18
|
+
export { DEFAULT_OPTIMISTIC_EOT_THRESHOLD, OptimisticGenerationPolicy, type OptimisticPolicyOptions, type PowerSourceState, type ResolveOptimisticPolicyArgs, resolveOptimisticPolicyEnabled, resolvePowerSourceState, } from "./optimistic-policy";
|
|
19
|
+
export { createDefaultPhonemeTokenizer, type Phoneme, type PhonemeTokenizer, RuleBasedEnglishPhonemeTokenizer, } from "./phoneme-tokenizer";
|
|
20
|
+
export { type CachedPhraseAudio, canonicalizePhraseText, DEFAULT_PHRASE_CACHE_SEED, FIRST_AUDIO_FILLERS, PhraseCache, } from "./phrase-cache";
|
|
21
|
+
export { chunkTokens, PhraseChunker } from "./phrase-chunker";
|
|
22
|
+
export { type DraftProposer, splitTranscriptToTokens, type TargetVerifier, VoicePipeline, type VoicePipelineConfig, type VoicePipelineDeps, type VoicePipelineEvents, } from "./pipeline";
|
|
23
|
+
export { MissingAsrTranscriber, MtpDraftProposer, MtpTargetVerifier, type MtpTextRunner, mtpTextRunner, } from "./pipeline-impls";
|
|
24
|
+
export { type PrefillOptimisticArgs, type PrefillOptimisticOptions, type PrefillOptimisticResult, prefillOptimistic, } from "./prefill-client";
|
|
25
|
+
export { PrefixPreservingQueue, type RollbackResult, type TaggedAudioChunk, } from "./prefix-preserving-queue";
|
|
26
|
+
export { isOutlier, VOICE_PROFILE_RECORD_SCHEMA_VERSION, type VoiceImprintMatchHandle, type VoiceProfileAudioRef, type VoiceProfileConsentState, type VoiceProfileObservation, type VoiceProfileRecord, VoiceProfileStore, type VoiceProfileStoreOptions, welfordUpdate, welfordVariance, } from "./profile-store";
|
|
27
|
+
export { InMemoryAudioSink, PcmRingBuffer } from "./ring-buffer";
|
|
28
|
+
export { type RollbackEvent, RollbackQueue } from "./rollback-queue";
|
|
29
|
+
export { type SchedulerDeps, type SchedulerEvents, VoiceScheduler, } from "./scheduler";
|
|
30
|
+
export { createMtpDraftHandle, type KernelSet, type MmapRegionHandle, type MtpDraftHandle, type RefCountedResource, type SchedulerSlot, SharedResourceRegistry, type SharedTokenizer, } from "./shared-resources";
|
|
31
|
+
export { type VoiceAttributionOutput, VoiceAttributionPipeline, type VoiceAttributionPipelineDeps, type VoiceAttributionRequest, } from "./speaker/attribution-pipeline";
|
|
32
|
+
export { classifyFramesToSegments, type Diarizer, type DiarizerOutput, DiarizerUnavailableError, type LocalSpeakerSegment, PYANNOTE_CLASS_COUNT, PYANNOTE_CLASS_TO_SPEAKERS, PYANNOTE_FRAME_STRIDE_MS, PYANNOTE_FRAMES_PER_WINDOW, PYANNOTE_SAMPLE_RATE, PYANNOTE_SEGMENTATION_3_FP32_MODEL_ID, PYANNOTE_SEGMENTATION_3_INT8_MODEL_ID, PYANNOTE_WINDOW_SECONDS, type PyannoteDiarizerModelId, } from "./speaker/diarizer";
|
|
33
|
+
export { FusedDiarizer, type FusedDiarizerOptions, } from "./speaker/diarizer-fused";
|
|
34
|
+
export { averageEmbeddings, type SpeakerEncoder, SpeakerEncoderUnavailableError, WESPEAKER_EMBEDDING_DIM, WESPEAKER_MIN_SAMPLES, WESPEAKER_RESNET34_LM_FP32_MODEL_ID, WESPEAKER_RESNET34_LM_INT8_MODEL_ID, WESPEAKER_SAMPLE_RATE, type WespeakerModelId, } from "./speaker/encoder";
|
|
35
|
+
export { FusedSpeakerEncoder, type FusedSpeakerEncoderOptions, } from "./speaker/encoder-fused";
|
|
36
|
+
export { SPEAKER_GGML_EMBEDDING_DIM, SPEAKER_GGML_MIN_SAMPLES, SPEAKER_GGML_SAMPLE_RATE, SpeakerEncoderGgmlUnavailableError, voiceSpeakerDistance, } from "./speaker/encoder-ggml";
|
|
37
|
+
export { type AttributedVoiceObservation, attributeVoiceImprintObservations, cosineSimilarity, DEFAULT_VOICE_IMPRINT_MATCH_THRESHOLD, matchVoiceImprint, normalizeVoiceEmbedding, type SpeakerAttributionResult, updateVoiceImprintCentroid, type VoiceImprintCentroidUpdate, type VoiceImprintMatch, type VoiceImprintObservationInput, type VoiceImprintProfile, voiceSpeakerFromImprintMatch, } from "./speaker-imprint";
|
|
38
|
+
export { DEFAULT_VOICE_ID, DEFAULT_VOICE_PRESET_REL_PATH, type LoadedPresetBundle, type PresetBundlePaths, SpeakerPresetCache, type SpeakerPresetCacheOptions, voicePresetPath, } from "./speaker-preset-cache";
|
|
39
|
+
export { SystemAudioSink, type SystemAudioSinkOptions, WavFileAudioSink, type WavFileAudioSinkOptions, } from "./system-audio-sink";
|
|
40
|
+
export { ASR_SAMPLE_RATE, AsrUnavailableError, BaseStreamingTranscriber, type CreateStreamingTranscriberOptions, createStreamingTranscriber, FfiBatchTranscriber, type FfiBatchTranscriberOptions, FfiStreamingTranscriber, ffiSupportsStreamingAsr, resampleLinear, } from "./transcriber";
|
|
41
|
+
export { type VoiceGenerateRequest, VoiceTurnController, type VoiceTurnControllerConfig, type VoiceTurnControllerDeps, type VoiceTurnControllerEvents, type VoiceTurnOutcome, } from "./turn-controller";
|
|
42
|
+
export * from "./types";
|
|
43
|
+
export { createSileroVadDetector, createVadDetector, GgmlSileroVad, NativeSileroVad, type QwenToolkitVadAdapter, type ResolvedVadProvider, RmsEnergyGate, type RmsEnergyGateConfig, resolveSileroVadPath, resolveVadProvider, rms, VadDetector, type VadDetectorConfig, type VadLike, type VadProviderId, type VadProviderPreference, VadUnavailableError, vadProviderOrder, } from "./vad";
|
|
44
|
+
export { type AllocationPriority, assessVoiceBundleFits, BudgetExhaustedError, type BudgetReservation, createVoiceBudget, createVoiceBudgetForTest, DEFAULT_VOICE_BUNDLE_RESERVE_MB, pickVoiceTierSlot, priorityClassForRole, type ReservationSnapshot, VOICE_ENSEMBLE_BUDGETS, type VoiceBudget, type VoiceBundleFitDecision, type VoiceEnsembleBudget, type VoiceTierSlot, voiceEnsemblePeakMb, voiceEnsembleSteadyStateMb, } from "./voice-budget";
|
|
45
|
+
export { readVoicePresetFile, VOICE_PRESET_MAGIC, type VoicePresetFile, VoicePresetFormatError, type VoicePresetSeedPhrase, writeVoicePresetFile, } from "./voice-preset-format";
|
|
46
|
+
export { analyzeVoiceProfileWav, canonicalVoiceProfileJson, createVoiceProfileArtifact, VOICE_PROFILE_ARTIFACT_SCHEMA_VERSION, VOICE_PROFILE_FEATURE_EMBEDDING_MODEL, type VoiceProfileArtifact, type VoiceProfileArtifactSample, type VoiceProfileArtifactStatus, type VoiceProfileArtifactVerification, type VoiceProfileAudioFeatures, type VoiceProfileConsent, type VoiceProfileReferenceMetadata, type VoiceProfileSampleInput, verifyVoiceProfileArtifact, } from "./voice-profile-artifact";
|
|
47
|
+
export { DEFAULT_VOICE_SETTINGS, effectiveBackendMode, qualityPresetQuantizationRanking, resolveVoiceSettings, type VoiceBackendMode, type VoiceModelQualityPreset, type VoiceSettings, } from "./voice-settings";
|
|
48
|
+
export { type DrafterAbortReason, type DrafterHandle, type StartDrafterFn, type VoiceState, type VoiceStateEvent, VoiceStateMachine, type VoiceStateMachineEvents, type VoiceStateMachineOptions, } from "./voice-state-machine";
|
|
49
|
+
export { GgmlWakeWordModel, isPlaceholderWakeWordHead, loadBundledWakeWordModel, OPENWAKEWORD_DEFAULT_HEAD, OPENWAKEWORD_DIR_REL_PATH, OPENWAKEWORD_GGUF_REL_PATH, OPENWAKEWORD_PLACEHOLDER_HEADS, OpenWakeWordDetector, resolveWakeWordModel, type WakeWordConfig, type WakeWordModel, type WakeWordModelPaths, WakeWordUnavailableError, } from "./wake-word";
|
|
50
|
+
export { type TtsBytes, type TtsHandler, type TtsHandlerInput, type TtsHandlerOutput, type TtsResolvedContext, type WrapOptions, wrapWithFirstLineCache, } from "./wrap-with-first-line-cache";
|
|
51
|
+
/**
|
|
52
|
+
* Voice on/off invariants (binding for every consumer of this module):
|
|
53
|
+
*
|
|
54
|
+
* 1. Voice is OFF by default — text + drafter only. Before
|
|
55
|
+
* `EngineVoiceBridge.start()` there are no voice resources in RAM.
|
|
56
|
+
* After `start()` but before `VoiceLifecycle.arm()`, only the tiny
|
|
57
|
+
* default speaker preset, phrase seed metadata, and scheduler
|
|
58
|
+
* scaffolding are live. TTS/ASR weight regions are NOT mapped or
|
|
59
|
+
* re-paged until `VoiceLifecycle.arm()` calls the fused ABI's
|
|
60
|
+
* `mmap_acquire`.
|
|
61
|
+
*
|
|
62
|
+
* 2. Shared resources between text and voice (one instance each per
|
|
63
|
+
* engine, refcounted by `SharedResourceRegistry`):
|
|
64
|
+
* - tokenizer (Eliza-1/OmniVoice share a vocabulary)
|
|
65
|
+
* - mmap regions for weights (deduplicated by absolute path)
|
|
66
|
+
* - the fused kernel set (TurboQuant/QJL/Polar live in the
|
|
67
|
+
* same shipped llama.cpp library after the fusion build)
|
|
68
|
+
* - the scheduler queue (one queue, prioritised across surfaces)
|
|
69
|
+
* - the MTP drafter (always wired — see AGENTS.md §3 #4)
|
|
70
|
+
*
|
|
71
|
+
* Text and voice keep SEPARATE KV caches (different layer counts,
|
|
72
|
+
* different head configs, different quantizations — AGENTS.md §4
|
|
73
|
+
* "shared KV cache scheduling, not shared KV memory").
|
|
74
|
+
*
|
|
75
|
+
* 3. `arm()` lazily loads TTS + ASR via mmap; `disarm()` issues a real
|
|
76
|
+
* page-eviction call (`madvise(MADV_DONTNEED)` on Linux/Android,
|
|
77
|
+
* `madvise(MADV_FREE_REUSABLE)` on Apple, `VirtualUnlock` +
|
|
78
|
+
* `OfferVirtualMemory` on Windows). The speaker preset and phrase
|
|
79
|
+
* cache stay in a small LRU after disarm — they're KB-scale.
|
|
80
|
+
*
|
|
81
|
+
* 4. Hardware-resource exhaustion (RAM pressure, OS page eviction
|
|
82
|
+
* refusal, mmap fail, kernel missing) MUST surface as a
|
|
83
|
+
* `VoiceLifecycleError` with a structured `code`. There is NO
|
|
84
|
+
* silent fallback to text-only and NO automatic downgrade to a
|
|
85
|
+
* smaller voice model — see AGENTS.md §3.
|
|
86
|
+
*
|
|
87
|
+
* 5. Illegal lifecycle transitions throw `VoiceLifecycleError` with
|
|
88
|
+
* code `"illegal-transition"`. The state is a discriminated
|
|
89
|
+
* union, never a string.
|
|
90
|
+
*/
|
|
91
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,gCAAgC,EAChC,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,qBAAqB,EACrB,KAAK,eAAe,EACpB,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,YAAY,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,KAAK,kBAAkB,EACvB,4BAA4B,EAC5B,KAAK,mCAAmC,GACxC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,KAAK,gBAAgB,EACrB,4BAA4B,EAC5B,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,qBAAqB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,mBAAmB,EACnB,KAAK,0BAA0B,EAC/B,KAAK,WAAW,EAChB,YAAY,GACZ,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,gBAAgB,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