@qvac/inference 0.23.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 +60 -28
- package/README.md +3 -1
- 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 +135 -44
- 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 +1 -1
- package/dist/api/completion-stream.js +2 -1
- package/dist/api/delete-cache.d.ts +7 -1
- package/dist/api/delete-cache.js +11 -1
- package/dist/api/diffusion.d.ts +14 -1
- package/dist/api/diffusion.js +14 -1
- package/dist/api/embed.d.ts +82 -29
- package/dist/api/embed.js +64 -18
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +2 -1
- package/dist/api/index.js +2 -1
- package/dist/api/rag.d.ts +1 -1
- package/dist/api/rag.js +1 -1
- package/dist/api/registry.d.ts +16 -6
- package/dist/api/registry.js +32 -9
- 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/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/dispatch.d.ts +10 -4
- package/dist/dispatch.js +65 -15
- package/dist/engine.d.ts +1 -1
- package/dist/errors/index.d.ts +70 -0
- package/dist/errors/index.js +128 -0
- 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 +17 -13
- package/dist/handlers/completion-orchestrate.d.ts +14 -2
- package/dist/handlers/completion-orchestrate.js +164 -22
- package/dist/handlers/delete-cache.d.ts +2 -1
- package/dist/handlers/delete-cache.js +6 -1
- package/dist/handlers/download-asset.js +11 -4
- package/dist/handlers/get-loaded-model-info.js +1 -0
- package/dist/handlers/get-model-info.js +71 -2
- package/dist/handlers/load-model/coreml-sidecars.d.ts +2 -13
- package/dist/handlers/load-model/coreml-sidecars.js +16 -119
- 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 +10 -2
- package/dist/handlers/load-model/download-manager.js +62 -11
- package/dist/handlers/load-model/handler.js +88 -35
- package/dist/handlers/load-model/http.js +327 -205
- package/dist/handlers/load-model/hyperdrive.d.ts +15 -0
- package/dist/handlers/load-model/hyperdrive.js +123 -50
- 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 +5 -0
- package/dist/handlers/load-model/registry-companion-set.js +19 -1
- 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 +4 -2
- package/dist/handlers/load-model/registry-download-utils.js +93 -22
- package/dist/handlers/load-model/registry.d.ts +20 -0
- package/dist/handlers/load-model/registry.js +308 -175
- package/dist/handlers/load-model/resolve.js +4 -1
- package/dist/handlers/load-model/types.d.ts +2 -0
- package/dist/handlers/logging-stream.js +17 -5
- package/dist/handlers/plugin-invoke.js +152 -39
- package/dist/handlers/registry.d.ts +2 -2
- package/dist/handlers/registry.js +105 -28
- 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/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/utils.js +10 -2
- package/dist/model-cache-layout.d.ts +1 -0
- package/dist/model-cache-layout.js +2 -0
- package/dist/model-fit/assess.d.ts +18 -67
- package/dist/model-fit/assess.js +96 -665
- package/dist/model-fit/describe.d.ts +12 -0
- package/dist/model-fit/describe.js +29 -0
- package/dist/model-fit/description/fetch.d.ts +1 -1
- package/dist/model-fit/description/fetch.js +95 -16
- package/dist/model-fit/description/resolve-load.d.ts +5 -3
- package/dist/model-fit/description/resolve-load.js +14 -14
- 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 +15 -33
- package/dist/model-fit/load-check.js +50 -195
- package/dist/model-fit/run/engine.d.ts +12 -72
- package/dist/model-fit/run/engine.js +4 -8
- package/dist/model-fit/run/run.d.ts +10 -7
- package/dist/model-fit/run/run.js +22 -18
- package/dist/model-fit/sum.d.ts +32 -0
- package/dist/model-fit/sum.js +60 -0
- package/dist/models/registry/models.d.ts +865 -128
- package/dist/models/registry/models.js +3737 -2963
- 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/{model-fit/request/engines/asr.js → plugins/builtin/asr-ggml/fit.js} +55 -71
- 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/{model-fit/request/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 +2 -1
- 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 +2 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.d.ts +3 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.js +2 -1
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +143 -18
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +13 -1
- 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 +45 -4
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +8 -6
- package/dist/plugins/builtin/ggml-classification/plugin.d.ts +4 -1
- package/dist/plugins/builtin/ggml-classification/plugin.js +88 -8
- 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 +9 -3
- package/dist/plugins/builtin/ggml-ocr/plugin.js +107 -21
- 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 +3 -3
- package/dist/plugins/builtin/index.d.ts +1 -0
- package/dist/plugins/builtin/index.js +1 -0
- 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 +1 -1
- 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 +1 -1
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +17 -3
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +61 -5
- 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/plugin.d.ts +148 -19
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +26 -9
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +5 -2
- package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +4 -2
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +2 -2
- 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 +194 -4
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +37 -11
- package/dist/plugins/builtin/llamacpp-embedding/transform.d.ts +2 -2
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +23 -2
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.d.ts +3 -1
- package/dist/plugins/builtin/llamacpp-rerank/ops/rerank.js +5 -2
- package/dist/plugins/builtin/llamacpp-rerank/plugin.d.ts +6 -5
- package/dist/plugins/builtin/llamacpp-rerank/plugin.js +2 -3
- package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +30 -3
- package/dist/plugins/builtin/moss-transcribe/plugin.js +5 -3
- 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 +14 -5
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +4 -2
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +205 -9
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +39 -13
- 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 +4 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/diffusion.js +8 -3
- 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 +3 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +4 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +4 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +7 -2
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +79 -16
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +29 -117
- 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 +2 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +22 -9
- 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 +51 -16
- 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 +368 -25
- package/dist/plugins/builtin/tts-ggml/plugin.js +180 -31
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +70 -7
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +8 -6
- 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 +1 -0
- package/dist/plugins/ops/kv-cache-utils.js +6 -2
- package/dist/plugins/ops/load-model.d.ts +2 -0
- package/dist/plugins/ops/load-model.js +33 -16
- package/dist/plugins/ops/transcribe.d.ts +5 -4
- package/dist/plugins/ops/transcribe.js +62 -27
- package/dist/plugins/ops/translate.d.ts +2 -1
- package/dist/plugins/ops/translate.js +4 -1
- package/dist/plugins/ops/unload-model.d.ts +17 -1
- package/dist/plugins/ops/unload-model.js +31 -2
- package/dist/plugins/turbovec-backend.d.ts +1 -1
- package/dist/plugins/turbovec-backend.js +16 -1
- package/dist/profiling/operation-metrics.js +22 -19
- 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 +50 -16
- package/dist/rag/handlers/ingest.js +2 -6
- package/dist/rag/handlers/search.d.ts +10 -1
- package/dist/rag/handlers/search.js +16 -7
- package/dist/rag/rag-operation-manager.d.ts +27 -3
- package/dist/rag/rag-operation-manager.js +10 -27
- package/dist/registry.js +5 -0
- package/dist/resources/collector.d.ts +70 -36
- package/dist/resources/collector.js +8 -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 +4 -1
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/lifecycle.d.ts +6 -4
- package/dist/runtime/lifecycle.js +9 -5
- package/dist/runtime/model-config-utils.js +5 -1
- package/dist/runtime/model-registry.d.ts +28 -4
- package/dist/runtime/model-registry.js +46 -1
- 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 +9 -1
- package/dist/runtime/request-context.js +25 -1
- package/dist/runtime/request-registry.d.ts +55 -7
- package/dist/runtime/request-registry.js +189 -71
- 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/vector-index-backend.d.ts +4 -0
- package/dist/runtime/vector-index-registry.d.ts +21 -0
- package/dist/runtime/vector-index-registry.js +56 -18
- package/dist/schemas/abort-signal.d.ts +8 -0
- package/dist/schemas/abort-signal.js +1 -0
- package/dist/schemas/assess-model-fit.d.ts +132 -282
- package/dist/schemas/assess-model-fit.js +82 -216
- package/dist/schemas/audio-gen.d.ts +278 -24
- package/dist/schemas/audio-gen.js +127 -23
- package/dist/schemas/batch-completion-stream.d.ts +105 -13
- package/dist/schemas/batch-completion-stream.js +8 -4
- package/dist/schemas/bci-config.d.ts +2 -1
- package/dist/schemas/bci.d.ts +54 -3
- package/dist/schemas/bci.js +11 -16
- package/dist/schemas/calc-tokens.d.ts +141 -0
- package/dist/schemas/calc-tokens.js +53 -0
- package/dist/schemas/cancel.d.ts +26 -0
- package/dist/schemas/cancel.js +10 -2
- package/dist/schemas/classification.d.ts +3 -0
- package/dist/schemas/classification.js +6 -2
- package/dist/schemas/common.d.ts +1831 -348
- package/dist/schemas/common.js +18 -2
- package/dist/schemas/completion-event.d.ts +3 -0
- package/dist/schemas/completion-event.js +1 -1
- package/dist/schemas/completion-stream.d.ts +162 -17
- package/dist/schemas/completion-stream.js +83 -13
- package/dist/schemas/config.d.ts +1212 -169
- package/dist/schemas/config.js +9 -13
- package/dist/schemas/decision.d.ts +4 -2
- package/dist/schemas/decision.js +2 -1
- package/dist/schemas/download-asset.d.ts +10 -5
- package/dist/schemas/download-asset.js +3 -6
- package/dist/schemas/embed.d.ts +286 -3
- package/dist/schemas/embed.js +162 -16
- package/dist/schemas/engine-addon-map.d.ts +1 -0
- package/dist/schemas/engine-addon-map.js +1 -0
- package/dist/schemas/errors.d.ts +12 -0
- package/dist/schemas/errors.js +66 -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 +7 -3
- package/dist/schemas/index.js +7 -3
- package/dist/schemas/lifecycle.d.ts +3 -0
- package/dist/schemas/lifecycle.js +13 -6
- package/dist/schemas/llamacpp-config.d.ts +269 -22
- package/dist/schemas/llamacpp-config.js +86 -7
- package/dist/schemas/load-model.d.ts +6418 -1960
- package/dist/schemas/load-model.js +39 -8
- package/dist/schemas/logging-stream.d.ts +1 -0
- package/dist/schemas/logging-stream.js +5 -2
- package/dist/schemas/model-config-schemas.d.ts +542 -116
- package/dist/schemas/model-config-schemas.js +2 -0
- 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 +17 -6
- 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 +10 -6
- package/dist/schemas/model-types.d.ts +8 -4
- package/dist/schemas/model-types.js +1 -0
- package/dist/schemas/ocr.d.ts +9 -4
- package/dist/schemas/ocr.js +6 -2
- package/dist/schemas/plugin.d.ts +62 -6
- package/dist/schemas/plugin.js +26 -4
- package/dist/schemas/profiling.d.ts +32 -32
- package/dist/schemas/rag.d.ts +9 -0
- package/dist/schemas/rag.js +10 -16
- package/dist/schemas/registry.d.ts +30 -10
- package/dist/schemas/registry.js +14 -6
- package/dist/schemas/reload-config.d.ts +41 -6
- package/dist/schemas/reload-config.js +11 -4
- package/dist/schemas/request-base.d.ts +39 -0
- package/dist/schemas/request-base.js +64 -0
- package/dist/schemas/rerank.d.ts +8 -7
- package/dist/schemas/rerank.js +6 -4
- package/dist/schemas/rpc-server.d.ts +3 -0
- package/dist/schemas/rpc-server.js +15 -15
- package/dist/schemas/sdcpp-config.d.ts +90 -20
- package/dist/schemas/sdcpp-config.js +96 -19
- 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 +1343 -271
- 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 +262 -2
- package/dist/schemas/transcription-config.js +122 -6
- package/dist/schemas/transcription.d.ts +93 -6
- package/dist/schemas/transcription.js +98 -21
- package/dist/schemas/translate.d.ts +2 -0
- package/dist/schemas/translate.js +5 -9
- package/dist/schemas/translation-config.d.ts +30 -20
- 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 +3 -3
- package/dist/surface.js +3 -3
- package/dist/utils/addon-responses.d.ts +69 -2
- package/dist/utils/archive.d.ts +7 -0
- package/dist/utils/archive.js +88 -29
- package/dist/utils/asr-events.d.ts +5 -0
- package/dist/utils/asr-events.js +10 -1
- package/dist/utils/cache/auto-history.js +3 -1
- package/dist/utils/cache/layout.d.ts +48 -0
- package/dist/utils/cache/layout.js +190 -0
- package/dist/utils/cache/paths.js +2 -4
- package/dist/utils/cache/types.d.ts +2 -1
- package/dist/utils/checksum.d.ts +5 -0
- package/dist/utils/checksum.js +18 -0
- package/dist/utils/completion-normalizer.js +286 -87
- package/dist/utils/gguf-tensor-extractor.d.ts +0 -6
- package/dist/utils/gguf-tensor-extractor.js +1 -50
- package/dist/utils/shard-utils.d.ts +0 -21
- package/dist/utils/shard-utils.js +12 -62
- package/dist/utils/tool-integration.d.ts +2 -2
- package/dist/utils/tools/defer.d.ts +39 -10
- package/dist/utils/tools/defer.js +72 -17
- package/dist/utils/tools/index.d.ts +1 -1
- package/dist/utils/tools/index.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 +42 -0
- package/dist/utils/tts-stats.js +120 -22
- package/package.json +43 -39
- package/dist/model-fit/classify.d.ts +0 -6
- package/dist/model-fit/classify.js +0 -166
- package/dist/model-fit/description/project.d.ts +0 -27
- package/dist/model-fit/description/project.js +0 -33
- package/dist/model-fit/floor.d.ts +0 -31
- package/dist/model-fit/floor.js +0 -65
- package/dist/model-fit/kv-cache.d.ts +0 -23
- package/dist/model-fit/kv-cache.js +0 -85
- package/dist/model-fit/platform.d.ts +0 -14
- package/dist/model-fit/platform.js +0 -26
- package/dist/model-fit/request/create.d.ts +0 -31
- package/dist/model-fit/request/create.js +0 -61
- package/dist/model-fit/request/engines/asr.d.ts +0 -14
- package/dist/model-fit/request/engines/audiogen.d.ts +0 -8
- package/dist/model-fit/request/engines/diffusion.d.ts +0 -7
- package/dist/model-fit/request/engines/diffusion.js +0 -93
- package/dist/model-fit/request/engines/llama.d.ts +0 -12
- package/dist/model-fit/request/engines/llama.js +0 -44
- package/dist/model-fit/request/engines/nmt.d.ts +0 -8
- package/dist/model-fit/request/engines/nmt.js +0 -11
- package/dist/model-fit/request/engines/ocr.d.ts +0 -9
- package/dist/model-fit/request/engines/ocr.js +0 -13
- package/dist/model-fit/request/engines/tts.d.ts +0 -10
- package/dist/model-fit/request/engines/tts.js +0 -152
- package/dist/models/registry/resource-profiles.d.ts +0 -17
- package/dist/models/registry/resource-profiles.js +0 -5859
- package/dist/schemas/model-resource-profile.d.ts +0 -109
- package/dist/schemas/model-resource-profile.js +0 -80
- /package/dist/model-fit/{request/gpu.d.ts → gpu.d.ts} +0 -0
- /package/dist/model-fit/{request/gpu.js → gpu.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,6 +91,7 @@ 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";
|
|
@@ -102,20 +108,124 @@ export declare const whisperConfigSchema: z.ZodObject<{
|
|
|
102
108
|
"sdcpp-generation": "sdcpp-generation";
|
|
103
109
|
"audiogen-ggml": "audiogen-ggml";
|
|
104
110
|
"ggml-vla": "ggml-vla";
|
|
111
|
+
"ggml-image-embedding": "ggml-image-embedding";
|
|
105
112
|
"ggml-classification": "ggml-classification";
|
|
106
113
|
llm: "llm";
|
|
107
114
|
whisper: "whisper";
|
|
108
115
|
bci: "bci";
|
|
109
116
|
nmt: "nmt";
|
|
110
117
|
parakeet: "parakeet";
|
|
111
|
-
classification: "classification";
|
|
112
118
|
}>, z.ZodLiteral<"vad">]>>;
|
|
113
119
|
}, z.core.$strip>]>>;
|
|
114
120
|
}, z.core.$strip>;
|
|
115
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>;
|
|
116
177
|
export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
117
178
|
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
118
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>>;
|
|
119
229
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
120
230
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
121
231
|
captionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -126,6 +236,9 @@ export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
|
126
236
|
streamingHistoryMs: z.ZodOptional<z.ZodNumber>;
|
|
127
237
|
streamingEmitPartials: z.ZodOptional<z.ZodBoolean>;
|
|
128
238
|
streamingEnergyVad: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
streamingEnergyVadThresholdDb: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
streamingEnergyVadWindowMs: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
streamingEnergyVadHangoverMs: z.ZodOptional<z.ZodNumber>;
|
|
129
242
|
streamingLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
130
243
|
streamingRightLookaheadMs: z.ZodOptional<z.ZodNumber>;
|
|
131
244
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -138,6 +251,8 @@ export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
|
138
251
|
streamingChunkLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
139
252
|
streamingChunkRightContextMs: z.ZodOptional<z.ZodNumber>;
|
|
140
253
|
streamingSpkCacheUpdatePeriod: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
prewarm: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
+
prewarmAudioSeconds: z.ZodOptional<z.ZodNumber>;
|
|
141
256
|
longFormWindowFrames: z.ZodOptional<z.ZodNumber>;
|
|
142
257
|
longFormContextFrames: z.ZodOptional<z.ZodNumber>;
|
|
143
258
|
backendsDir: z.ZodOptional<z.ZodString>;
|
|
@@ -146,6 +261,55 @@ export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
|
146
261
|
export declare const parakeetConfigSchema: z.ZodObject<{
|
|
147
262
|
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
148
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>>;
|
|
149
313
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
150
314
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
151
315
|
captionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -156,6 +320,9 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
156
320
|
streamingHistoryMs: z.ZodOptional<z.ZodNumber>;
|
|
157
321
|
streamingEmitPartials: z.ZodOptional<z.ZodBoolean>;
|
|
158
322
|
streamingEnergyVad: z.ZodOptional<z.ZodBoolean>;
|
|
323
|
+
streamingEnergyVadThresholdDb: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
streamingEnergyVadWindowMs: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
streamingEnergyVadHangoverMs: z.ZodOptional<z.ZodNumber>;
|
|
159
326
|
streamingLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
160
327
|
streamingRightLookaheadMs: z.ZodOptional<z.ZodNumber>;
|
|
161
328
|
language: z.ZodOptional<z.ZodString>;
|
|
@@ -168,6 +335,8 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
168
335
|
streamingChunkLeftContextMs: z.ZodOptional<z.ZodNumber>;
|
|
169
336
|
streamingChunkRightContextMs: z.ZodOptional<z.ZodNumber>;
|
|
170
337
|
streamingSpkCacheUpdatePeriod: z.ZodOptional<z.ZodNumber>;
|
|
338
|
+
prewarm: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
+
prewarmAudioSeconds: z.ZodOptional<z.ZodNumber>;
|
|
171
340
|
longFormWindowFrames: z.ZodOptional<z.ZodNumber>;
|
|
172
341
|
longFormContextFrames: z.ZodOptional<z.ZodNumber>;
|
|
173
342
|
backendsDir: z.ZodOptional<z.ZodString>;
|
|
@@ -177,12 +346,103 @@ export type ParakeetRuntimeConfig = z.infer<typeof parakeetRuntimeConfigSchema>;
|
|
|
177
346
|
export type ParakeetConfig = z.infer<typeof parakeetConfigSchema>;
|
|
178
347
|
export declare const LEGACY_PARAKEET_ONNX_MODEL_CONFIG_FIELDS: readonly ["parakeetEncoderSrc", "parakeetDecoderSrc", "parakeetVocabSrc", "parakeetPreprocessorSrc", "parakeetCtcModelSrc", "parakeetTokenizerSrc", "parakeetSortformerSrc", "parakeetModelSrc", "modelType"];
|
|
179
348
|
export declare const parakeetLoadConfigSchema: z.ZodObject<{
|
|
180
|
-
|
|
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>;
|
|
181
440
|
}, z.core.$strict>;
|
|
182
441
|
/** MOSS-Transcribe-Diarize processes a whole recording with speaker labels. */
|
|
183
442
|
export declare const mossTranscribeConfigSchema: z.ZodObject<{
|
|
184
443
|
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
185
444
|
useGPU: z.ZodOptional<z.ZodBoolean>;
|
|
445
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
186
446
|
backendsDir: z.ZodOptional<z.ZodString>;
|
|
187
447
|
}, z.core.$strict>;
|
|
188
448
|
export type MossTranscribeConfig = z.infer<typeof mossTranscribeConfigSchema>;
|
|
@@ -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,18 @@ 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.'),
|
|
322
421
|
// === Long recordings (offline `transcribe`) ============================
|
|
323
422
|
// The offline encoder runs a long input as overlapping windows so memory
|
|
324
423
|
// stays flat however long the recording is, and `cancel()` also lands
|
|
@@ -377,9 +476,22 @@ const legacyParakeetOnnxFieldsShape = LEGACY_PARAKEET_ONNX_MODEL_CONFIG_FIELDS.r
|
|
|
377
476
|
// plugin's `resolveConfig` can raise a structured
|
|
378
477
|
// `LegacyParakeetModelDeprecatedError` instead of a generic Zod error;
|
|
379
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.
|
|
380
481
|
export const parakeetLoadConfigSchema = parakeetRuntimeConfigSchema
|
|
381
482
|
.extend(legacyParakeetOnnxFieldsShape)
|
|
382
|
-
.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
|
+
});
|
|
383
495
|
/** MOSS-Transcribe-Diarize processes a whole recording with speaker labels. */
|
|
384
496
|
export const mossTranscribeConfigSchema = z
|
|
385
497
|
.object({
|
|
@@ -392,7 +504,11 @@ export const mossTranscribeConfigSchema = z
|
|
|
392
504
|
useGPU: z
|
|
393
505
|
.boolean()
|
|
394
506
|
.optional()
|
|
395
|
-
.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.'),
|
|
396
512
|
backendsDir: z
|
|
397
513
|
.string()
|
|
398
514
|
.optional()
|