@qvac/inference 0.18.2 → 0.19.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 +11 -2
- package/README.md +1 -5
- package/dist/api/assess-model-fit.d.ts +16 -0
- package/dist/api/assess-model-fit.js +27 -0
- package/dist/api/audio-gen.d.ts +4 -4
- package/dist/api/audio-gen.js +17 -6
- package/dist/api/completion-stream.d.ts +1 -1
- package/dist/api/completion-stream.js +1 -1
- package/dist/api/download-asset.d.ts +1 -1
- package/dist/api/download-asset.js +2 -2
- package/dist/api/finetune.js +1 -1
- package/dist/api/get-loaded-model-info.d.ts +6 -10
- package/dist/api/get-loaded-model-info.js +6 -10
- package/dist/api/heartbeat.d.ts +5 -22
- package/dist/api/heartbeat.js +6 -23
- package/dist/api/index.d.ts +36 -35
- package/dist/api/index.js +35 -35
- package/dist/api/load-model.d.ts +5 -1
- package/dist/api/load-model.js +3 -5
- package/dist/api/logging-stream-registry.js +1 -1
- package/dist/api/resume.d.ts +0 -3
- package/dist/api/resume.js +0 -3
- package/dist/api/subscribe-logs.js +1 -1
- package/dist/api/suspend.d.ts +0 -4
- package/dist/api/suspend.js +0 -4
- package/dist/api/translate.d.ts +3 -1
- package/dist/api/translate.js +16 -8
- package/dist/api/unload-model.js +3 -5
- package/dist/api/video-request.d.ts +207 -0
- package/dist/api/video-request.js +18 -0
- package/dist/api/video.d.ts +22 -2
- package/dist/api/video.js +25 -15
- package/dist/api/vla-helpers.d.ts +1 -2
- package/dist/api/vla-helpers.js +1 -2
- package/dist/api/vla.js +1 -1
- package/dist/api/world-result.d.ts +71 -0
- package/dist/api/world-result.js +293 -0
- package/dist/api/world.d.ts +143 -0
- package/dist/api/world.js +71 -0
- 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.js +15 -28
- package/dist/errors/index.d.ts +35 -31
- package/dist/errors/index.js +66 -56
- package/dist/handlers/assess-model-fit.d.ts +10 -0
- package/dist/handlers/assess-model-fit.js +75 -0
- package/dist/handlers/cancelHandler.js +1 -1
- package/dist/handlers/completion-orchestrate.js +1 -1
- package/dist/handlers/download-asset.js +6 -5
- package/dist/handlers/finetune.js +1 -1
- package/dist/handlers/get-loaded-model-info.js +0 -12
- package/dist/handlers/get-model-info.js +1 -1
- package/dist/handlers/get-system-resources.js +8 -0
- package/dist/handlers/load-model/download-manager.d.ts +1 -1
- package/dist/handlers/load-model/download-stats.d.ts +3 -3
- package/dist/handlers/load-model/download-stats.js +5 -5
- package/dist/handlers/load-model/handler.js +6 -8
- package/dist/handlers/load-model/http-verify.d.ts +20 -0
- package/dist/handlers/load-model/http-verify.js +54 -0
- package/dist/handlers/load-model/http.d.ts +12 -2
- package/dist/handlers/load-model/http.js +119 -230
- package/dist/handlers/load-model/hyperdrive.d.ts +1 -1
- package/dist/handlers/load-model/hyperdrive.js +1 -1
- 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-companion-set.d.ts +1 -1
- package/dist/handlers/load-model/registry-companion-set.js +1 -1
- package/dist/handlers/load-model/registry-download-utils.d.ts +3 -3
- package/dist/handlers/load-model/registry-download-utils.js +2 -2
- package/dist/handlers/load-model/registry.d.ts +2 -2
- package/dist/handlers/load-model/registry.js +4 -4
- package/dist/handlers/load-model/resolve-session.d.ts +8 -1
- package/dist/handlers/load-model/resolve-session.js +12 -9
- package/dist/handlers/load-model/resolve.d.ts +4 -4
- package/dist/handlers/load-model/resolve.js +18 -16
- package/dist/handlers/load-model/safe-fetch.d.ts +44 -0
- package/dist/handlers/load-model/safe-fetch.js +143 -0
- package/dist/handlers/load-model/types.d.ts +9 -0
- package/dist/handlers/plugin-dispatch.js +1 -4
- package/dist/handlers/plugin-invoke.js +1 -4
- package/dist/handlers/types.d.ts +0 -2
- package/dist/handlers/unload-model.js +1 -4
- 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 +2 -2
- package/dist/models/registry/index.d.ts +1 -1
- package/dist/models/registry/index.js +2 -2
- package/dist/models/registry/models.d.ts +250 -0
- package/dist/models/registry/models.js +2071 -1806
- package/dist/models/registry/resource-profiles.d.ts +18 -0
- package/dist/models/registry/resource-profiles.js +4934 -0
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +14 -0
- package/dist/plugins/builtin/audiogen-ggml/config.js +23 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +47 -5
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +134 -4
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +47 -28
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +1 -1
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +3 -3
- package/dist/plugins/builtin/ggml-classification/plugin.js +1 -1
- package/dist/plugins/builtin/ggml-ocr/plugin.js +2 -2
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +1 -1
- package/dist/plugins/builtin/ggml-vla/plugin.js +3 -3
- package/dist/plugins/builtin/index.d.ts +12 -12
- package/dist/plugins/builtin/index.js +12 -12
- package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +2 -2
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +37 -26
- package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.d.ts +12 -11
- package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.js +133 -41
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +7 -1
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +26 -4
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +19 -8
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +10 -13
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +4 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +13 -2
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +2 -2
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +2 -2
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +3 -3
- package/dist/plugins/builtin/sdcpp-generation/ops/upscale.js +1 -1
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +32 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +126 -0
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +820 -0
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +153 -4
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +134 -13
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +1 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +1 -1
- package/dist/plugins/builtin/tts-ggml/plugin.js +2 -2
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +2 -2
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +3 -3
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +2 -2
- package/dist/plugins/ops/kv-cache-utils.js +1 -1
- package/dist/plugins/ops/load-model.js +1 -1
- package/dist/plugins/ops/transcribe.js +2 -2
- package/dist/plugins/ops/translate.js +4 -12
- package/dist/plugins/ops/unload-model.js +19 -21
- package/dist/plugins/registry.d.ts +1 -0
- package/dist/plugins/registry.js +12 -0
- 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/envelope.d.ts +0 -1
- package/dist/profiling/envelope.js +0 -10
- package/dist/profiling/events.d.ts +2 -3
- package/dist/profiling/events.js +2 -9
- package/dist/profiling/exporters.d.ts +1 -1
- package/dist/profiling/exporters.js +3 -3
- package/dist/profiling/index.d.ts +13 -14
- package/dist/profiling/index.js +12 -13
- package/dist/profiling/operation-metrics.d.ts +1 -1
- package/dist/profiling/operation-metrics.js +35 -2
- package/dist/profiling/operation-wrappers.js +12 -15
- package/dist/profiling/profiler.d.ts +1 -2
- package/dist/profiling/profiler.js +7 -26
- package/dist/profiling/types.d.ts +1 -1
- package/dist/rag/handler.js +1 -1
- 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 +2 -6
- package/dist/rag/handlers/ingest.js +1 -1
- 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.js +1 -1
- package/dist/rag/index.d.ts +11 -11
- package/dist/rag/index.js +11 -11
- package/dist/rag/rag-workspace-manager.d.ts +4 -2
- package/dist/rag/rag-workspace-manager.js +268 -15
- package/dist/registry.js +8 -58
- package/dist/resources/collector.d.ts +3 -1
- package/dist/resources/collector.js +91 -9
- package/dist/resources/instance.d.ts +1 -1
- package/dist/resources/instance.js +1 -1
- package/dist/resources/model-fit/assess.d.ts +36 -0
- package/dist/resources/model-fit/assess.js +578 -0
- package/dist/resources/model-fit/calibration/darwin-arm64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/darwin-arm64.js +36 -0
- package/dist/resources/model-fit/calibration/darwin-x64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/darwin-x64.js +38 -0
- package/dist/resources/model-fit/calibration/fit.d.ts +73 -0
- package/dist/resources/model-fit/calibration/fit.js +152 -0
- package/dist/resources/model-fit/calibration/index.d.ts +37 -0
- package/dist/resources/model-fit/calibration/index.js +75 -0
- package/dist/resources/model-fit/calibration/linux-arm64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/linux-arm64.js +38 -0
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.d.ts +8 -0
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.js +39 -0
- package/dist/resources/model-fit/calibration/linux-x64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/linux-x64.js +38 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.d.ts +8 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.js +39 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.d.ts +8 -0
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.js +36 -0
- package/dist/resources/model-fit/calibration/win32-x64.d.ts +8 -0
- package/dist/resources/model-fit/calibration/win32-x64.js +38 -0
- package/dist/resources/model-fit/estimators/llm.d.ts +45 -0
- package/dist/resources/model-fit/estimators/llm.js +220 -0
- package/dist/resources/model-fit/estimators/whisper.d.ts +10 -0
- package/dist/resources/model-fit/estimators/whisper.js +77 -0
- package/dist/resources/model-fit/types.d.ts +120 -0
- package/dist/resources/model-fit/types.js +1 -0
- package/dist/resources/native.d.ts +1 -1
- package/dist/resources/native.js +14 -0
- package/dist/resources/normalize.d.ts +1 -1
- package/dist/resources/types.d.ts +16 -0
- package/dist/runtime/index.d.ts +5 -5
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/lifecycle.js +5 -7
- package/dist/runtime/model-registry.d.ts +0 -14
- package/dist/runtime/model-registry.js +17 -40
- package/dist/runtime/registry-client.js +1 -1
- package/dist/runtime/request-context.d.ts +3 -3
- package/dist/runtime/request-context.js +13 -1
- package/dist/runtime/request-registry.d.ts +1 -1
- package/dist/runtime/request-registry.js +4 -5
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/state.js +18 -3
- package/dist/schemas/assess-model-fit.d.ts +271 -0
- package/dist/schemas/assess-model-fit.js +153 -0
- package/dist/schemas/audio-gen.d.ts +434 -4
- package/dist/schemas/audio-gen.js +131 -19
- package/dist/schemas/batch-completion-stream.d.ts +2 -2
- package/dist/schemas/batch-completion-stream.js +3 -3
- package/dist/schemas/bci-config.js +73 -27
- package/dist/schemas/bci.d.ts +2 -2
- package/dist/schemas/bci.js +5 -5
- package/dist/schemas/cancel.d.ts +5 -0
- package/dist/schemas/cancel.js +1 -0
- package/dist/schemas/classification.js +13 -6
- package/dist/schemas/common.d.ts +662 -331
- package/dist/schemas/common.js +33 -31
- package/dist/schemas/completion-event.d.ts +2 -2
- package/dist/schemas/completion-event.js +1 -1
- package/dist/schemas/completion-stream.d.ts +1 -5
- package/dist/schemas/completion-stream.js +4 -8
- package/dist/schemas/config.d.ts +640 -18
- package/dist/schemas/config.js +50 -8
- package/dist/schemas/download-asset.d.ts +19 -1
- package/dist/schemas/download-asset.js +20 -4
- package/dist/schemas/engine-addon-map.d.ts +1 -1
- package/dist/schemas/engine-addon-map.js +3 -3
- package/dist/schemas/error.d.ts +2 -2
- package/dist/schemas/error.js +2 -2
- package/dist/schemas/errors.d.ts +2 -6
- package/dist/schemas/errors.js +30 -40
- package/dist/schemas/heartbeat.d.ts +10 -0
- package/dist/schemas/heartbeat.js +8 -0
- package/dist/schemas/index.d.ts +46 -44
- package/dist/schemas/index.js +45 -43
- package/dist/schemas/llamacpp-config.d.ts +32 -10
- package/dist/schemas/llamacpp-config.js +11 -8
- package/dist/schemas/load-model.d.ts +2933 -1948
- package/dist/schemas/load-model.js +52 -52
- package/dist/schemas/mcp-adapter.d.ts +1 -1
- package/dist/schemas/model-config-schemas.d.ts +2354 -0
- package/dist/schemas/model-config-schemas.js +46 -0
- package/dist/schemas/model-info.d.ts +10 -20
- package/dist/schemas/model-info.js +4 -25
- package/dist/schemas/model-ops.d.ts +0 -1
- package/dist/schemas/model-ops.js +1 -2
- package/dist/schemas/model-resource-profile.d.ts +109 -0
- package/dist/schemas/model-resource-profile.js +83 -0
- package/dist/schemas/model-src-utils.d.ts +1 -0
- package/dist/schemas/model-src-utils.js +33 -13
- package/dist/schemas/ocr.js +48 -13
- package/dist/schemas/path-validation.js +8 -2
- package/dist/schemas/plugin.d.ts +14 -1
- package/dist/schemas/plugin.js +11 -0
- package/dist/schemas/profiling.d.ts +138 -43
- package/dist/schemas/profiling.js +1 -22
- package/dist/schemas/rag.js +1 -1
- package/dist/schemas/registry.js +1 -1
- package/dist/schemas/reload-config.d.ts +0 -2
- package/dist/schemas/reload-config.js +2 -3
- package/dist/schemas/sdcpp-config.d.ts +344 -4
- package/dist/schemas/sdcpp-config.js +504 -17
- package/dist/schemas/system-resources.d.ts +138 -0
- package/dist/schemas/system-resources.js +3 -1
- package/dist/schemas/text-to-speech.js +183 -76
- package/dist/schemas/transcription-config.js +253 -85
- package/dist/schemas/transcription.d.ts +3 -3
- package/dist/schemas/translate.d.ts +2 -2
- package/dist/schemas/translate.js +1 -1
- package/dist/schemas/translation-config.js +53 -25
- package/dist/schemas/vla.d.ts +1 -1
- package/dist/selection.d.ts +1 -5
- package/dist/selection.js +2 -6
- package/dist/surface.d.ts +1 -1
- package/dist/utils/aggregate-events.d.ts +1 -1
- package/dist/utils/aggregate-events.js +2 -2
- package/dist/utils/archive.js +2 -2
- package/dist/utils/audio-input.js +1 -1
- package/dist/utils/cache/auto-history.d.ts +1 -1
- package/dist/utils/cache/auto-history.js +1 -1
- package/dist/utils/cache/paths.js +5 -5
- package/dist/utils/completion-normalizer.js +1 -1
- package/dist/utils/gguf-tensor-extractor.js +1 -1
- package/dist/utils/image-dimensions.d.ts +26 -0
- package/dist/utils/image-dimensions.js +46 -0
- package/dist/utils/index.d.ts +13 -10
- package/dist/utils/index.js +13 -10
- package/dist/utils/mcp-adapter.d.ts +1 -1
- package/dist/utils/mcp-adapter.js +1 -1
- package/dist/utils/path-sanitize.d.ts +7 -0
- package/dist/utils/path-sanitize.js +36 -0
- package/dist/utils/path-security.d.ts +0 -7
- package/dist/utils/path-security.js +1 -36
- package/dist/utils/shard-utils.js +3 -3
- package/dist/utils/tool-integration.js +1 -1
- package/dist/utils/tools/dialect.js +1 -1
- package/dist/utils/tools/index.d.ts +2 -2
- package/dist/utils/tools/index.js +2 -2
- 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 +3 -3
- package/dist/utils/url-security.d.ts +17 -0
- package/dist/utils/url-security.js +75 -0
- package/package.json +31 -26
- package/dist/api/provide.d.ts +0 -23
- package/dist/api/provide.js +0 -32
- package/dist/api/stop-provider.d.ts +0 -20
- package/dist/api/stop-provider.js +0 -30
- package/dist/p2p/cancel-delegated.d.ts +0 -3
- package/dist/p2p/cancel-delegated.js +0 -64
- package/dist/p2p/completion-stream-delegated.d.ts +0 -4
- package/dist/p2p/completion-stream-delegated.js +0 -51
- package/dist/p2p/delegate-client.d.ts +0 -9
- package/dist/p2p/delegate-client.js +0 -219
- package/dist/p2p/delegate-connect-diagnostics.d.ts +0 -8
- package/dist/p2p/delegate-connect-diagnostics.js +0 -38
- package/dist/p2p/delegate-transport.d.ts +0 -18
- package/dist/p2p/delegate-transport.js +0 -237
- package/dist/p2p/error-handlers.d.ts +0 -4
- package/dist/p2p/error-handlers.js +0 -31
- package/dist/p2p/handle-request.d.ts +0 -2
- package/dist/p2p/handle-request.js +0 -171
- package/dist/p2p/handler-utils.d.ts +0 -19
- package/dist/p2p/handler-utils.js +0 -180
- package/dist/p2p/heartbeat-delegated.d.ts +0 -3
- package/dist/p2p/heartbeat-delegated.js +0 -32
- package/dist/p2p/load-model-delegated.d.ts +0 -6
- package/dist/p2p/load-model-delegated.js +0 -132
- package/dist/p2p/progress-throttle.d.ts +0 -7
- package/dist/p2p/progress-throttle.js +0 -47
- package/dist/p2p/provideHandler/connection.d.ts +0 -2
- package/dist/p2p/provideHandler/connection.js +0 -38
- package/dist/p2p/provideHandler/handler.d.ts +0 -2
- package/dist/p2p/provideHandler/handler.js +0 -66
- package/dist/p2p/provideHandler/proxy.d.ts +0 -2
- package/dist/p2p/provideHandler/proxy.js +0 -24
- package/dist/p2p/provideHandler.d.ts +0 -1
- package/dist/p2p/provideHandler.js +0 -2
- package/dist/p2p/rpc-utils.d.ts +0 -4
- package/dist/p2p/rpc-utils.js +0 -8
- package/dist/p2p/stopProvideHandler.d.ts +0 -2
- package/dist/p2p/stopProvideHandler.js +0 -29
- package/dist/p2p/swarm.d.ts +0 -9
- package/dist/p2p/swarm.js +0 -103
- package/dist/p2p/transport-selector.d.ts +0 -2
- package/dist/p2p/transport-selector.js +0 -18
- package/dist/p2p/unload-model-delegated.d.ts +0 -2
- package/dist/p2p/unload-model-delegated.js +0 -31
- package/dist/profiling/delegation-profiler.d.ts +0 -31
- package/dist/profiling/delegation-profiler.js +0 -155
- package/dist/schemas/delegate.d.ts +0 -29
- package/dist/schemas/delegate.js +0 -40
- package/dist/schemas/provide.d.ts +0 -50
- package/dist/schemas/provide.js +0 -32
|
@@ -1866,6 +1866,52 @@ export declare const systemResourceSampleSchema: z.ZodObject<{
|
|
|
1866
1866
|
status: z.ZodLiteral<"failed">;
|
|
1867
1867
|
reason: z.ZodOptional<z.ZodString>;
|
|
1868
1868
|
}, z.core.$strip>], "status">;
|
|
1869
|
+
processUsedBytes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1870
|
+
status: z.ZodLiteral<"supported">;
|
|
1871
|
+
value: z.ZodNumber;
|
|
1872
|
+
provenance: z.ZodObject<{
|
|
1873
|
+
source: z.ZodString;
|
|
1874
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
1875
|
+
device: "device";
|
|
1876
|
+
system: "system";
|
|
1877
|
+
process: "process";
|
|
1878
|
+
budget: "budget";
|
|
1879
|
+
"shared-system": "shared-system";
|
|
1880
|
+
}>>;
|
|
1881
|
+
}, z.core.$strip>;
|
|
1882
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1883
|
+
status: z.ZodLiteral<"unavailable">;
|
|
1884
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1886
|
+
status: z.ZodLiteral<"unverified">;
|
|
1887
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1889
|
+
status: z.ZodLiteral<"failed">;
|
|
1890
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1891
|
+
}, z.core.$strip>], "status">;
|
|
1892
|
+
processAvailableBytes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1893
|
+
status: z.ZodLiteral<"supported">;
|
|
1894
|
+
value: z.ZodNumber;
|
|
1895
|
+
provenance: z.ZodObject<{
|
|
1896
|
+
source: z.ZodString;
|
|
1897
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
1898
|
+
device: "device";
|
|
1899
|
+
system: "system";
|
|
1900
|
+
process: "process";
|
|
1901
|
+
budget: "budget";
|
|
1902
|
+
"shared-system": "shared-system";
|
|
1903
|
+
}>>;
|
|
1904
|
+
}, z.core.$strip>;
|
|
1905
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1906
|
+
status: z.ZodLiteral<"unavailable">;
|
|
1907
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1908
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1909
|
+
status: z.ZodLiteral<"unverified">;
|
|
1910
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1911
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1912
|
+
status: z.ZodLiteral<"failed">;
|
|
1913
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1914
|
+
}, z.core.$strip>], "status">;
|
|
1869
1915
|
}, z.core.$strip>;
|
|
1870
1916
|
gpus: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1871
1917
|
status: z.ZodLiteral<"supported">;
|
|
@@ -2803,6 +2849,52 @@ export declare const systemResourcesSchema: z.ZodObject<{
|
|
|
2803
2849
|
status: z.ZodLiteral<"failed">;
|
|
2804
2850
|
reason: z.ZodOptional<z.ZodString>;
|
|
2805
2851
|
}, z.core.$strip>], "status">;
|
|
2852
|
+
processUsedBytes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2853
|
+
status: z.ZodLiteral<"supported">;
|
|
2854
|
+
value: z.ZodNumber;
|
|
2855
|
+
provenance: z.ZodObject<{
|
|
2856
|
+
source: z.ZodString;
|
|
2857
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
2858
|
+
device: "device";
|
|
2859
|
+
system: "system";
|
|
2860
|
+
process: "process";
|
|
2861
|
+
budget: "budget";
|
|
2862
|
+
"shared-system": "shared-system";
|
|
2863
|
+
}>>;
|
|
2864
|
+
}, z.core.$strip>;
|
|
2865
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2866
|
+
status: z.ZodLiteral<"unavailable">;
|
|
2867
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2868
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2869
|
+
status: z.ZodLiteral<"unverified">;
|
|
2870
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2871
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2872
|
+
status: z.ZodLiteral<"failed">;
|
|
2873
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2874
|
+
}, z.core.$strip>], "status">;
|
|
2875
|
+
processAvailableBytes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2876
|
+
status: z.ZodLiteral<"supported">;
|
|
2877
|
+
value: z.ZodNumber;
|
|
2878
|
+
provenance: z.ZodObject<{
|
|
2879
|
+
source: z.ZodString;
|
|
2880
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
2881
|
+
device: "device";
|
|
2882
|
+
system: "system";
|
|
2883
|
+
process: "process";
|
|
2884
|
+
budget: "budget";
|
|
2885
|
+
"shared-system": "shared-system";
|
|
2886
|
+
}>>;
|
|
2887
|
+
}, z.core.$strip>;
|
|
2888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2889
|
+
status: z.ZodLiteral<"unavailable">;
|
|
2890
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2891
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2892
|
+
status: z.ZodLiteral<"unverified">;
|
|
2893
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2894
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2895
|
+
status: z.ZodLiteral<"failed">;
|
|
2896
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2897
|
+
}, z.core.$strip>], "status">;
|
|
2806
2898
|
}, z.core.$strip>;
|
|
2807
2899
|
gpus: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2808
2900
|
status: z.ZodLiteral<"supported">;
|
|
@@ -3748,6 +3840,52 @@ export declare const getSystemResourcesResponseSchema: z.ZodObject<{
|
|
|
3748
3840
|
status: z.ZodLiteral<"failed">;
|
|
3749
3841
|
reason: z.ZodOptional<z.ZodString>;
|
|
3750
3842
|
}, z.core.$strip>], "status">;
|
|
3843
|
+
processUsedBytes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3844
|
+
status: z.ZodLiteral<"supported">;
|
|
3845
|
+
value: z.ZodNumber;
|
|
3846
|
+
provenance: z.ZodObject<{
|
|
3847
|
+
source: z.ZodString;
|
|
3848
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
3849
|
+
device: "device";
|
|
3850
|
+
system: "system";
|
|
3851
|
+
process: "process";
|
|
3852
|
+
budget: "budget";
|
|
3853
|
+
"shared-system": "shared-system";
|
|
3854
|
+
}>>;
|
|
3855
|
+
}, z.core.$strip>;
|
|
3856
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3857
|
+
status: z.ZodLiteral<"unavailable">;
|
|
3858
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3859
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3860
|
+
status: z.ZodLiteral<"unverified">;
|
|
3861
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3862
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3863
|
+
status: z.ZodLiteral<"failed">;
|
|
3864
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3865
|
+
}, z.core.$strip>], "status">;
|
|
3866
|
+
processAvailableBytes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3867
|
+
status: z.ZodLiteral<"supported">;
|
|
3868
|
+
value: z.ZodNumber;
|
|
3869
|
+
provenance: z.ZodObject<{
|
|
3870
|
+
source: z.ZodString;
|
|
3871
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
3872
|
+
device: "device";
|
|
3873
|
+
system: "system";
|
|
3874
|
+
process: "process";
|
|
3875
|
+
budget: "budget";
|
|
3876
|
+
"shared-system": "shared-system";
|
|
3877
|
+
}>>;
|
|
3878
|
+
}, z.core.$strip>;
|
|
3879
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3880
|
+
status: z.ZodLiteral<"unavailable">;
|
|
3881
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3882
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3883
|
+
status: z.ZodLiteral<"unverified">;
|
|
3884
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3886
|
+
status: z.ZodLiteral<"failed">;
|
|
3887
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3888
|
+
}, z.core.$strip>], "status">;
|
|
3751
3889
|
}, z.core.$strip>;
|
|
3752
3890
|
gpus: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3753
3891
|
status: z.ZodLiteral<"supported">;
|
|
@@ -130,7 +130,9 @@ export const systemResourceSampleSchema = z.object({
|
|
|
130
130
|
cpu: resourceMetricSchema(utilizationSchema),
|
|
131
131
|
memory: z.object({
|
|
132
132
|
usedBytes: resourceMetricSchema(nonnegativeNumberSchema),
|
|
133
|
-
totalBytes: resourceMetricSchema(nonnegativeNumberSchema)
|
|
133
|
+
totalBytes: resourceMetricSchema(nonnegativeNumberSchema),
|
|
134
|
+
processUsedBytes: resourceMetricSchema(nonnegativeNumberSchema).describe('This process’s resident footprint (RSS). Process-scoped, unlike usedBytes.'),
|
|
135
|
+
processAvailableBytes: resourceMetricSchema(nonnegativeNumberSchema).describe('How much more this process may allocate before the OS intervenes. On iOS this is os_proc_available_memory() — the limit jetsam enforces. Unavailable where no per-process limit is exposed.')
|
|
134
136
|
}),
|
|
135
137
|
gpus: resourceMetricSchema(z.array(gpuResourceSampleSchema))
|
|
136
138
|
});
|
|
@@ -142,24 +142,60 @@ const ttsPositiveIntegerSchema = ttsIntegerSchema.positive();
|
|
|
142
142
|
const ttsInt32Schema = ttsIntegerSchema.min(-2147483648).max(2147483647);
|
|
143
143
|
const ttsNonNegativeInt32Schema = ttsInt32Schema.nonnegative();
|
|
144
144
|
const ttsPositiveInt32Schema = ttsInt32Schema.positive();
|
|
145
|
+
// Describe text shared by fields repeated across engine arms.
|
|
146
|
+
const TTS_USE_GPU_DESC = 'Route inference through a GPU backend (Metal / CUDA / Vulkan / OpenCL) when available. Default false.';
|
|
147
|
+
const TTS_SEED_DESC = 'RNG seed for the engine’s stochastic stages (e.g. Chatterbox CFM/SineGen, Supertonic latent generation).';
|
|
148
|
+
const TTS_THREADS_DESC = 'CPU thread count; overrides the hardware default.';
|
|
149
|
+
const TTS_NGPU_LAYERS_DESC = 'Model layers to offload to the GPU backend (99 = all). Only relevant when `useGPU` is set.';
|
|
150
|
+
const TTS_STREAM_CHUNK_TOKENS_DESC = 'Speech tokens per native streaming chunk; 0 disables native chunk streaming.';
|
|
151
|
+
const TTS_STREAM_FIRST_CHUNK_TOKENS_DESC = 'Smaller first streaming chunk for lower first-audio latency.';
|
|
152
|
+
const TTS_TEMPERATURE_DESC = 'Sampling temperature; unset defers to the engine default (Parler 1.0, Audio8 0.7).';
|
|
153
|
+
const TTS_TOP_K_DESC = 'Top-k sampling cutoff; unset defers to the engine default (50).';
|
|
154
|
+
const TTS_TOP_P_DESC = 'Top-p (nucleus) sampling cutoff (0 < p ≤ 1); unset defers to the engine default.';
|
|
155
|
+
const TTS_MAX_FRAMES_DESC = 'Generation-length cap in decoder frames; 0 = engine default (Parler ≈86 frames/s, Audio8 ≈21.5).';
|
|
145
156
|
// Desired output sample rate in Hz. Matches the @qvac/tts-ggml addon's
|
|
146
157
|
// accepted range; omit to keep the engine's native rate (or 48 kHz when the
|
|
147
158
|
// LavaSR enhancer is active). Supertonic-only: the Chatterbox engine does not
|
|
148
159
|
// yet resample its output, so the field is not exposed on that config.
|
|
149
|
-
const ttsOutputSampleRateSchema = ttsIntegerSchema
|
|
160
|
+
const ttsOutputSampleRateSchema = ttsIntegerSchema
|
|
161
|
+
.min(8000)
|
|
162
|
+
.max(192000)
|
|
163
|
+
.describe('Desired output sample rate in Hz (8000–192000); omit to keep the engine’s native rate (or 48 kHz when the LavaSR enhancer is active).');
|
|
150
164
|
const ttsParlerDescriptionFieldsShape = {
|
|
151
|
-
description: z
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
165
|
+
description: z
|
|
166
|
+
.string()
|
|
167
|
+
.min(1)
|
|
168
|
+
.optional()
|
|
169
|
+
.describe('Parler free-text voice description (alias `voiceDescription`). Mutually exclusive with the voice-template fields.'),
|
|
170
|
+
voiceDescription: z
|
|
171
|
+
.string()
|
|
172
|
+
.min(1)
|
|
173
|
+
.optional()
|
|
174
|
+
.describe('Alias of `description`; mutually exclusive with the voice-template fields.'),
|
|
175
|
+
voice: z
|
|
176
|
+
.string()
|
|
177
|
+
.min(1)
|
|
178
|
+
.optional()
|
|
179
|
+
.describe('Parler voice-template speaker name; also Supertonic’s baked voice id.'),
|
|
180
|
+
emotion: ttsParlerEmotionSchema
|
|
181
|
+
.optional()
|
|
182
|
+
.describe('Speaking style (Parler voice-template field).'),
|
|
183
|
+
pitch: z.string().min(1).optional().describe('Parler voice-template pitch descriptor.'),
|
|
156
184
|
// Canonical cross-engine vocabulary since @qvac/tts-ggml 0.7 (QVAC-23154);
|
|
157
185
|
// free-form pace strings are rejected natively.
|
|
158
|
-
pace: ttsPaceSchema.optional(),
|
|
159
|
-
expressivity: z
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
186
|
+
pace: ttsPaceSchema.optional().describe("Speaking rate: `'slow'`, `'moderate'`, or `'fast'`."),
|
|
187
|
+
expressivity: z
|
|
188
|
+
.string()
|
|
189
|
+
.min(1)
|
|
190
|
+
.optional()
|
|
191
|
+
.describe('Parler voice-template expressivity descriptor.'),
|
|
192
|
+
noise: z
|
|
193
|
+
.string()
|
|
194
|
+
.min(1)
|
|
195
|
+
.optional()
|
|
196
|
+
.describe('Parler voice-template background-noise descriptor.'),
|
|
197
|
+
reverb: z.string().min(1).optional().describe('Parler voice-template reverb descriptor.'),
|
|
198
|
+
quality: z.string().min(1).optional().describe('Parler voice-template audio-quality descriptor.')
|
|
163
199
|
};
|
|
164
200
|
const ttsParlerTemplateFieldNames = [
|
|
165
201
|
'voice',
|
|
@@ -204,46 +240,80 @@ function refineParlerRuntimeConfig(config, ctx) {
|
|
|
204
240
|
}
|
|
205
241
|
}
|
|
206
242
|
export const ttsChatterboxRuntimeConfigSchema = z.object({
|
|
207
|
-
ttsEngine: z
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
243
|
+
ttsEngine: z
|
|
244
|
+
.literal('chatterbox')
|
|
245
|
+
.describe('TTS engine: Chatterbox (multilingual, voice cloning).'),
|
|
246
|
+
language: ttsChatterboxLanguageSchema.describe('Language code. Default `en`.'),
|
|
247
|
+
voice: z
|
|
248
|
+
.string()
|
|
249
|
+
.optional()
|
|
250
|
+
.describe('Ignored by Chatterbox; use `referenceAudioSrc` for voice cloning.'),
|
|
251
|
+
useGPU: z.boolean().optional().describe(TTS_USE_GPU_DESC),
|
|
211
252
|
// Chatterbox-only native streaming controls.
|
|
212
|
-
streamChunkTokens: ttsNonNegativeIntegerSchema.optional(),
|
|
213
|
-
streamFirstChunkTokens: ttsNonNegativeIntegerSchema
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
253
|
+
streamChunkTokens: ttsNonNegativeIntegerSchema.optional().describe(TTS_STREAM_CHUNK_TOKENS_DESC),
|
|
254
|
+
streamFirstChunkTokens: ttsNonNegativeIntegerSchema
|
|
255
|
+
.optional()
|
|
256
|
+
.describe(TTS_STREAM_FIRST_CHUNK_TOKENS_DESC),
|
|
257
|
+
cfmSteps: ttsNonNegativeIntegerSchema
|
|
258
|
+
.optional()
|
|
259
|
+
.describe('Chatterbox CFM Euler step count. Default 2.'),
|
|
260
|
+
cfgRate: z
|
|
261
|
+
.number()
|
|
262
|
+
.nonnegative()
|
|
263
|
+
.optional()
|
|
264
|
+
.describe('Chatterbox S3Gen classifier-free-guidance rate; `0` skips the unconditioned pass, a positive value overrides the model’s baked rate. Omit to keep the baked rate.'),
|
|
265
|
+
threads: ttsPositiveIntegerSchema.optional().describe(TTS_THREADS_DESC),
|
|
266
|
+
nGpuLayers: ttsIntegerSchema.optional().describe(TTS_NGPU_LAYERS_DESC),
|
|
267
|
+
seed: ttsIntegerSchema.optional().describe(TTS_SEED_DESC)
|
|
219
268
|
});
|
|
220
269
|
export const ttsSupertonicRuntimeConfigSchema = z.object({
|
|
221
|
-
ttsEngine: z.literal('supertonic'),
|
|
222
|
-
language: ttsSupertonicLanguageSchema,
|
|
223
|
-
voice: z.string().optional(),
|
|
224
|
-
ttsSpeed: z
|
|
225
|
-
|
|
226
|
-
|
|
270
|
+
ttsEngine: z.literal('supertonic').describe('TTS engine: Supertonic.'),
|
|
271
|
+
language: ttsSupertonicLanguageSchema.describe('Language code. Default `en`.'),
|
|
272
|
+
voice: z.string().optional().describe('Supertonic baked voice id, e.g. `F1` or `M1`.'),
|
|
273
|
+
ttsSpeed: z
|
|
274
|
+
.number()
|
|
275
|
+
.optional()
|
|
276
|
+
.describe('Speech-rate / duration multiplier (1.0 = unchanged, <1 slower, >1 faster). Supertonic scales its native duration predictor.'),
|
|
277
|
+
ttsNumInferenceSteps: z
|
|
278
|
+
.number()
|
|
279
|
+
.optional()
|
|
280
|
+
.describe('Supertonic vector-estimator CFM steps; 0 uses the GGUF default.'),
|
|
281
|
+
useGPU: z.boolean().optional().describe(TTS_USE_GPU_DESC),
|
|
227
282
|
outputSampleRate: ttsOutputSampleRateSchema.optional(),
|
|
228
|
-
vulkanCacheDir: z
|
|
283
|
+
vulkanCacheDir: z
|
|
284
|
+
.string()
|
|
285
|
+
.min(1)
|
|
286
|
+
.optional()
|
|
287
|
+
.describe('Supertonic + `useGPU` only: directory where the Vulkan backend persists its compiled pipeline cache.')
|
|
229
288
|
});
|
|
230
289
|
export const ttsParlerRuntimeConfigSchema = z
|
|
231
290
|
.object({
|
|
232
|
-
ttsEngine: z.literal('parler'),
|
|
291
|
+
ttsEngine: z.literal('parler').describe('TTS engine: Parler.'),
|
|
233
292
|
...ttsParlerDescriptionFieldsShape,
|
|
234
|
-
useGPU: z.boolean().optional(),
|
|
293
|
+
useGPU: z.boolean().optional().describe(TTS_USE_GPU_DESC),
|
|
235
294
|
outputSampleRate: ttsOutputSampleRateSchema.optional(),
|
|
236
|
-
streamChunkTokens: ttsNonNegativeInt32Schema.optional(),
|
|
237
|
-
streamFirstChunkTokens: ttsNonNegativeInt32Schema
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
295
|
+
streamChunkTokens: ttsNonNegativeInt32Schema.optional().describe(TTS_STREAM_CHUNK_TOKENS_DESC),
|
|
296
|
+
streamFirstChunkTokens: ttsNonNegativeInt32Schema
|
|
297
|
+
.optional()
|
|
298
|
+
.describe(TTS_STREAM_FIRST_CHUNK_TOKENS_DESC),
|
|
299
|
+
threads: ttsPositiveInt32Schema.optional().describe(TTS_THREADS_DESC),
|
|
300
|
+
nGpuLayers: ttsInt32Schema.optional().describe(TTS_NGPU_LAYERS_DESC),
|
|
301
|
+
seed: ttsInt32Schema.optional().describe(TTS_SEED_DESC),
|
|
302
|
+
temperature: z.number().nonnegative().optional().describe(TTS_TEMPERATURE_DESC),
|
|
303
|
+
topK: ttsNonNegativeInt32Schema.optional().describe(TTS_TOP_K_DESC),
|
|
304
|
+
topP: z.number().positive().max(1).optional().describe(TTS_TOP_P_DESC),
|
|
305
|
+
maxFrames: z
|
|
306
|
+
.union([z.literal(0), ttsInt32Schema.min(10)])
|
|
307
|
+
.optional()
|
|
308
|
+
.describe(TTS_MAX_FRAMES_DESC),
|
|
309
|
+
minNewTokens: ttsInt32Schema
|
|
310
|
+
.min(-1)
|
|
311
|
+
.optional()
|
|
312
|
+
.describe('Parler minimum tokens before EOS; `-1` uses the model default.'),
|
|
313
|
+
normalizeNumbers: z
|
|
314
|
+
.boolean()
|
|
315
|
+
.optional()
|
|
316
|
+
.describe('Parler prompt digit expansion (engine default: enabled).')
|
|
247
317
|
})
|
|
248
318
|
.superRefine(refineParlerRuntimeConfig);
|
|
249
319
|
// CosyVoice3 structured instruct: a raw string passes through to the engine as
|
|
@@ -255,9 +325,18 @@ const ttsCosyvoice3InstructSchema = z.union([
|
|
|
255
325
|
z.string().trim().min(1),
|
|
256
326
|
z
|
|
257
327
|
.object({
|
|
258
|
-
dialect: z
|
|
259
|
-
|
|
260
|
-
|
|
328
|
+
dialect: z
|
|
329
|
+
.enum(TTS_COSYVOICE3_INSTRUCT_DIALECTS)
|
|
330
|
+
.optional()
|
|
331
|
+
.describe('Chinese dialect to render (e.g. `cantonese`, `sichuan`).'),
|
|
332
|
+
volume: z
|
|
333
|
+
.enum(TTS_COSYVOICE3_INSTRUCT_VOLUMES)
|
|
334
|
+
.optional()
|
|
335
|
+
.describe('Speaking volume: `loud` or `soft`.'),
|
|
336
|
+
style: z
|
|
337
|
+
.enum(TTS_COSYVOICE3_INSTRUCT_STYLES)
|
|
338
|
+
.optional()
|
|
339
|
+
.describe('Speaking style: `peppa` or `robot`.')
|
|
261
340
|
})
|
|
262
341
|
.strict()
|
|
263
342
|
.refine((value) => value.dialect !== undefined || value.volume !== undefined || value.style !== undefined, { message: 'instruct requires at least one of dialect, volume, or style.' })
|
|
@@ -300,40 +379,52 @@ function refineCosyvoice3RuntimeConfig(config, ctx) {
|
|
|
300
379
|
refineCosyvoice3NativeStreamingRate(config, ctx);
|
|
301
380
|
}
|
|
302
381
|
const ttsCosyvoice3RuntimeConfigShape = {
|
|
303
|
-
ttsEngine: z.literal('cosyvoice3'),
|
|
304
|
-
emotion: ttsCosyvoice3EmotionSchema
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
382
|
+
ttsEngine: z.literal('cosyvoice3').describe('TTS engine: CosyVoice3.'),
|
|
383
|
+
emotion: ttsCosyvoice3EmotionSchema
|
|
384
|
+
.optional()
|
|
385
|
+
.describe("Speaking style: `'anger'`, `'happy'`, `'neutral'`, or `'sad'`. One conditioning control per synthesis (emotion / non-moderate pace / instruct)."),
|
|
386
|
+
pace: ttsPaceSchema
|
|
387
|
+
.optional()
|
|
388
|
+
.describe("Speaking rate: `'slow'`, `'moderate'`, or `'fast'`; `'moderate'` disengages the pace channel."),
|
|
389
|
+
instruct: ttsCosyvoice3InstructSchema
|
|
390
|
+
.optional()
|
|
391
|
+
.describe('Natural-language control: a structured object (one of dialect / volume / style) or a raw instruction string. One conditioning control per synthesis.'),
|
|
392
|
+
useGPU: z.boolean().optional().describe(TTS_USE_GPU_DESC),
|
|
308
393
|
outputSampleRate: ttsOutputSampleRateSchema.optional(),
|
|
309
|
-
streamChunkTokens: ttsNonNegativeInt32Schema.optional(),
|
|
310
|
-
streamFirstChunkTokens: ttsNonNegativeInt32Schema
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
394
|
+
streamChunkTokens: ttsNonNegativeInt32Schema.optional().describe(TTS_STREAM_CHUNK_TOKENS_DESC),
|
|
395
|
+
streamFirstChunkTokens: ttsNonNegativeInt32Schema
|
|
396
|
+
.optional()
|
|
397
|
+
.describe(TTS_STREAM_FIRST_CHUNK_TOKENS_DESC),
|
|
398
|
+
threads: ttsPositiveInt32Schema.optional().describe(TTS_THREADS_DESC),
|
|
399
|
+
nGpuLayers: ttsInt32Schema.optional().describe(TTS_NGPU_LAYERS_DESC),
|
|
400
|
+
seed: ttsInt32Schema.optional().describe(TTS_SEED_DESC)
|
|
314
401
|
};
|
|
315
402
|
export const ttsCosyvoice3RuntimeConfigSchema = z
|
|
316
403
|
.object(ttsCosyvoice3RuntimeConfigShape)
|
|
317
404
|
.superRefine(refineCosyvoice3RuntimeConfig);
|
|
318
405
|
const ttsAudio8RuntimeConfigShape = {
|
|
319
|
-
ttsEngine: z.literal('audio8'),
|
|
406
|
+
ttsEngine: z.literal('audio8').describe('TTS engine: Audio8.'),
|
|
320
407
|
// Transcript of the load-time reference recording (zero-shot voice cloning).
|
|
321
408
|
// Paired with `referenceAudioSrc` on the load config; kept on the runtime
|
|
322
409
|
// config because it survives artifact resolution as plain data.
|
|
323
410
|
// Trimmed for the same reason as the CosyVoice3 instruct string: a
|
|
324
411
|
// whitespace-only transcript would reach the engine as a non-empty value.
|
|
325
|
-
referenceText: z
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
412
|
+
referenceText: z
|
|
413
|
+
.string()
|
|
414
|
+
.trim()
|
|
415
|
+
.min(1)
|
|
416
|
+
.optional()
|
|
417
|
+
.describe('Transcript of `referenceAudioSrc`; required when cloning a voice.'),
|
|
418
|
+
greedy: z.boolean().optional().describe('Audio8: take the argmax instead of sampling.'),
|
|
419
|
+
temperature: z.number().nonnegative().optional().describe(TTS_TEMPERATURE_DESC),
|
|
420
|
+
topK: ttsNonNegativeInt32Schema.optional().describe(TTS_TOP_K_DESC),
|
|
421
|
+
topP: z.number().positive().max(1).optional().describe(TTS_TOP_P_DESC),
|
|
422
|
+
maxFrames: ttsNonNegativeInt32Schema.optional().describe(TTS_MAX_FRAMES_DESC),
|
|
423
|
+
useGPU: z.boolean().optional().describe(TTS_USE_GPU_DESC),
|
|
333
424
|
outputSampleRate: ttsOutputSampleRateSchema.optional(),
|
|
334
|
-
threads: ttsPositiveInt32Schema.optional(),
|
|
335
|
-
nGpuLayers: ttsInt32Schema.optional(),
|
|
336
|
-
seed: ttsInt32Schema.optional()
|
|
425
|
+
threads: ttsPositiveInt32Schema.optional().describe(TTS_THREADS_DESC),
|
|
426
|
+
nGpuLayers: ttsInt32Schema.optional().describe(TTS_NGPU_LAYERS_DESC),
|
|
427
|
+
seed: ttsInt32Schema.optional().describe(TTS_SEED_DESC)
|
|
337
428
|
};
|
|
338
429
|
export const ttsAudio8RuntimeConfigSchema = z.object(ttsAudio8RuntimeConfigShape);
|
|
339
430
|
export const ttsRuntimeConfigSchema = z.discriminatedUnion('ttsEngine', [
|
|
@@ -348,16 +439,28 @@ export const ttsRuntimeConfigSchema = z.discriminatedUnion('ttsEngine', [
|
|
|
348
439
|
// denoiser GGUF (runs before the enhancer, rate-preserving). Resolved to
|
|
349
440
|
// artifacts by the plugin's resolveConfig and forwarded to @qvac/tts-ggml.
|
|
350
441
|
const ttsLavasrLoadFieldsShape = {
|
|
351
|
-
lavasrEnhancerModelSrc: modelSrcInputSchema
|
|
352
|
-
|
|
442
|
+
lavasrEnhancerModelSrc: modelSrcInputSchema
|
|
443
|
+
.optional()
|
|
444
|
+
.describe('LavaSR enhancer model source; bandwidth-extends the output to 48 kHz.'),
|
|
445
|
+
lavasrDenoiserModelSrc: modelSrcInputSchema
|
|
446
|
+
.optional()
|
|
447
|
+
.describe('LavaSR denoiser model source; runs before the enhancer, rate-preserving (batch synthesis only).')
|
|
353
448
|
};
|
|
354
449
|
export const ttsChatterboxLoadConfigSchema = ttsChatterboxRuntimeConfigSchema.extend({
|
|
355
450
|
// Optional at schema time so legacy ONNX configs (no s3genModelSrc) reach
|
|
356
451
|
// the plugin's resolveConfig and raise LegacyTtsModelDeprecatedError.
|
|
357
|
-
s3genModelSrc: modelSrcInputSchema
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
452
|
+
s3genModelSrc: modelSrcInputSchema
|
|
453
|
+
.optional()
|
|
454
|
+
.describe('Chatterbox S3Gen + HiFT model source (speech tokens to 24 kHz waveform).'),
|
|
455
|
+
referenceAudioSrc: modelSrcInputSchema
|
|
456
|
+
.optional()
|
|
457
|
+
.describe('Chatterbox voice-cloning reference audio source (wav).'),
|
|
458
|
+
mecabDictSrc: modelSrcInputSchema
|
|
459
|
+
.optional()
|
|
460
|
+
.describe('Chatterbox MTL only: compiled MeCab/IPAdic dictionary source for Japanese segmentation (required for language `ja`).'),
|
|
461
|
+
cangjieTsvSrc: modelSrcInputSchema
|
|
462
|
+
.optional()
|
|
463
|
+
.describe('Chatterbox MTL only: Cangjie TSV source for Chinese romanisation (required for language `zh`).'),
|
|
361
464
|
...ttsLavasrLoadFieldsShape
|
|
362
465
|
});
|
|
363
466
|
export const ttsSupertonicLoadConfigSchema = ttsSupertonicRuntimeConfigSchema.extend({
|
|
@@ -418,9 +521,13 @@ function refineAudio8LoadConfig(config, ctx) {
|
|
|
418
521
|
export const ttsAudio8LoadConfigSchema = z
|
|
419
522
|
.object({
|
|
420
523
|
...ttsAudio8RuntimeConfigShape,
|
|
421
|
-
audio8CodecDecoderModelSrc: modelSrcInputSchema,
|
|
422
|
-
audio8CodecEncoderModelSrc: modelSrcInputSchema
|
|
423
|
-
|
|
524
|
+
audio8CodecDecoderModelSrc: modelSrcInputSchema.describe('Audio8 codec decoder model source (codes to 44.1 kHz waveform).'),
|
|
525
|
+
audio8CodecEncoderModelSrc: modelSrcInputSchema
|
|
526
|
+
.optional()
|
|
527
|
+
.describe('Audio8 codec encoder model source (waveform to codes); required only for voice cloning.'),
|
|
528
|
+
referenceAudioSrc: modelSrcInputSchema
|
|
529
|
+
.optional()
|
|
530
|
+
.describe('Audio8 voice-cloning reference recording source; pair with `referenceText`.')
|
|
424
531
|
})
|
|
425
532
|
.superRefine(refineAudio8LoadConfig);
|
|
426
533
|
function refineChatterboxTokenizerAssets(data, ctx) {
|