@qvac/inference 0.22.0 → 0.24.0
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/NOTICE +111 -60
- package/README.md +4 -2
- package/dist/api/assess-model-fit.d.ts +14 -14
- package/dist/api/assess-model-fit.js +14 -14
- package/dist/api/audio-gen.d.ts +2 -2
- package/dist/api/audio-gen.js +136 -45
- package/dist/api/batch-completion.js +2 -1
- package/dist/api/calc-tokens.d.ts +30 -0
- package/dist/api/calc-tokens.js +41 -0
- package/dist/api/classify.d.ts +5 -2
- package/dist/api/classify.js +5 -2
- package/dist/api/completion-stream.d.ts +2 -1
- package/dist/api/completion-stream.js +4 -1
- package/dist/api/decide.js +1 -1
- package/dist/api/delete-cache.d.ts +7 -1
- package/dist/api/delete-cache.js +11 -1
- package/dist/api/diffusion.d.ts +32 -2
- package/dist/api/diffusion.js +32 -2
- package/dist/api/download-asset.js +1 -1
- package/dist/api/embed.d.ts +82 -29
- package/dist/api/embed.js +64 -18
- package/dist/api/finetune.js +1 -1
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +40 -38
- package/dist/api/index.js +39 -37
- package/dist/api/load-model.js +2 -2
- package/dist/api/logging-stream-registry.js +11 -7
- package/dist/api/logging-stream.d.ts +11 -1
- package/dist/api/logging-stream.js +11 -2
- package/dist/api/rag.d.ts +1 -1
- package/dist/api/rag.js +1 -1
- package/dist/api/registry.d.ts +18 -7
- package/dist/api/registry.js +37 -13
- package/dist/api/rerank.d.ts +17 -0
- package/dist/api/rerank.js +36 -0
- package/dist/api/subscribe-logs.js +5 -3
- package/dist/api/text-to-speech.d.ts +14 -5
- package/dist/api/text-to-speech.js +83 -29
- package/dist/api/transcribe.d.ts +6 -2
- package/dist/api/transcribe.js +7 -1
- package/dist/api/unload-model.js +1 -1
- package/dist/api/vector-index.d.ts +25 -3
- package/dist/api/vector-index.js +17 -2
- package/dist/api/video-request.d.ts +15 -15
- package/dist/api/video.js +1 -1
- package/dist/api/vla.js +1 -1
- package/dist/api/world-result.js +1 -1
- package/dist/api/world.d.ts +1 -1
- package/dist/api/world.js +1 -1
- package/dist/config/resolve-config.d.ts +1 -1
- package/dist/config/resolve-config.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/dispatch.d.ts +11 -4
- package/dist/dispatch.js +80 -18
- package/dist/engine.d.ts +1 -1
- package/dist/errors/index.d.ts +76 -0
- package/dist/errors/index.js +141 -1
- package/dist/handlers/assess-model-fit.d.ts +3 -21
- package/dist/handlers/assess-model-fit.js +4 -303
- package/dist/handlers/cancelHandler.d.ts +10 -9
- package/dist/handlers/cancelHandler.js +18 -14
- package/dist/handlers/completion-orchestrate.d.ts +14 -2
- package/dist/handlers/completion-orchestrate.js +166 -24
- package/dist/handlers/delete-cache.d.ts +2 -1
- package/dist/handlers/delete-cache.js +6 -1
- package/dist/handlers/download-asset.js +13 -6
- package/dist/handlers/finetune.js +1 -1
- package/dist/handlers/get-loaded-model-info.js +3 -3
- package/dist/handlers/get-model-info.js +72 -3
- package/dist/handlers/load-model/coreml-sidecars.d.ts +15 -11
- package/dist/handlers/load-model/coreml-sidecars.js +51 -91
- package/dist/handlers/load-model/download-lock.d.ts +20 -0
- package/dist/handlers/load-model/download-lock.js +213 -0
- package/dist/handlers/load-model/download-manager.d.ts +11 -3
- package/dist/handlers/load-model/download-manager.js +62 -11
- package/dist/handlers/load-model/download-stats.d.ts +2 -2
- package/dist/handlers/load-model/download-stats.js +3 -3
- package/dist/handlers/load-model/handler.js +97 -41
- package/dist/handlers/load-model/http-verify.d.ts +1 -1
- package/dist/handlers/load-model/http.d.ts +1 -1
- package/dist/handlers/load-model/http.js +330 -208
- package/dist/handlers/load-model/hyperdrive.d.ts +16 -1
- package/dist/handlers/load-model/hyperdrive.js +125 -52
- package/dist/handlers/load-model/index.d.ts +2 -2
- package/dist/handlers/load-model/index.js +2 -2
- package/dist/handlers/load-model/registry-client-options.d.ts +2 -0
- package/dist/handlers/load-model/registry-client-options.js +4 -2
- package/dist/handlers/load-model/registry-companion-set.d.ts +6 -1
- package/dist/handlers/load-model/registry-companion-set.js +20 -2
- package/dist/handlers/load-model/registry-delete.d.ts +5 -0
- package/dist/handlers/load-model/registry-delete.js +269 -0
- package/dist/handlers/load-model/registry-download-utils.d.ts +7 -5
- package/dist/handlers/load-model/registry-download-utils.js +95 -24
- package/dist/handlers/load-model/registry.d.ts +22 -2
- package/dist/handlers/load-model/registry.js +312 -179
- package/dist/handlers/load-model/resolve-session.d.ts +1 -1
- package/dist/handlers/load-model/resolve-session.js +11 -3
- package/dist/handlers/load-model/resolve.d.ts +1 -1
- package/dist/handlers/load-model/resolve.js +9 -6
- package/dist/handlers/load-model/types.d.ts +2 -0
- package/dist/handlers/logging-stream.d.ts +2 -1
- package/dist/handlers/logging-stream.js +35 -7
- package/dist/handlers/plugin-invoke.js +152 -39
- package/dist/handlers/registry.d.ts +2 -2
- package/dist/handlers/registry.js +108 -29
- package/dist/handlers/rpc-server.js +7 -7
- package/dist/handlers/session.d.ts +11 -0
- package/dist/handlers/session.js +40 -0
- package/dist/handlers/types.d.ts +7 -1
- package/dist/handlers/unload-model.js +8 -3
- package/dist/handlers/vector-index.js +118 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/addon.d.ts +1 -1
- package/dist/logging/addon.js +1 -1
- package/dist/logging/index.d.ts +5 -5
- package/dist/logging/index.js +4 -4
- package/dist/logging/logger.d.ts +1 -1
- package/dist/logging/logger.js +3 -3
- package/dist/logging/utils.js +11 -3
- package/dist/model-cache-layout.d.ts +1 -0
- package/dist/model-cache-layout.js +2 -0
- package/dist/model-fit/assess.d.ts +23 -0
- package/dist/model-fit/assess.js +110 -0
- package/dist/model-fit/describe.d.ts +12 -0
- package/dist/model-fit/describe.js +29 -0
- package/dist/{resources/model-fit/fit-stub/fetch-fit-stub.d.ts → model-fit/description/fetch.d.ts} +2 -2
- package/dist/{resources/model-fit/fit-stub/fetch-fit-stub.js → model-fit/description/fetch.js} +98 -19
- package/dist/{resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts → model-fit/description/resolve-load.d.ts} +8 -6
- package/dist/{resources/model-fit/fit-stub/resolve-load-from-stubs.js → model-fit/description/resolve-load.js} +20 -20
- package/dist/model-fit/fit-load.d.ts +23 -0
- package/dist/model-fit/fit-load.js +29 -0
- package/dist/model-fit/load-check.d.ts +34 -0
- package/dist/model-fit/load-check.js +77 -0
- package/dist/model-fit/run/engine.d.ts +12 -0
- package/dist/model-fit/run/engine.js +9 -0
- package/dist/model-fit/run/run.d.ts +46 -0
- package/dist/model-fit/run/run.js +208 -0
- package/dist/model-fit/sum.d.ts +32 -0
- package/dist/model-fit/sum.js +60 -0
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +2 -2
- package/dist/models/registry/models.d.ts +1377 -130
- package/dist/models/registry/models.js +3622 -2312
- package/dist/plugins/builtin/asr-ggml/config.d.ts +19 -4
- package/dist/plugins/builtin/asr-ggml/config.js +39 -3
- package/dist/plugins/builtin/asr-ggml/fit.d.ts +18 -0
- package/dist/plugins/builtin/asr-ggml/fit.js +118 -0
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +6 -0
- package/dist/plugins/builtin/audiogen-ggml/config.js +9 -0
- package/dist/plugins/builtin/audiogen-ggml/fit.d.ts +3 -0
- package/dist/{resources/model-fit/native-probe/engines/audiogen.js → plugins/builtin/audiogen-ggml/fit.js} +28 -18
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +4 -3
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-encode.d.ts +17 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-encode.js +68 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.d.ts +11 -3
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.js +47 -11
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +4 -3
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.js +4 -3
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +203 -72
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +17 -5
- package/dist/plugins/builtin/bci-whispercpp-transcription/fit.d.ts +3 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/fit.js +22 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +71 -29
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +12 -10
- package/dist/plugins/builtin/ggml-classification/plugin.d.ts +8 -5
- package/dist/plugins/builtin/ggml-classification/plugin.js +89 -9
- package/dist/plugins/builtin/ggml-image-embedding/ops/embed.d.ts +24 -0
- package/dist/plugins/builtin/ggml-image-embedding/ops/embed.js +184 -0
- package/dist/plugins/builtin/ggml-image-embedding/plugin.d.ts +120 -0
- package/dist/plugins/builtin/ggml-image-embedding/plugin.js +39 -0
- package/dist/plugins/builtin/ggml-ocr/fit.d.ts +6 -0
- package/dist/plugins/builtin/ggml-ocr/fit.js +19 -0
- package/dist/plugins/builtin/ggml-ocr/params.d.ts +1 -1
- package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +20 -13
- package/dist/plugins/builtin/ggml-ocr/plugin.js +111 -25
- package/dist/plugins/builtin/ggml-vla/ops/vla-run.d.ts +2 -2
- package/dist/plugins/builtin/ggml-vla/ops/vla-run.js +18 -2
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +15 -15
- package/dist/plugins/builtin/ggml-vla/plugin.js +3 -3
- package/dist/plugins/builtin/index.d.ts +16 -14
- package/dist/plugins/builtin/index.js +16 -14
- package/dist/plugins/builtin/llamacpp-completion/fit.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-completion/fit.js +28 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +6 -8
- package/dist/plugins/builtin/llamacpp-completion/ops/cache-logger.js +15 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/calc-tokens.d.ts +2 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/calc-tokens.js +32 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.js +6 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +18 -3
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +94 -21
- package/dist/plugins/builtin/llamacpp-completion/ops/finetune.d.ts +5 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/finetune.js +54 -19
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +5 -3
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +9 -7
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +315 -95
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +51 -25
- package/dist/plugins/builtin/llamacpp-completion/transform.js +4 -0
- package/dist/plugins/builtin/llamacpp-decision/helpers.d.ts +0 -1
- package/dist/plugins/builtin/llamacpp-decision/helpers.js +7 -15
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +6 -3
- package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +43 -35
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +4 -3
- package/dist/plugins/builtin/llamacpp-embedding/fit.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-embedding/fit.js +23 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +201 -10
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +52 -16
- package/dist/plugins/builtin/llamacpp-embedding/transform.d.ts +2 -2
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +29 -2
- package/dist/plugins/builtin/llamacpp-rerank/helpers.d.ts +3 -0
- package/dist/plugins/builtin/llamacpp-rerank/helpers.js +16 -0
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.d.ts +7 -0
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.js +120 -0
- package/dist/plugins/builtin/llamacpp-rerank/plugin.d.ts +92 -0
- package/dist/plugins/builtin/llamacpp-rerank/plugin.js +44 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +46 -19
- package/dist/plugins/builtin/moss-transcribe/plugin.js +9 -7
- package/dist/plugins/builtin/nmtcpp-translation/fit.d.ts +3 -0
- package/dist/plugins/builtin/nmtcpp-translation/fit.js +11 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +32 -18
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +8 -6
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +234 -38
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +42 -16
- package/dist/plugins/builtin/sdcpp-generation/fit.d.ts +3 -0
- package/dist/plugins/builtin/sdcpp-generation/fit.js +68 -0
- package/dist/plugins/builtin/sdcpp-generation/load-files.d.ts +30 -0
- package/dist/plugins/builtin/sdcpp-generation/load-files.js +121 -0
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.d.ts +8 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.js +174 -53
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.d.ts +4 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.js +107 -22
- package/dist/plugins/builtin/sdcpp-generation/ops/video.d.ts +7 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +23 -9
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +6 -4
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +8 -3
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +166 -47
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +67 -155
- package/dist/plugins/builtin/sdcpp-generation/upscaler-config.d.ts +15 -0
- package/dist/plugins/builtin/sdcpp-generation/upscaler-config.js +19 -0
- package/dist/plugins/builtin/sdcpp-generation/world-config.d.ts +8 -0
- package/dist/plugins/builtin/sdcpp-generation/world-config.js +9 -0
- package/dist/plugins/builtin/tts-ggml/fit.d.ts +3 -0
- package/dist/plugins/builtin/tts-ggml/fit.js +162 -0
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.d.ts +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.js +4 -1
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.d.ts +1 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.d.ts +3 -2
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +24 -11
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.d.ts +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +53 -18
- package/dist/plugins/builtin/tts-ggml/ops/voice-options.d.ts +50 -0
- package/dist/plugins/builtin/tts-ggml/ops/voice-options.js +74 -0
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +415 -57
- package/dist/plugins/builtin/tts-ggml/plugin.js +183 -34
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +104 -40
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +12 -10
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +2 -2
- package/dist/plugins/ops/bci-transcribe.d.ts +5 -4
- package/dist/plugins/ops/bci-transcribe.js +18 -4
- package/dist/plugins/ops/cancel.d.ts +1 -0
- package/dist/plugins/ops/cancel.js +11 -2
- package/dist/plugins/ops/embed.d.ts +5 -3
- package/dist/plugins/ops/embed.js +89 -34
- package/dist/plugins/ops/kv-cache-utils.d.ts +5 -3
- package/dist/plugins/ops/kv-cache-utils.js +21 -10
- package/dist/plugins/ops/load-model.d.ts +10 -2
- package/dist/plugins/ops/load-model.js +45 -19
- package/dist/plugins/ops/transcribe.d.ts +5 -4
- package/dist/plugins/ops/transcribe.js +63 -28
- package/dist/plugins/ops/translate.d.ts +2 -1
- package/dist/plugins/ops/translate.js +7 -4
- package/dist/plugins/ops/unload-model.d.ts +17 -1
- package/dist/plugins/ops/unload-model.js +32 -3
- package/dist/plugins/turbovec-backend.d.ts +1 -1
- package/dist/plugins/turbovec-backend.js +21 -6
- package/dist/profiling/aggregator.d.ts +1 -1
- package/dist/profiling/aggregator.js +1 -1
- package/dist/profiling/controller.d.ts +1 -1
- package/dist/profiling/controller.js +2 -2
- package/dist/profiling/events.d.ts +1 -1
- package/dist/profiling/events.js +2 -2
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +3 -3
- package/dist/profiling/index.d.ts +13 -13
- package/dist/profiling/index.js +12 -12
- package/dist/profiling/operation-metrics.d.ts +1 -1
- package/dist/profiling/operation-metrics.js +24 -21
- package/dist/profiling/operation-wrappers.js +3 -3
- package/dist/profiling/profiler.js +1 -1
- package/dist/rag/embedding-scope.d.ts +16 -0
- package/dist/rag/embedding-scope.js +81 -0
- package/dist/rag/handler.d.ts +25 -0
- package/dist/rag/handler.js +51 -17
- package/dist/rag/handlers/close-workspace.js +1 -1
- package/dist/rag/handlers/delete-embeddings.js +1 -1
- package/dist/rag/handlers/delete-workspace.js +1 -1
- package/dist/rag/handlers/ingest.js +3 -7
- package/dist/rag/handlers/list-workspaces.d.ts +1 -1
- package/dist/rag/handlers/list-workspaces.js +1 -1
- package/dist/rag/handlers/reindex.js +1 -1
- package/dist/rag/handlers/save-embeddings.js +1 -1
- package/dist/rag/handlers/search.d.ts +10 -1
- package/dist/rag/handlers/search.js +17 -8
- package/dist/rag/index.d.ts +11 -11
- package/dist/rag/index.js +11 -11
- package/dist/rag/rag-operation-manager.d.ts +27 -3
- package/dist/rag/rag-operation-manager.js +10 -27
- package/dist/rag/rag-workspace-manager.js +1 -1
- package/dist/registry.js +7 -1
- package/dist/resources/collector.d.ts +71 -37
- package/dist/resources/collector.js +9 -2
- package/dist/resources/instance.d.ts +1 -1
- package/dist/resources/instance.js +1 -1
- package/dist/resources/native.d.ts +1 -1
- package/dist/resources/normalize.d.ts +1 -1
- package/dist/resources/types.d.ts +2 -0
- package/dist/rpc/inventory.js +1 -12
- package/dist/runtime/env.d.ts +5 -1
- package/dist/runtime/env.js +6 -21
- package/dist/runtime/index.d.ts +8 -5
- package/dist/runtime/index.js +4 -2
- package/dist/runtime/lifecycle.d.ts +6 -4
- package/dist/runtime/lifecycle.js +16 -12
- package/dist/runtime/model-config-utils.js +8 -1
- package/dist/runtime/model-registry.d.ts +30 -4
- package/dist/runtime/model-registry.js +48 -2
- package/dist/runtime/model-work-lock.d.ts +13 -0
- package/dist/runtime/model-work-lock.js +48 -0
- package/dist/runtime/registry-client.d.ts +47 -1
- package/dist/runtime/registry-client.js +446 -88
- package/dist/runtime/request-context.d.ts +11 -3
- package/dist/runtime/request-context.js +39 -2
- package/dist/runtime/request-registry.d.ts +56 -8
- package/dist/runtime/request-registry.js +190 -72
- package/dist/runtime/runtime-lifecycle.js +10 -1
- package/dist/runtime/session-id.d.ts +18 -0
- package/dist/runtime/session-id.js +20 -0
- package/dist/runtime/session-registry.d.ts +39 -0
- package/dist/runtime/session-registry.js +114 -0
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/state.js +2 -2
- package/dist/runtime/vector-index-backend.d.ts +6 -2
- package/dist/runtime/vector-index-registry.d.ts +26 -5
- package/dist/runtime/vector-index-registry.js +88 -27
- package/dist/schemas/abort-signal.d.ts +8 -0
- package/dist/schemas/assess-model-fit.d.ts +138 -282
- package/dist/schemas/assess-model-fit.js +85 -219
- package/dist/schemas/audio-gen.d.ts +291 -25
- package/dist/schemas/audio-gen.js +130 -26
- package/dist/schemas/batch-completion-stream.d.ts +113 -15
- package/dist/schemas/batch-completion-stream.js +10 -6
- package/dist/schemas/bci-config.d.ts +3 -1
- package/dist/schemas/bci-config.js +2 -2
- package/dist/schemas/bci.d.ts +55 -4
- package/dist/schemas/bci.js +13 -18
- package/dist/schemas/calc-tokens.d.ts +141 -0
- package/dist/schemas/calc-tokens.js +53 -0
- package/dist/schemas/cancel.d.ts +31 -0
- package/dist/schemas/cancel.js +11 -2
- package/dist/schemas/classification.d.ts +3 -0
- package/dist/schemas/classification.js +6 -2
- package/dist/schemas/common.d.ts +2209 -348
- package/dist/schemas/common.js +52 -33
- package/dist/schemas/completion-event.d.ts +11 -2
- package/dist/schemas/completion-event.js +5 -2
- package/dist/schemas/completion-stream.d.ts +173 -19
- package/dist/schemas/completion-stream.js +117 -20
- package/dist/schemas/config.d.ts +2064 -178
- package/dist/schemas/config.js +21 -23
- package/dist/schemas/decision.d.ts +12 -2
- package/dist/schemas/decision.js +16 -1
- package/dist/schemas/download-asset.d.ts +13 -6
- package/dist/schemas/download-asset.js +4 -7
- package/dist/schemas/embed.d.ts +286 -3
- package/dist/schemas/embed.js +162 -16
- package/dist/schemas/engine-addon-map.d.ts +3 -1
- package/dist/schemas/engine-addon-map.js +5 -3
- package/dist/schemas/errors.d.ts +13 -0
- package/dist/schemas/errors.js +71 -1
- package/dist/schemas/finetune.d.ts +14 -4
- package/dist/schemas/finetune.js +5 -6
- package/dist/schemas/heartbeat.d.ts +1 -0
- package/dist/schemas/heartbeat.js +5 -2
- package/dist/schemas/image-embedding.d.ts +27 -0
- package/dist/schemas/image-embedding.js +107 -0
- package/dist/schemas/index.d.ts +55 -50
- package/dist/schemas/index.js +54 -49
- package/dist/schemas/lifecycle.d.ts +3 -0
- package/dist/schemas/lifecycle.js +13 -6
- package/dist/schemas/llamacpp-config.d.ts +443 -20
- package/dist/schemas/llamacpp-config.js +188 -14
- package/dist/schemas/load-model.d.ts +8940 -1952
- package/dist/schemas/load-model.js +73 -9
- package/dist/schemas/logging-stream.d.ts +1 -0
- package/dist/schemas/logging-stream.js +5 -2
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-config-schemas.d.ts +731 -111
- package/dist/schemas/model-config-schemas.js +16 -12
- package/dist/schemas/model-fit-policy.d.ts +2 -2
- package/dist/schemas/model-info.d.ts +54 -56
- package/dist/schemas/model-info.js +18 -7
- package/dist/schemas/model-ops.d.ts +12 -0
- package/dist/schemas/model-ops.js +33 -5
- package/dist/schemas/model-src-utils.d.ts +14 -6
- package/dist/schemas/model-src-utils.js +2 -2
- package/dist/schemas/model-types.d.ts +12 -4
- package/dist/schemas/model-types.js +2 -0
- package/dist/schemas/ocr.d.ts +11 -4
- package/dist/schemas/ocr.js +7 -3
- package/dist/schemas/plugin.d.ts +70 -8
- package/dist/schemas/plugin.js +32 -4
- package/dist/schemas/profiling.d.ts +32 -32
- package/dist/schemas/profiling.js +1 -1
- package/dist/schemas/rag.d.ts +9 -0
- package/dist/schemas/rag.js +11 -17
- package/dist/schemas/registry.d.ts +38 -10
- package/dist/schemas/registry.js +16 -7
- package/dist/schemas/reload-config.d.ts +45 -6
- package/dist/schemas/reload-config.js +13 -6
- package/dist/schemas/request-base.d.ts +39 -0
- package/dist/schemas/request-base.js +64 -0
- package/dist/schemas/rerank.d.ts +132 -0
- package/dist/schemas/rerank.js +104 -0
- package/dist/schemas/rpc-server.d.ts +3 -0
- package/dist/schemas/rpc-server.js +15 -15
- package/dist/schemas/sdcpp-config.d.ts +144 -18
- package/dist/schemas/sdcpp-config.js +123 -28
- package/dist/schemas/session.d.ts +37 -0
- package/dist/schemas/session.js +53 -0
- package/dist/schemas/system-resources.d.ts +364 -179
- package/dist/schemas/system-resources.js +8 -3
- package/dist/schemas/text-to-speech.d.ts +1408 -275
- package/dist/schemas/text-to-speech.js +547 -33
- package/dist/schemas/tools.d.ts +7 -0
- package/dist/schemas/tools.js +29 -0
- package/dist/schemas/transcription-config.d.ts +267 -2
- package/dist/schemas/transcription-config.js +138 -7
- package/dist/schemas/transcription.d.ts +94 -7
- package/dist/schemas/transcription.js +99 -22
- package/dist/schemas/translate.d.ts +4 -2
- package/dist/schemas/translate.js +6 -10
- package/dist/schemas/translation-config.d.ts +40 -20
- package/dist/schemas/translation-config.js +1 -1
- package/dist/schemas/tts-pcm.d.ts +35 -0
- package/dist/schemas/tts-pcm.js +69 -0
- package/dist/schemas/vector-index.d.ts +47 -1
- package/dist/schemas/vector-index.js +37 -10
- package/dist/schemas/vla.d.ts +3 -3
- package/dist/surface.d.ts +4 -3
- package/dist/surface.js +4 -3
- package/dist/utils/addon-responses.d.ts +71 -2
- package/dist/utils/aggregate-events.d.ts +1 -1
- package/dist/utils/aggregate-events.js +2 -2
- package/dist/utils/archive.d.ts +7 -0
- package/dist/utils/archive.js +89 -30
- package/dist/utils/asr-events.d.ts +5 -0
- package/dist/utils/asr-events.js +10 -1
- package/dist/utils/audio/decoder.js +3 -1
- package/dist/utils/audio-input.js +1 -1
- package/dist/utils/cache/auto-history.d.ts +2 -1
- package/dist/utils/cache/auto-history.js +5 -3
- package/dist/utils/cache/layout.d.ts +48 -0
- package/dist/utils/cache/layout.js +190 -0
- package/dist/utils/cache/paths.js +8 -10
- package/dist/utils/cache/types.d.ts +2 -1
- package/dist/utils/checksum.d.ts +7 -0
- package/dist/utils/checksum.js +59 -2
- package/dist/utils/completion-normalizer.js +287 -88
- package/dist/utils/gguf-architecture.d.ts +7 -0
- package/dist/utils/gguf-architecture.js +142 -0
- package/dist/utils/gguf-tensor-extractor.d.ts +0 -6
- package/dist/utils/gguf-tensor-extractor.js +1 -50
- package/dist/utils/index.d.ts +13 -13
- package/dist/utils/index.js +13 -13
- package/dist/utils/mcp-adapter.d.ts +1 -1
- package/dist/utils/mcp-adapter.js +1 -1
- package/dist/utils/path-security.js +1 -1
- package/dist/utils/shard-utils.d.ts +0 -16
- package/dist/utils/shard-utils.js +14 -48
- package/dist/utils/tool-integration.d.ts +3 -2
- package/dist/utils/tool-integration.js +3 -6
- package/dist/utils/tools/defer.d.ts +50 -31
- package/dist/utils/tools/defer.js +115 -51
- package/dist/utils/tools/dialect.d.ts +15 -4
- package/dist/utils/tools/dialect.js +34 -5
- package/dist/utils/tools/index.d.ts +3 -3
- package/dist/utils/tools/index.js +3 -3
- package/dist/utils/tools/parser.js +8 -8
- package/dist/utils/tools/parsers/dsml.d.ts +1 -1
- package/dist/utils/tools/parsers/dsml.js +1 -1
- package/dist/utils/tools/parsers/gemma4native.d.ts +1 -1
- package/dist/utils/tools/parsers/gemma4native.js +1 -1
- package/dist/utils/tools/parsers/harmony.d.ts +1 -1
- package/dist/utils/tools/parsers/harmony.js +1 -1
- package/dist/utils/tools/parsers/hermes.d.ts +1 -1
- package/dist/utils/tools/parsers/hermes.js +1 -1
- package/dist/utils/tools/parsers/json.d.ts +1 -1
- package/dist/utils/tools/parsers/json.js +1 -1
- package/dist/utils/tools/parsers/pythonic.d.ts +1 -1
- package/dist/utils/tools/parsers/pythonic.js +1 -1
- package/dist/utils/tools/parsers/qwen35.d.ts +1 -1
- package/dist/utils/tools/parsers/qwen35.js +1 -1
- package/dist/utils/transcribe-metadata.d.ts +28 -2
- package/dist/utils/transcribe-metadata.js +16 -0
- package/dist/utils/tts-stats.d.ts +43 -1
- package/dist/utils/tts-stats.js +120 -22
- package/dist/utils/until-aborted.d.ts +7 -0
- package/dist/utils/until-aborted.js +34 -0
- package/package.json +67 -55
- package/dist/models/registry/resource-profiles.d.ts +0 -17
- package/dist/models/registry/resource-profiles.js +0 -5657
- package/dist/resources/model-fit/assess.d.ts +0 -72
- package/dist/resources/model-fit/assess.js +0 -679
- package/dist/resources/model-fit/fit-stub/project-fit-from-load.d.ts +0 -27
- package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +0 -33
- package/dist/resources/model-fit/floor.d.ts +0 -31
- package/dist/resources/model-fit/floor.js +0 -65
- package/dist/resources/model-fit/kv-cache.d.ts +0 -23
- package/dist/resources/model-fit/kv-cache.js +0 -85
- package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +0 -54
- package/dist/resources/model-fit/native-probe/advisory-fit.js +0 -248
- package/dist/resources/model-fit/native-probe/child-engine-fit.d.ts +0 -2
- package/dist/resources/model-fit/native-probe/child-engine-fit.js +0 -49
- package/dist/resources/model-fit/native-probe/classify-fit.d.ts +0 -6
- package/dist/resources/model-fit/native-probe/classify-fit.js +0 -166
- package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +0 -31
- package/dist/resources/model-fit/native-probe/create-fit-request.js +0 -61
- package/dist/resources/model-fit/native-probe/engine-fit.d.ts +0 -73
- package/dist/resources/model-fit/native-probe/engine-fit.js +0 -13
- package/dist/resources/model-fit/native-probe/engines/asr.d.ts +0 -14
- package/dist/resources/model-fit/native-probe/engines/asr.js +0 -126
- package/dist/resources/model-fit/native-probe/engines/audiogen.d.ts +0 -8
- package/dist/resources/model-fit/native-probe/engines/diffusion.d.ts +0 -7
- package/dist/resources/model-fit/native-probe/engines/diffusion.js +0 -65
- package/dist/resources/model-fit/native-probe/engines/llama.d.ts +0 -12
- package/dist/resources/model-fit/native-probe/engines/llama.js +0 -41
- package/dist/resources/model-fit/native-probe/engines/nmt.d.ts +0 -8
- package/dist/resources/model-fit/native-probe/engines/nmt.js +0 -11
- package/dist/resources/model-fit/native-probe/engines/ocr.d.ts +0 -9
- package/dist/resources/model-fit/native-probe/engines/ocr.js +0 -13
- package/dist/resources/model-fit/native-probe/engines/tts.d.ts +0 -10
- package/dist/resources/model-fit/native-probe/engines/tts.js +0 -152
- package/dist/resources/model-fit/native-probe/fit-outcome.d.ts +0 -16
- package/dist/resources/model-fit/native-probe/fit-process.d.ts +0 -27
- package/dist/resources/model-fit/native-probe/fit-process.js +0 -55
- package/dist/resources/model-fit/native-probe/fit-runner.d.ts +0 -1
- package/dist/resources/model-fit/native-probe/fit-runner.js +0 -58
- package/dist/resources/model-fit/native-probe/run-fit.d.ts +0 -24
- package/dist/resources/model-fit/native-probe/run-fit.js +0 -20
- package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +0 -24
- package/dist/resources/model-fit/native-probe/run-in-process-fit.js +0 -123
- package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +0 -63
- package/dist/resources/model-fit/native-probe/run-isolated-fit.js +0 -377
- package/dist/resources/model-fit/platform.d.ts +0 -9
- package/dist/resources/model-fit/platform.js +0 -26
- package/dist/resources/model-fit/types.d.ts +0 -6
- package/dist/resources/model-fit/types.js +0 -1
- package/dist/schemas/model-resource-profile.d.ts +0 -108
- package/dist/schemas/model-resource-profile.js +0 -80
- /package/dist/{resources/model-fit/native-probe/engines → model-fit}/gpu.d.ts +0 -0
- /package/dist/{resources/model-fit/native-probe/engines → model-fit}/gpu.js +0 -0
- /package/dist/{resources/model-fit/native-probe/fit-outcome.js → schemas/abort-signal.js} +0 -0
package/dist/schemas/tools.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
31
31
|
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
32
|
}, z.core.$loose>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
|
+
export declare const DEFAULT_TOOL_SEARCH_LIMIT = 3;
|
|
35
|
+
export declare const MAX_TOOL_SEARCH_LIMIT = 8;
|
|
36
|
+
export declare const toolSearchOptionsSchema: z.ZodObject<{
|
|
37
|
+
defaultLimit: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
maxLimit: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, z.core.$strict>;
|
|
34
40
|
export declare const toolCallSchema: z.ZodObject<{
|
|
35
41
|
id: z.ZodString;
|
|
36
42
|
name: z.ZodString;
|
|
@@ -67,6 +73,7 @@ export declare const toolCallEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
67
73
|
}, z.core.$strip>;
|
|
68
74
|
}, z.core.$strip>]>;
|
|
69
75
|
export type Tool = z.infer<typeof toolSchema>;
|
|
76
|
+
export type ToolSearchOptions = z.input<typeof toolSearchOptionsSchema>;
|
|
70
77
|
export type ToolCall = z.infer<typeof toolCallSchema>;
|
|
71
78
|
export type ToolCallError = z.infer<typeof toolCallErrorSchema>;
|
|
72
79
|
export type ToolCallEvent = z.infer<typeof toolCallEventSchema>;
|
package/dist/schemas/tools.js
CHANGED
|
@@ -34,6 +34,35 @@ export const toolSchema = z.object({
|
|
|
34
34
|
required: z.array(z.string()).optional()
|
|
35
35
|
})
|
|
36
36
|
});
|
|
37
|
+
export const DEFAULT_TOOL_SEARCH_LIMIT = 3;
|
|
38
|
+
export const MAX_TOOL_SEARCH_LIMIT = 8;
|
|
39
|
+
export const toolSearchOptionsSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
defaultLimit: z
|
|
42
|
+
.number()
|
|
43
|
+
.int()
|
|
44
|
+
.min(1)
|
|
45
|
+
.optional()
|
|
46
|
+
.describe(`How many tool definitions one \`tool_search\` call loads when the model does not ask for a number with its \`limit\` argument. Defaults to ${DEFAULT_TOOL_SEARCH_LIMIT}, or \`maxLimit\` when that is lower.`),
|
|
47
|
+
maxLimit: z
|
|
48
|
+
.number()
|
|
49
|
+
.int()
|
|
50
|
+
.min(1)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe(`The most tool definitions one \`tool_search\` call can load. A larger \`limit\` from the model is lowered to this. Defaults to ${MAX_TOOL_SEARCH_LIMIT}.`)
|
|
53
|
+
})
|
|
54
|
+
.strict()
|
|
55
|
+
.superRefine((options, ctx) => {
|
|
56
|
+
const maxLimit = options.maxLimit ?? MAX_TOOL_SEARCH_LIMIT;
|
|
57
|
+
if (options.defaultLimit !== undefined && options.defaultLimit > maxLimit) {
|
|
58
|
+
ctx.addIssue({
|
|
59
|
+
code: 'custom',
|
|
60
|
+
message: `toolSearch.defaultLimit (${options.defaultLimit}) cannot exceed maxLimit (${maxLimit}).`,
|
|
61
|
+
path: ['defaultLimit']
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
.describe('Limits on what the built-in `tool_search` loads per call. Only used when a tool sets `deferLoading`. The limits are stated in the `tool_search` definition at the front of the prompt, so set them once per conversation: changing them re-prefills from there.');
|
|
37
66
|
export const toolCallSchema = z.object({
|
|
38
67
|
id: z.string(),
|
|
39
68
|
name: z.string(),
|
|
@@ -32,6 +32,7 @@ export declare const whisperConfigSchema: z.ZodObject<{
|
|
|
32
32
|
tdrz_enable: z.ZodOptional<z.ZodBoolean>;
|
|
33
33
|
suppress_regex: z.ZodOptional<z.ZodString>;
|
|
34
34
|
initial_prompt: z.ZodOptional<z.ZodString>;
|
|
35
|
+
carry_initial_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
35
36
|
language: z.ZodOptional<z.ZodString>;
|
|
36
37
|
detect_language: z.ZodOptional<z.ZodBoolean>;
|
|
37
38
|
suppress_blank: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -64,6 +65,10 @@ export declare const whisperConfigSchema: z.ZodObject<{
|
|
|
64
65
|
use_gpu: z.ZodOptional<z.ZodBoolean>;
|
|
65
66
|
flash_attn: z.ZodOptional<z.ZodBoolean>;
|
|
66
67
|
gpu_device: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
'main-gpu': z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodEnum<{
|
|
69
|
+
integrated: "integrated";
|
|
70
|
+
dedicated: "dedicated";
|
|
71
|
+
}>]>>;
|
|
67
72
|
}, z.core.$strip>>;
|
|
68
73
|
miscConfig: z.ZodOptional<z.ZodObject<{
|
|
69
74
|
caption_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -86,12 +91,14 @@ export declare const whisperConfigSchema: z.ZodObject<{
|
|
|
86
91
|
audiogen: "audiogen";
|
|
87
92
|
tts: "tts";
|
|
88
93
|
ocr: "ocr";
|
|
94
|
+
classification: "classification";
|
|
89
95
|
vla: "vla";
|
|
90
96
|
"llamacpp-completion": "llamacpp-completion";
|
|
91
97
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
92
98
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
93
99
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
94
100
|
"llamacpp-decision": "llamacpp-decision";
|
|
101
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
95
102
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
96
103
|
"onnx-tts": "onnx-tts";
|
|
97
104
|
"tts-ggml": "tts-ggml";
|
|
@@ -101,20 +108,124 @@ export declare const whisperConfigSchema: z.ZodObject<{
|
|
|
101
108
|
"sdcpp-generation": "sdcpp-generation";
|
|
102
109
|
"audiogen-ggml": "audiogen-ggml";
|
|
103
110
|
"ggml-vla": "ggml-vla";
|
|
111
|
+
"ggml-image-embedding": "ggml-image-embedding";
|
|
104
112
|
"ggml-classification": "ggml-classification";
|
|
105
113
|
llm: "llm";
|
|
106
114
|
whisper: "whisper";
|
|
107
115
|
bci: "bci";
|
|
108
116
|
nmt: "nmt";
|
|
109
117
|
parakeet: "parakeet";
|
|
110
|
-
classification: "classification";
|
|
111
118
|
}>, z.ZodLiteral<"vad">]>>;
|
|
112
119
|
}, z.core.$strip>]>>;
|
|
113
120
|
}, z.core.$strip>;
|
|
114
121
|
export type WhisperConfig = z.infer<typeof whisperConfigSchema>;
|
|
122
|
+
/**
|
|
123
|
+
* Speaker-attributed batch transcription: a separate diarization GGUF
|
|
124
|
+
* (Sortformer or Nemotron 3 Diarization) loaded beside the ASR model. The
|
|
125
|
+
* addon diarizes the recording, transcribes each retained turn and reports
|
|
126
|
+
* text per speaker. Batch `transcribe()` only.
|
|
127
|
+
*/
|
|
128
|
+
export declare const parakeetSpeakerAttributionConfigSchema: z.ZodObject<{
|
|
129
|
+
modelSrc: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
130
|
+
src: z.ZodString;
|
|
131
|
+
name: z.ZodOptional<z.ZodString>;
|
|
132
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
133
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
134
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
135
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
136
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
138
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
140
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
141
|
+
embeddings: "embeddings";
|
|
142
|
+
diffusion: "diffusion";
|
|
143
|
+
audiogen: "audiogen";
|
|
144
|
+
tts: "tts";
|
|
145
|
+
ocr: "ocr";
|
|
146
|
+
classification: "classification";
|
|
147
|
+
vla: "vla";
|
|
148
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
149
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
150
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
151
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
152
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
153
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
154
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
155
|
+
"onnx-tts": "onnx-tts";
|
|
156
|
+
"tts-ggml": "tts-ggml";
|
|
157
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
158
|
+
"moss-transcribe": "moss-transcribe";
|
|
159
|
+
"ggml-ocr": "ggml-ocr";
|
|
160
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
161
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
162
|
+
"ggml-vla": "ggml-vla";
|
|
163
|
+
"ggml-image-embedding": "ggml-image-embedding";
|
|
164
|
+
"ggml-classification": "ggml-classification";
|
|
165
|
+
llm: "llm";
|
|
166
|
+
whisper: "whisper";
|
|
167
|
+
bci: "bci";
|
|
168
|
+
nmt: "nmt";
|
|
169
|
+
parakeet: "parakeet";
|
|
170
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
171
|
+
}, z.core.$strip>]>;
|
|
172
|
+
mergeSameSpeaker: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
minSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
padSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
}, z.core.$strict>;
|
|
176
|
+
export type ParakeetSpeakerAttributionConfig = z.infer<typeof parakeetSpeakerAttributionConfigSchema>;
|
|
115
177
|
export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
116
178
|
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
117
179
|
useGPU: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
181
|
+
speakerAttribution: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
modelSrc: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
183
|
+
src: z.ZodString;
|
|
184
|
+
name: z.ZodOptional<z.ZodString>;
|
|
185
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
186
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
187
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
188
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
189
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
191
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
193
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
194
|
+
embeddings: "embeddings";
|
|
195
|
+
diffusion: "diffusion";
|
|
196
|
+
audiogen: "audiogen";
|
|
197
|
+
tts: "tts";
|
|
198
|
+
ocr: "ocr";
|
|
199
|
+
classification: "classification";
|
|
200
|
+
vla: "vla";
|
|
201
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
202
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
203
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
204
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
205
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
206
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
207
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
208
|
+
"onnx-tts": "onnx-tts";
|
|
209
|
+
"tts-ggml": "tts-ggml";
|
|
210
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
211
|
+
"moss-transcribe": "moss-transcribe";
|
|
212
|
+
"ggml-ocr": "ggml-ocr";
|
|
213
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
214
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
215
|
+
"ggml-vla": "ggml-vla";
|
|
216
|
+
"ggml-image-embedding": "ggml-image-embedding";
|
|
217
|
+
"ggml-classification": "ggml-classification";
|
|
218
|
+
llm: "llm";
|
|
219
|
+
whisper: "whisper";
|
|
220
|
+
bci: "bci";
|
|
221
|
+
nmt: "nmt";
|
|
222
|
+
parakeet: "parakeet";
|
|
223
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
224
|
+
}, z.core.$strip>]>;
|
|
225
|
+
mergeSameSpeaker: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
minSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
padSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
}, z.core.$strict>>;
|
|
118
229
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
119
230
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
120
231
|
captionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -125,6 +236,9 @@ export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
|
125
236
|
streamingHistoryMs: z.ZodOptional<z.ZodNumber>;
|
|
126
237
|
streamingEmitPartials: z.ZodOptional<z.ZodBoolean>;
|
|
127
238
|
streamingEnergyVad: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
streamingEnergyVadThresholdDb: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
streamingEnergyVadWindowMs: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
streamingEnergyVadHangoverMs: z.ZodOptional<z.ZodNumber>;
|
|
128
242
|
streamingLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
129
243
|
streamingRightLookaheadMs: z.ZodOptional<z.ZodNumber>;
|
|
130
244
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -137,12 +251,65 @@ export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
|
137
251
|
streamingChunkLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
138
252
|
streamingChunkRightContextMs: z.ZodOptional<z.ZodNumber>;
|
|
139
253
|
streamingSpkCacheUpdatePeriod: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
prewarm: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
+
prewarmAudioSeconds: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
longFormWindowFrames: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
longFormContextFrames: z.ZodOptional<z.ZodNumber>;
|
|
140
258
|
backendsDir: z.ZodOptional<z.ZodString>;
|
|
141
259
|
openclCacheDir: z.ZodOptional<z.ZodString>;
|
|
142
260
|
}, z.core.$strip>;
|
|
143
261
|
export declare const parakeetConfigSchema: z.ZodObject<{
|
|
144
262
|
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
145
263
|
useGPU: z.ZodOptional<z.ZodBoolean>;
|
|
264
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
265
|
+
speakerAttribution: z.ZodOptional<z.ZodObject<{
|
|
266
|
+
modelSrc: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
267
|
+
src: z.ZodString;
|
|
268
|
+
name: z.ZodOptional<z.ZodString>;
|
|
269
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
270
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
271
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
272
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
273
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
275
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
277
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
278
|
+
embeddings: "embeddings";
|
|
279
|
+
diffusion: "diffusion";
|
|
280
|
+
audiogen: "audiogen";
|
|
281
|
+
tts: "tts";
|
|
282
|
+
ocr: "ocr";
|
|
283
|
+
classification: "classification";
|
|
284
|
+
vla: "vla";
|
|
285
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
286
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
287
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
288
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
289
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
290
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
291
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
292
|
+
"onnx-tts": "onnx-tts";
|
|
293
|
+
"tts-ggml": "tts-ggml";
|
|
294
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
295
|
+
"moss-transcribe": "moss-transcribe";
|
|
296
|
+
"ggml-ocr": "ggml-ocr";
|
|
297
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
298
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
299
|
+
"ggml-vla": "ggml-vla";
|
|
300
|
+
"ggml-image-embedding": "ggml-image-embedding";
|
|
301
|
+
"ggml-classification": "ggml-classification";
|
|
302
|
+
llm: "llm";
|
|
303
|
+
whisper: "whisper";
|
|
304
|
+
bci: "bci";
|
|
305
|
+
nmt: "nmt";
|
|
306
|
+
parakeet: "parakeet";
|
|
307
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
308
|
+
}, z.core.$strip>]>;
|
|
309
|
+
mergeSameSpeaker: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
+
minSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
padSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
}, z.core.$strict>>;
|
|
146
313
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
147
314
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
148
315
|
captionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -153,6 +320,9 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
153
320
|
streamingHistoryMs: z.ZodOptional<z.ZodNumber>;
|
|
154
321
|
streamingEmitPartials: z.ZodOptional<z.ZodBoolean>;
|
|
155
322
|
streamingEnergyVad: z.ZodOptional<z.ZodBoolean>;
|
|
323
|
+
streamingEnergyVadThresholdDb: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
streamingEnergyVadWindowMs: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
streamingEnergyVadHangoverMs: z.ZodOptional<z.ZodNumber>;
|
|
156
326
|
streamingLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
157
327
|
streamingRightLookaheadMs: z.ZodOptional<z.ZodNumber>;
|
|
158
328
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -165,6 +335,10 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
165
335
|
streamingChunkLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
166
336
|
streamingChunkRightContextMs: z.ZodOptional<z.ZodNumber>;
|
|
167
337
|
streamingSpkCacheUpdatePeriod: z.ZodOptional<z.ZodNumber>;
|
|
338
|
+
prewarm: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
+
prewarmAudioSeconds: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
longFormWindowFrames: z.ZodOptional<z.ZodNumber>;
|
|
341
|
+
longFormContextFrames: z.ZodOptional<z.ZodNumber>;
|
|
168
342
|
backendsDir: z.ZodOptional<z.ZodString>;
|
|
169
343
|
openclCacheDir: z.ZodOptional<z.ZodString>;
|
|
170
344
|
}, z.core.$strip>;
|
|
@@ -172,12 +346,103 @@ export type ParakeetRuntimeConfig = z.infer<typeof parakeetRuntimeConfigSchema>;
|
|
|
172
346
|
export type ParakeetConfig = z.infer<typeof parakeetConfigSchema>;
|
|
173
347
|
export declare const LEGACY_PARAKEET_ONNX_MODEL_CONFIG_FIELDS: readonly ["parakeetEncoderSrc", "parakeetDecoderSrc", "parakeetVocabSrc", "parakeetPreprocessorSrc", "parakeetCtcModelSrc", "parakeetTokenizerSrc", "parakeetSortformerSrc", "parakeetModelSrc", "modelType"];
|
|
174
348
|
export declare const parakeetLoadConfigSchema: z.ZodObject<{
|
|
175
|
-
|
|
349
|
+
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
useGPU: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
352
|
+
speakerAttribution: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
modelSrc: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
354
|
+
src: z.ZodString;
|
|
355
|
+
name: z.ZodOptional<z.ZodString>;
|
|
356
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
357
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
358
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
359
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
360
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
361
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
362
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
363
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
364
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
365
|
+
embeddings: "embeddings";
|
|
366
|
+
diffusion: "diffusion";
|
|
367
|
+
audiogen: "audiogen";
|
|
368
|
+
tts: "tts";
|
|
369
|
+
ocr: "ocr";
|
|
370
|
+
classification: "classification";
|
|
371
|
+
vla: "vla";
|
|
372
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
373
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
374
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
375
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
376
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
377
|
+
"llamacpp-rerank": "llamacpp-rerank";
|
|
378
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
379
|
+
"onnx-tts": "onnx-tts";
|
|
380
|
+
"tts-ggml": "tts-ggml";
|
|
381
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
382
|
+
"moss-transcribe": "moss-transcribe";
|
|
383
|
+
"ggml-ocr": "ggml-ocr";
|
|
384
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
385
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
386
|
+
"ggml-vla": "ggml-vla";
|
|
387
|
+
"ggml-image-embedding": "ggml-image-embedding";
|
|
388
|
+
"ggml-classification": "ggml-classification";
|
|
389
|
+
llm: "llm";
|
|
390
|
+
whisper: "whisper";
|
|
391
|
+
bci: "bci";
|
|
392
|
+
nmt: "nmt";
|
|
393
|
+
parakeet: "parakeet";
|
|
394
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
395
|
+
}, z.core.$strip>]>;
|
|
396
|
+
mergeSameSpeaker: z.ZodOptional<z.ZodBoolean>;
|
|
397
|
+
minSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
padSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
399
|
+
}, z.core.$strict>>;
|
|
400
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
channels: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
captionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
403
|
+
timestampsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
404
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
406
|
+
streamingChunkMs: z.ZodOptional<z.ZodNumber>;
|
|
407
|
+
streamingHistoryMs: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
streamingEmitPartials: z.ZodOptional<z.ZodBoolean>;
|
|
409
|
+
streamingEnergyVad: z.ZodOptional<z.ZodBoolean>;
|
|
410
|
+
streamingEnergyVadThresholdDb: z.ZodOptional<z.ZodNumber>;
|
|
411
|
+
streamingEnergyVadWindowMs: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
streamingEnergyVadHangoverMs: z.ZodOptional<z.ZodNumber>;
|
|
413
|
+
streamingLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
414
|
+
streamingRightLookaheadMs: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
language: z.ZodOptional<z.ZodString>;
|
|
416
|
+
streamingSpeakerVad: z.ZodOptional<z.ZodBoolean>;
|
|
417
|
+
diarizationThreshold: z.ZodOptional<z.ZodNumber>;
|
|
418
|
+
diarizationMinSegmentMs: z.ZodOptional<z.ZodNumber>;
|
|
419
|
+
streamingSpkCacheEnable: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
+
streamingSpkCacheLen: z.ZodOptional<z.ZodNumber>;
|
|
421
|
+
streamingFifoLen: z.ZodOptional<z.ZodNumber>;
|
|
422
|
+
streamingChunkLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
423
|
+
streamingChunkRightContextMs: z.ZodOptional<z.ZodNumber>;
|
|
424
|
+
streamingSpkCacheUpdatePeriod: z.ZodOptional<z.ZodNumber>;
|
|
425
|
+
prewarm: z.ZodOptional<z.ZodBoolean>;
|
|
426
|
+
prewarmAudioSeconds: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
longFormWindowFrames: z.ZodOptional<z.ZodNumber>;
|
|
428
|
+
longFormContextFrames: z.ZodOptional<z.ZodNumber>;
|
|
429
|
+
backendsDir: z.ZodOptional<z.ZodString>;
|
|
430
|
+
openclCacheDir: z.ZodOptional<z.ZodString>;
|
|
431
|
+
modelType: z.ZodOptional<z.ZodUnknown>;
|
|
432
|
+
parakeetEncoderSrc: z.ZodOptional<z.ZodUnknown>;
|
|
433
|
+
parakeetDecoderSrc: z.ZodOptional<z.ZodUnknown>;
|
|
434
|
+
parakeetVocabSrc: z.ZodOptional<z.ZodUnknown>;
|
|
435
|
+
parakeetPreprocessorSrc: z.ZodOptional<z.ZodUnknown>;
|
|
436
|
+
parakeetCtcModelSrc: z.ZodOptional<z.ZodUnknown>;
|
|
437
|
+
parakeetTokenizerSrc: z.ZodOptional<z.ZodUnknown>;
|
|
438
|
+
parakeetSortformerSrc: z.ZodOptional<z.ZodUnknown>;
|
|
439
|
+
parakeetModelSrc: z.ZodOptional<z.ZodUnknown>;
|
|
176
440
|
}, z.core.$strict>;
|
|
177
441
|
/** MOSS-Transcribe-Diarize processes a whole recording with speaker labels. */
|
|
178
442
|
export declare const mossTranscribeConfigSchema: z.ZodObject<{
|
|
179
443
|
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
180
444
|
useGPU: z.ZodOptional<z.ZodBoolean>;
|
|
445
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
181
446
|
backendsDir: z.ZodOptional<z.ZodString>;
|
|
182
447
|
}, z.core.$strict>;
|
|
183
448
|
export type MossTranscribeConfig = z.infer<typeof mossTranscribeConfigSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { modelSrcInputSchema } from '
|
|
2
|
+
import { modelSrcInputSchema } from '../schemas/model-src-utils.js';
|
|
3
3
|
// === Shared ===
|
|
4
4
|
export const audioFormatSchema = z.enum(['f32le', 's16le']);
|
|
5
5
|
// === Whisper (whisper.cpp) engine config ===
|
|
@@ -31,12 +31,43 @@ const vadParamsSchema = z
|
|
|
31
31
|
.describe('Overlap between consecutive speech segments (0 < x ≤ 1); an explicit `0` falls back to the engine default.')
|
|
32
32
|
})
|
|
33
33
|
.optional();
|
|
34
|
+
const MAIN_GPU_DESCRIPTION = "GPU to run on once `use_gpu` is true: a ggml device-registry index (non-negative 32-bit integer, as a number or digit string), `'dedicated'`, or `'integrated'`. A class selector is strict and falls back to CPU when that class is absent. Cannot be combined with `gpu_device`.";
|
|
35
|
+
// Mirrors the addon's validateMainGpu() so a bad selector is a structured
|
|
36
|
+
// input error instead of a failure once model loading starts.
|
|
37
|
+
const MAIN_GPU_INDEX_MAX = 2147483647;
|
|
38
|
+
const mainGpuSelectorSchema = z.union([
|
|
39
|
+
z.number().int().min(0).max(MAIN_GPU_INDEX_MAX),
|
|
40
|
+
z
|
|
41
|
+
.string()
|
|
42
|
+
.regex(/^\d+$/, 'main-gpu string must be a device index, dedicated, or integrated')
|
|
43
|
+
.refine((value) => Number(value) <= MAIN_GPU_INDEX_MAX, {
|
|
44
|
+
message: 'main-gpu device index must fit in a 32-bit integer'
|
|
45
|
+
}),
|
|
46
|
+
z.enum(['dedicated', 'integrated'])
|
|
47
|
+
]);
|
|
34
48
|
const contextParamsSchema = z
|
|
35
49
|
.object({
|
|
36
50
|
model: z.string().optional().describe('Path to the whisper model file (context override).'),
|
|
37
51
|
use_gpu: z.boolean().optional().describe('Enable GPU acceleration. Default false.'),
|
|
38
52
|
flash_attn: z.boolean().optional().describe('Enable flash attention.'),
|
|
39
|
-
gpu_device: z
|
|
53
|
+
gpu_device: z
|
|
54
|
+
.number()
|
|
55
|
+
.optional()
|
|
56
|
+
.describe('GPU device index to use (legacy GPU/IGPU ordinal). Cannot be combined with `main-gpu`.'),
|
|
57
|
+
// The addon also reads a `main_gpu` spelling; the SDK carries the one
|
|
58
|
+
// used by the other engines' configs, which the generated Python model
|
|
59
|
+
// exposes as its `main_gpu` field. A second key with that name would
|
|
60
|
+
// collide with the field and serialise both spellings at once.
|
|
61
|
+
'main-gpu': mainGpuSelectorSchema.optional().describe(MAIN_GPU_DESCRIPTION)
|
|
62
|
+
})
|
|
63
|
+
.superRefine((params, ctx) => {
|
|
64
|
+
if (params['main-gpu'] !== undefined && params.gpu_device !== undefined) {
|
|
65
|
+
ctx.addIssue({
|
|
66
|
+
code: 'custom',
|
|
67
|
+
path: ['gpu_device'],
|
|
68
|
+
message: 'main-gpu cannot be combined with gpu_device'
|
|
69
|
+
});
|
|
70
|
+
}
|
|
40
71
|
})
|
|
41
72
|
.optional();
|
|
42
73
|
const miscConfigSchema = z
|
|
@@ -133,6 +164,10 @@ export const whisperConfigSchema = z.object({
|
|
|
133
164
|
.string()
|
|
134
165
|
.optional()
|
|
135
166
|
.describe('Initial prompt (context) prepended to the transcription.'),
|
|
167
|
+
carry_initial_prompt: z
|
|
168
|
+
.boolean()
|
|
169
|
+
.optional()
|
|
170
|
+
.describe('Prepend `initial_prompt` to every decode window instead of only the first. Default false.'),
|
|
136
171
|
language: z
|
|
137
172
|
.string()
|
|
138
173
|
.optional()
|
|
@@ -193,7 +228,7 @@ export const whisperConfigSchema = z.object({
|
|
|
193
228
|
.optional()
|
|
194
229
|
.describe('Voice-activity-detection (VAD) model source; enables VAD when set.')
|
|
195
230
|
});
|
|
196
|
-
const PARAKEET_LANGUAGE_PATTERN = /^(|auto|[a-zA-Z]{2,3}(-[a-zA-Z]{2,4})?)$/;
|
|
231
|
+
const PARAKEET_LANGUAGE_PATTERN = /^(|auto|other|[a-zA-Z]{2,3}(-[a-zA-Z]{2,4})?)$/;
|
|
197
232
|
// === Parakeet (NVIDIA NeMo GGML) engine config ===
|
|
198
233
|
//
|
|
199
234
|
// Backed by the ggml-based qvac-parakeet.cpp engine. A single GGUF
|
|
@@ -208,6 +243,38 @@ const PARAKEET_LANGUAGE_PATTERN = /^(|auto|[a-zA-Z]{2,3}(-[a-zA-Z]{2,4})?)$/;
|
|
|
208
243
|
// `parakeetStreamingRunConfigSchema` in `./transcription.ts` — the
|
|
209
244
|
// per-call schema intentionally drops the `streaming` prefix because
|
|
210
245
|
// every field on it is already namespaced under `parakeetStreamingConfig`.
|
|
246
|
+
// Mirrors the addon's native integer bound for the speaker-attribution durations.
|
|
247
|
+
const NATIVE_INT_MAX = 2147483647;
|
|
248
|
+
/**
|
|
249
|
+
* Speaker-attributed batch transcription: a separate diarization GGUF
|
|
250
|
+
* (Sortformer or Nemotron 3 Diarization) loaded beside the ASR model. The
|
|
251
|
+
* addon diarizes the recording, transcribes each retained turn and reports
|
|
252
|
+
* text per speaker. Batch `transcribe()` only.
|
|
253
|
+
*/
|
|
254
|
+
export const parakeetSpeakerAttributionConfigSchema = z
|
|
255
|
+
.object({
|
|
256
|
+
modelSrc: modelSrcInputSchema.describe('Diarization model (Sortformer or Nemotron 3 Diarization GGUF) loaded beside the ASR model, as `loadModel` takes a `modelSrc`.'),
|
|
257
|
+
mergeSameSpeaker: z
|
|
258
|
+
.boolean()
|
|
259
|
+
.optional()
|
|
260
|
+
.describe('Merge adjacent retained turns assigned to the same speaker. Default true.'),
|
|
261
|
+
minSegmentMs: z
|
|
262
|
+
.number()
|
|
263
|
+
.int()
|
|
264
|
+
.min(0)
|
|
265
|
+
.max(NATIVE_INT_MAX)
|
|
266
|
+
.optional()
|
|
267
|
+
.describe('Minimum padded turn duration, in ms, before it is sent to ASR; `0` keeps short turns. Default 200.'),
|
|
268
|
+
padSegmentMs: z
|
|
269
|
+
.number()
|
|
270
|
+
.int()
|
|
271
|
+
.min(0)
|
|
272
|
+
.max(NATIVE_INT_MAX)
|
|
273
|
+
.optional()
|
|
274
|
+
.describe('Extend the ASR audio slice around each turn, in ms; returned timestamps still describe the diarized turn. Default 0.')
|
|
275
|
+
})
|
|
276
|
+
.strict();
|
|
277
|
+
const PARAKEET_BACKEND_DESCRIPTION = 'Native backend selector: `auto` (default), `cpu`, `cuda`, `vulkan`, `opencl`, `metal`, or an exact ggml device name such as `CUDA0` or `MTL0`. An explicit selection overrides `useGPU` and the load fails if it is unavailable instead of falling back. Applies to the speaker-attribution diarization model too, and reaches `assessModelFit`.';
|
|
211
278
|
export const parakeetRuntimeConfigSchema = z.object({
|
|
212
279
|
maxThreads: z
|
|
213
280
|
.number()
|
|
@@ -215,6 +282,10 @@ export const parakeetRuntimeConfigSchema = z.object({
|
|
|
215
282
|
.optional()
|
|
216
283
|
.describe('CPU threads; `0` defers to hardware concurrency. Default 4.'),
|
|
217
284
|
useGPU: z.boolean().optional().describe('Enable the ggml GPU backend. Default false.'),
|
|
285
|
+
backend: z.string().optional().describe(PARAKEET_BACKEND_DESCRIPTION),
|
|
286
|
+
speakerAttribution: parakeetSpeakerAttributionConfigSchema
|
|
287
|
+
.optional()
|
|
288
|
+
.describe('Transcribe each speaker turn found by a separate diarization model, reporting `speakerId` per segment. Batch `transcribe()` only; cannot be combined with `streaming`.'),
|
|
218
289
|
sampleRate: z.number().int().optional().describe('Input audio sample rate in Hz. Default 16000.'),
|
|
219
290
|
channels: z.number().int().optional().describe('Input audio channel count. Default 1 (mono).'),
|
|
220
291
|
captionEnabled: z
|
|
@@ -247,7 +318,23 @@ export const parakeetRuntimeConfigSchema = z.object({
|
|
|
247
318
|
streamingEnergyVad: z
|
|
248
319
|
.boolean()
|
|
249
320
|
.optional()
|
|
250
|
-
.describe('
|
|
321
|
+
.describe("Run the engine's RMS energy detector on CTC, TDT, RNN-T, and Nemotron streaming sessions and emit `{ type: 'vad', source: 'energy' }` events on each speech/silence transition. Tune it with `streamingEnergyVadThresholdDb`, `streamingEnergyVadWindowMs`, and `streamingEnergyVadHangoverMs`. Default false."),
|
|
322
|
+
streamingEnergyVadThresholdDb: z
|
|
323
|
+
.number()
|
|
324
|
+
.optional()
|
|
325
|
+
.describe('Energy-VAD speech threshold in dBFS RMS; audio above it counts as speech. Default -35.'),
|
|
326
|
+
streamingEnergyVadWindowMs: z
|
|
327
|
+
.number()
|
|
328
|
+
.int()
|
|
329
|
+
.positive()
|
|
330
|
+
.optional()
|
|
331
|
+
.describe('Energy-VAD RMS window in ms; the engine caps it at 1000. Default 30.'),
|
|
332
|
+
streamingEnergyVadHangoverMs: z
|
|
333
|
+
.number()
|
|
334
|
+
.int()
|
|
335
|
+
.nonnegative()
|
|
336
|
+
.optional()
|
|
337
|
+
.describe('Silence the energy VAD requires before leaving the speaking state, in ms. Default 200.'),
|
|
251
338
|
streamingLeftContextMs: z
|
|
252
339
|
.number()
|
|
253
340
|
.int()
|
|
@@ -264,7 +351,7 @@ export const parakeetRuntimeConfigSchema = z.object({
|
|
|
264
351
|
.string()
|
|
265
352
|
.regex(PARAKEET_LANGUAGE_PATTERN)
|
|
266
353
|
.optional()
|
|
267
|
-
.describe('Indic CTC language id
|
|
354
|
+
.describe('Indic CTC language id, Nemotron locale alias (e.g. `hi`, `ta`, `en-US`, `hi-IN`, or `auto`), or the TranscribePsy EU route: `en` for the English trunk, `other` for the non-English adapters, `auto` to route automatically. Empty selects `auto` for Nemotron and TranscribePsy EU and keeps full-vocabulary CTC decoding.'),
|
|
268
355
|
streamingSpeakerVad: z
|
|
269
356
|
.boolean()
|
|
270
357
|
.optional()
|
|
@@ -319,6 +406,33 @@ export const parakeetRuntimeConfigSchema = z.object({
|
|
|
319
406
|
.positive()
|
|
320
407
|
.optional()
|
|
321
408
|
.describe('AOSC: FIFO-overflow pop-out count. Default 144.'),
|
|
409
|
+
// === Load-time prewarm ================================================
|
|
410
|
+
// The pass runs inside `loadModel`, so these have no per-stream
|
|
411
|
+
// counterpart and nothing to reload.
|
|
412
|
+
prewarm: z
|
|
413
|
+
.boolean()
|
|
414
|
+
.optional()
|
|
415
|
+
.describe('Run one synthetic encoder pass while loading so the first request does not pay the GPU shader or kernel compile; Nemotron 3 Diarization also runs one streaming chunk. Default false.'),
|
|
416
|
+
prewarmAudioSeconds: z
|
|
417
|
+
.number()
|
|
418
|
+
.positive()
|
|
419
|
+
.optional()
|
|
420
|
+
.describe('Length of the prewarm pass in seconds of audio; must be greater than 0. Default 1.'),
|
|
421
|
+
// === Long recordings (offline `transcribe`) ============================
|
|
422
|
+
// The offline encoder runs a long input as overlapping windows so memory
|
|
423
|
+
// stays flat however long the recording is, and `cancel()` also lands
|
|
424
|
+
// between windows. Both counts are encoder frames: 80 ms each, 12.5 per
|
|
425
|
+
// second of audio.
|
|
426
|
+
longFormWindowFrames: z
|
|
427
|
+
.number()
|
|
428
|
+
.int()
|
|
429
|
+
.optional()
|
|
430
|
+
.describe("Offline encoder window for long recordings, in 80 ms encoder frames. `0` takes the window the model recommends (TranscribePsy: 750 frames, 60 s, with 94 frames of context on each side; other models: the engine's balanced automatic windows); a negative value encodes the whole input in one pass. Default 0."),
|
|
431
|
+
longFormContextFrames: z
|
|
432
|
+
.number()
|
|
433
|
+
.int()
|
|
434
|
+
.optional()
|
|
435
|
+
.describe('Encoder frames of context shared with each neighbouring long-form window. `0` lets the engine choose; `-1` runs the windows without context.'),
|
|
322
436
|
backendsDir: z
|
|
323
437
|
.string()
|
|
324
438
|
.optional()
|
|
@@ -362,9 +476,22 @@ const legacyParakeetOnnxFieldsShape = LEGACY_PARAKEET_ONNX_MODEL_CONFIG_FIELDS.r
|
|
|
362
476
|
// plugin's `resolveConfig` can raise a structured
|
|
363
477
|
// `LegacyParakeetModelDeprecatedError` instead of a generic Zod error;
|
|
364
478
|
// other unknown keys are still rejected by `.strict()`.
|
|
479
|
+
// The refinement lives on the load schema only: the runtime schema is reused
|
|
480
|
+
// with `.partial()` and `.passthrough()`, which zod refuses on a refined object.
|
|
365
481
|
export const parakeetLoadConfigSchema = parakeetRuntimeConfigSchema
|
|
366
482
|
.extend(legacyParakeetOnnxFieldsShape)
|
|
367
|
-
.strict()
|
|
483
|
+
.strict()
|
|
484
|
+
// Mirrors the addon's load-time check so the conflict is a structured input
|
|
485
|
+
// error instead of a failure once model loading starts.
|
|
486
|
+
.superRefine((config, ctx) => {
|
|
487
|
+
if (config.speakerAttribution !== undefined && config.streaming === true) {
|
|
488
|
+
ctx.addIssue({
|
|
489
|
+
code: 'custom',
|
|
490
|
+
path: ['speakerAttribution'],
|
|
491
|
+
message: 'speakerAttribution uses batch transcribe(); it cannot be combined with streaming'
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
});
|
|
368
495
|
/** MOSS-Transcribe-Diarize processes a whole recording with speaker labels. */
|
|
369
496
|
export const mossTranscribeConfigSchema = z
|
|
370
497
|
.object({
|
|
@@ -377,7 +504,11 @@ export const mossTranscribeConfigSchema = z
|
|
|
377
504
|
useGPU: z
|
|
378
505
|
.boolean()
|
|
379
506
|
.optional()
|
|
380
|
-
.describe('
|
|
507
|
+
.describe('Select a GPU automatically when `backend` is `auto`, including Metal. Default false.'),
|
|
508
|
+
backend: z
|
|
509
|
+
.string()
|
|
510
|
+
.optional()
|
|
511
|
+
.describe('Native backend selector: `auto` (default), `cpu`, `cuda`, `vulkan`, `metal`, or an exact ggml device name such as `CUDA0`. An explicit selection overrides `useGPU` and the load fails if it is unavailable.'),
|
|
381
512
|
backendsDir: z
|
|
382
513
|
.string()
|
|
383
514
|
.optional()
|