@qvac/sdk 0.7.1 → 0.8.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 +57 -331
- package/README.md +2 -2
- package/bare-imports.json +9 -0
- package/dist/client/api/completion-stream.d.ts +2 -1
- package/dist/client/api/completion-stream.js +2 -1
- package/dist/client/api/download-asset.d.ts +3 -2
- package/dist/client/api/download-asset.js +4 -3
- package/dist/client/api/embed.d.ts +5 -2
- package/dist/client/api/embed.js +2 -2
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/invoke-plugin.d.ts +3 -2
- package/dist/client/api/invoke-plugin.js +4 -4
- package/dist/client/api/load-model.d.ts +12 -10
- package/dist/client/api/load-model.js +3 -3
- package/dist/client/api/rag.d.ts +10 -10
- package/dist/client/api/rag.js +21 -21
- package/dist/client/api/text-to-speech.d.ts +2 -2
- package/dist/client/api/text-to-speech.js +3 -3
- package/dist/client/api/transcribe.d.ts +5 -3
- package/dist/client/api/transcribe.js +6 -4
- package/dist/client/api/translate.d.ts +2 -2
- package/dist/client/api/translate.js +3 -3
- package/dist/client/rpc/node-rpc-client.d.ts +2 -7
- package/dist/client/rpc/node-rpc-client.js +2 -39
- package/dist/client/rpc/profiling/index.d.ts +2 -0
- package/dist/client/rpc/profiling/index.js +1 -0
- package/dist/client/rpc/profiling/profiler.d.ts +27 -0
- package/dist/client/rpc/profiling/profiler.js +139 -0
- package/dist/client/rpc/rpc-client.d.ts +2 -2
- package/dist/client/rpc/rpc-client.js +174 -12
- package/dist/examples/delegated-inference/consumer-profiled.d.ts +2 -0
- package/dist/examples/delegated-inference/consumer-profiled.js +67 -0
- package/dist/examples/llamacpp-multimodal.js +1 -1
- package/dist/examples/parallel-download.js +45 -13
- package/dist/examples/profiling/basic.d.ts +2 -0
- package/dist/examples/profiling/basic.js +71 -0
- package/dist/examples/profiling/per-call.d.ts +2 -0
- package/dist/examples/profiling/per-call.js +30 -0
- package/dist/examples/transcription/parakeet-ctc-filesystem.d.ts +2 -0
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +40 -0
- package/dist/examples/transcription/parakeet-microphone-record.d.ts +2 -0
- package/dist/examples/transcription/parakeet-microphone-record.js +95 -0
- package/dist/examples/transcription/parakeet-sortformer.d.ts +2 -0
- package/dist/examples/transcription/parakeet-sortformer.js +115 -0
- package/dist/examples/transcription/parakeet-tdt-filesystem.d.ts +2 -0
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +44 -0
- package/dist/examples/translation/translation-bergamot-pivot.d.ts +2 -0
- package/dist/examples/translation/translation-bergamot-pivot.js +73 -0
- package/dist/examples/translation/translation-llm-afriquegemma.d.ts +2 -0
- package/dist/examples/translation/translation-llm-afriquegemma.js +39 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/logging/index.d.ts +1 -1
- package/dist/logging/index.js +1 -1
- package/dist/logging/namespaces.d.ts +3 -9
- package/dist/logging/namespaces.js +2 -8
- package/dist/logging/registry.js +15 -1
- package/dist/models/registry/models.d.ts +1606 -245
- package/dist/models/registry/models.js +2127 -721
- package/dist/models/update-models/codegen.js +2 -2
- package/dist/models/update-models/history.d.ts +11 -0
- package/dist/models/update-models/history.js +24 -5
- package/dist/models/update-models/index.js +17 -16
- package/dist/models/update-models/naming.js +56 -0
- package/dist/profiling/aggregator.d.ts +15 -0
- package/dist/profiling/aggregator.js +100 -0
- package/dist/profiling/clock.d.ts +12 -0
- package/dist/profiling/clock.js +51 -0
- package/dist/profiling/controller.d.ts +33 -0
- package/dist/profiling/controller.js +123 -0
- package/dist/profiling/envelope.d.ts +10 -0
- package/dist/profiling/envelope.js +36 -0
- package/dist/profiling/events.d.ts +20 -0
- package/dist/profiling/events.js +37 -0
- package/dist/profiling/exporters.d.ts +10 -0
- package/dist/profiling/exporters.js +236 -0
- package/dist/profiling/index.d.ts +36 -0
- package/dist/profiling/index.js +31 -0
- package/dist/profiling/ring-buffer.d.ts +19 -0
- package/dist/profiling/ring-buffer.js +83 -0
- package/dist/profiling/types.d.ts +47 -0
- package/dist/profiling/types.js +1 -0
- package/dist/schemas/common.d.ts +1888 -133
- package/dist/schemas/common.js +2 -0
- package/dist/schemas/completion-stream.d.ts +31 -0
- package/dist/schemas/completion-stream.js +13 -0
- package/dist/schemas/download-asset.d.ts +14 -3
- package/dist/schemas/download-asset.js +3 -1
- package/dist/schemas/engine-addon-map.js +9 -6
- package/dist/schemas/get-model-info.d.ts +2 -0
- package/dist/schemas/get-model-info.js +1 -0
- package/dist/schemas/index.d.ts +2 -1
- package/dist/schemas/index.js +2 -1
- package/dist/schemas/llamacpp-config.d.ts +140 -14
- package/dist/schemas/llamacpp-config.js +11 -7
- package/dist/schemas/load-model.d.ts +9649 -2515
- package/dist/schemas/load-model.js +142 -182
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +19 -1
- package/dist/schemas/model-types.js +11 -0
- package/dist/schemas/ocr.d.ts +37 -0
- package/dist/schemas/ocr.js +5 -0
- package/dist/schemas/plugin.d.ts +51 -5
- package/dist/schemas/plugin.js +26 -0
- package/dist/schemas/profiling.d.ts +105 -0
- package/dist/schemas/profiling.js +66 -0
- package/dist/schemas/registry.d.ts +18 -0
- package/dist/schemas/registry.js +2 -0
- package/dist/schemas/reload-config.d.ts +126 -6
- package/dist/schemas/reload-config.js +1 -1
- package/dist/schemas/sdk-config.d.ts +2280 -24
- package/dist/schemas/sdk-config.js +6 -1
- package/dist/schemas/sdk-errors-client.d.ts +1 -0
- package/dist/schemas/sdk-errors-client.js +7 -0
- package/dist/schemas/sdk-errors-server.d.ts +3 -0
- package/dist/schemas/sdk-errors-server.js +15 -0
- package/dist/schemas/text-to-speech.d.ts +90 -68
- package/dist/schemas/text-to-speech.js +16 -33
- package/dist/schemas/transcription-config.d.ts +383 -0
- package/dist/schemas/{whispercpp-config.js → transcription-config.js} +29 -1
- package/dist/schemas/translation-config.d.ts +463 -8
- package/dist/schemas/translation-config.js +35 -2
- package/dist/server/bare/delegate-rpc-client.js +11 -1
- package/dist/server/bare/ops/load-model.d.ts +7 -1
- package/dist/server/bare/ops/load-model.js +41 -42
- package/dist/server/bare/ops/transcribe.d.ts +3 -0
- package/dist/server/bare/ops/transcribe.js +75 -0
- package/dist/server/bare/ops/translate.d.ts +2 -0
- package/dist/server/bare/ops/translate.js +12 -4
- package/dist/server/bare/plugins/index.d.ts +1 -0
- package/dist/server/bare/plugins/index.js +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +2 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +8 -6
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +108 -3
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +19 -6
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +32 -2
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +31 -17
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +325 -3
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +117 -10
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +50 -2
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +46 -5
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +351 -4
- package/dist/server/bare/plugins/onnx-tts/plugin.js +81 -61
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +317 -0
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +154 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +209 -3
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +21 -9
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +2 -2
- package/dist/server/bare/registry/model-config-utils.js +3 -1
- package/dist/server/bare/utils/audio-input.d.ts +10 -0
- package/dist/server/bare/utils/audio-input.js +33 -0
- package/dist/server/error-handlers.d.ts +3 -2
- package/dist/server/error-handlers.js +11 -8
- package/dist/server/plugins/registry.js +5 -1
- package/dist/server/rpc/delegate-transport.d.ts +11 -3
- package/dist/server/rpc/delegate-transport.js +158 -3
- package/dist/server/rpc/handle-request.js +43 -4
- package/dist/server/rpc/handler-registry.js +7 -1
- package/dist/server/rpc/handler-utils.d.ts +5 -4
- package/dist/server/rpc/handler-utils.js +72 -31
- package/dist/server/rpc/handlers/completion-stream-delegated.d.ts +3 -1
- package/dist/server/rpc/handlers/completion-stream-delegated.js +11 -2
- package/dist/server/rpc/handlers/download-asset.js +55 -3
- package/dist/server/rpc/handlers/load-model/download-stats.d.ts +6 -0
- package/dist/server/rpc/handlers/load-model/download-stats.js +87 -0
- package/dist/server/rpc/handlers/load-model/handler.js +108 -123
- package/dist/server/rpc/handlers/load-model/http.d.ts +2 -1
- package/dist/server/rpc/handlers/load-model/http.js +21 -5
- package/dist/server/rpc/handlers/load-model/hyperdrive.d.ts +2 -1
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +19 -14
- package/dist/server/rpc/handlers/load-model/registry.d.ts +2 -1
- package/dist/server/rpc/handlers/load-model/registry.js +123 -130
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +2 -0
- package/dist/server/rpc/handlers/load-model/resolve.js +55 -22
- package/dist/server/rpc/handlers/load-model/types.d.ts +29 -0
- package/dist/server/rpc/handlers/load-model/types.js +1 -0
- package/dist/server/rpc/handlers/load-model-delegated.d.ts +5 -1
- package/dist/server/rpc/handlers/load-model-delegated.js +35 -7
- package/dist/server/rpc/handlers/plugin-dispatch.js +15 -10
- package/dist/server/rpc/handlers/plugin-invoke.js +56 -51
- package/dist/server/rpc/handlers/rag.js +24 -0
- package/dist/server/rpc/handlers/unload-model-delegated.d.ts +3 -0
- package/dist/server/rpc/handlers/unload-model-delegated.js +32 -0
- package/dist/server/rpc/profiling/context.d.ts +18 -0
- package/dist/server/rpc/profiling/context.js +38 -0
- package/dist/server/rpc/profiling/delegation-profiler.d.ts +32 -0
- package/dist/server/rpc/profiling/delegation-profiler.js +154 -0
- package/dist/server/rpc/profiling/index.d.ts +5 -0
- package/dist/server/rpc/profiling/index.js +4 -0
- package/dist/server/rpc/profiling/operation-metrics.d.ts +25 -0
- package/dist/server/rpc/profiling/operation-metrics.js +199 -0
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +18 -0
- package/dist/server/rpc/profiling/operation-wrappers.js +124 -0
- package/dist/server/rpc/profiling/profiler.d.ts +13 -0
- package/dist/server/rpc/profiling/profiler.js +97 -0
- package/dist/server/utils/cache.d.ts +2 -1
- package/dist/server/utils/cache.js +5 -1
- package/dist/server/utils/checksum.d.ts +2 -0
- package/dist/server/utils/checksum.js +7 -0
- package/dist/server/utils/formatting.d.ts +6 -0
- package/dist/server/utils/formatting.js +35 -0
- package/dist/server/worker.js +2 -1
- package/dist/utils/errors-client.d.ts +3 -0
- package/dist/utils/errors-client.js +6 -0
- package/dist/utils/errors-server.d.ts +9 -0
- package/dist/utils/errors-server.js +15 -0
- package/dist/utils/global-singleton.d.ts +2 -0
- package/dist/utils/global-singleton.js +10 -0
- package/package.json +13 -16
- package/dist/schemas/whispercpp-config.d.ts +0 -70
- package/dist/server/bare/plugins/whispercpp-transcription/ops/transcribe-stream.d.ts +0 -3
- package/dist/server/bare/plugins/whispercpp-transcription/ops/transcribe-stream.js +0 -81
- /package/dist/examples/{whispercpp-filesystem.d.ts → transcription/whispercpp-filesystem.d.ts} +0 -0
- /package/dist/examples/{whispercpp-filesystem.js → transcription/whispercpp-filesystem.js} +0 -0
- /package/dist/examples/{whispercpp-microphone-record.d.ts → transcription/whispercpp-microphone-record.d.ts} +0 -0
- /package/dist/examples/{whispercpp-microphone-record.js → transcription/whispercpp-microphone-record.js} +0 -0
- /package/dist/examples/{whispercpp-prompt.d.ts → transcription/whispercpp-prompt.d.ts} +0 -0
- /package/dist/examples/{whispercpp-prompt.js → transcription/whispercpp-prompt.js} +0 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const audioFormatSchema: z.ZodEnum<{
|
|
3
|
+
f32le: "f32le";
|
|
4
|
+
s16le: "s16le";
|
|
5
|
+
}>;
|
|
6
|
+
export type AudioFormat = z.infer<typeof audioFormatSchema>;
|
|
7
|
+
export declare const whisperConfigSchema: z.ZodObject<{
|
|
8
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
greedy: "greedy";
|
|
10
|
+
beam_search: "beam_search";
|
|
11
|
+
}>>;
|
|
12
|
+
n_threads: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
n_max_text_ctx: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
offset_ms: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
audio_ctx: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
translate: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
no_context: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
no_timestamps: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
single_segment: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
print_special: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
print_progress: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
print_realtime: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
print_timestamps: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
token_timestamps: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
thold_pt: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
thold_ptsum: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
max_len: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
split_on_word: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
debug_mode: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
tdrz_enable: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
suppress_regex: z.ZodOptional<z.ZodString>;
|
|
34
|
+
initial_prompt: z.ZodOptional<z.ZodString>;
|
|
35
|
+
language: z.ZodOptional<z.ZodString>;
|
|
36
|
+
detect_language: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
suppress_blank: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
suppress_nst: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
length_penalty: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
temperature_inc: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
entropy_thold: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
logprob_thold: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
greedy_best_of: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
beam_search_beam_size: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
vad_params: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
min_speech_duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
min_silence_duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
max_speech_duration_s: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
speech_pad_ms: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
samples_overlap: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
audio_format: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
f32le: "f32le";
|
|
56
|
+
s16le: "s16le";
|
|
57
|
+
}>>;
|
|
58
|
+
contextParams: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
model: z.ZodOptional<z.ZodString>;
|
|
60
|
+
use_gpu: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
flash_attn: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
gpu_device: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
miscConfig: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
caption_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
vadModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
68
|
+
src: z.ZodString;
|
|
69
|
+
name: z.ZodOptional<z.ZodString>;
|
|
70
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
71
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
72
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
73
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
74
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
76
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
78
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
79
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
80
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
81
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
82
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
83
|
+
"onnx-tts": "onnx-tts";
|
|
84
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
85
|
+
"onnx-ocr": "onnx-ocr";
|
|
86
|
+
llm: "llm";
|
|
87
|
+
whisper: "whisper";
|
|
88
|
+
embeddings: "embeddings";
|
|
89
|
+
nmt: "nmt";
|
|
90
|
+
parakeet: "parakeet";
|
|
91
|
+
tts: "tts";
|
|
92
|
+
ocr: "ocr";
|
|
93
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
94
|
+
}, z.core.$strip>]>>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
export type WhisperConfig = z.infer<typeof whisperConfigSchema>;
|
|
97
|
+
export declare const parakeetModelTypeEnumSchema: z.ZodEnum<{
|
|
98
|
+
tdt: "tdt";
|
|
99
|
+
ctc: "ctc";
|
|
100
|
+
sortformer: "sortformer";
|
|
101
|
+
}>;
|
|
102
|
+
export type ParakeetModelVariant = z.infer<typeof parakeetModelTypeEnumSchema>;
|
|
103
|
+
export declare const parakeetRuntimeConfigSchema: z.ZodObject<{
|
|
104
|
+
modelType: z.ZodDefault<z.ZodEnum<{
|
|
105
|
+
tdt: "tdt";
|
|
106
|
+
ctc: "ctc";
|
|
107
|
+
sortformer: "sortformer";
|
|
108
|
+
}>>;
|
|
109
|
+
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
useGPU: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
channels: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
captionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
timestampsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export declare const parakeetConfigSchema: z.ZodObject<{
|
|
117
|
+
modelType: z.ZodDefault<z.ZodEnum<{
|
|
118
|
+
tdt: "tdt";
|
|
119
|
+
ctc: "ctc";
|
|
120
|
+
sortformer: "sortformer";
|
|
121
|
+
}>>;
|
|
122
|
+
maxThreads: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
useGPU: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
channels: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
captionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
timestampsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
+
parakeetEncoderSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
129
|
+
src: z.ZodString;
|
|
130
|
+
name: z.ZodOptional<z.ZodString>;
|
|
131
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
132
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
133
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
134
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
135
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
137
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
139
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
140
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
141
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
142
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
143
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
144
|
+
"onnx-tts": "onnx-tts";
|
|
145
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
146
|
+
"onnx-ocr": "onnx-ocr";
|
|
147
|
+
llm: "llm";
|
|
148
|
+
whisper: "whisper";
|
|
149
|
+
embeddings: "embeddings";
|
|
150
|
+
nmt: "nmt";
|
|
151
|
+
parakeet: "parakeet";
|
|
152
|
+
tts: "tts";
|
|
153
|
+
ocr: "ocr";
|
|
154
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
155
|
+
}, z.core.$strip>]>>;
|
|
156
|
+
parakeetEncoderDataSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
157
|
+
src: z.ZodString;
|
|
158
|
+
name: z.ZodOptional<z.ZodString>;
|
|
159
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
160
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
161
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
162
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
163
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
165
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
167
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
168
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
169
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
170
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
171
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
172
|
+
"onnx-tts": "onnx-tts";
|
|
173
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
174
|
+
"onnx-ocr": "onnx-ocr";
|
|
175
|
+
llm: "llm";
|
|
176
|
+
whisper: "whisper";
|
|
177
|
+
embeddings: "embeddings";
|
|
178
|
+
nmt: "nmt";
|
|
179
|
+
parakeet: "parakeet";
|
|
180
|
+
tts: "tts";
|
|
181
|
+
ocr: "ocr";
|
|
182
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
183
|
+
}, z.core.$strip>]>>;
|
|
184
|
+
parakeetDecoderSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
185
|
+
src: z.ZodString;
|
|
186
|
+
name: z.ZodOptional<z.ZodString>;
|
|
187
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
188
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
189
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
190
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
191
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
193
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
195
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
196
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
197
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
198
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
199
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
200
|
+
"onnx-tts": "onnx-tts";
|
|
201
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
202
|
+
"onnx-ocr": "onnx-ocr";
|
|
203
|
+
llm: "llm";
|
|
204
|
+
whisper: "whisper";
|
|
205
|
+
embeddings: "embeddings";
|
|
206
|
+
nmt: "nmt";
|
|
207
|
+
parakeet: "parakeet";
|
|
208
|
+
tts: "tts";
|
|
209
|
+
ocr: "ocr";
|
|
210
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
211
|
+
}, z.core.$strip>]>>;
|
|
212
|
+
parakeetVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
213
|
+
src: z.ZodString;
|
|
214
|
+
name: z.ZodOptional<z.ZodString>;
|
|
215
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
216
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
217
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
218
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
219
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
221
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
223
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
224
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
225
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
226
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
227
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
228
|
+
"onnx-tts": "onnx-tts";
|
|
229
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
230
|
+
"onnx-ocr": "onnx-ocr";
|
|
231
|
+
llm: "llm";
|
|
232
|
+
whisper: "whisper";
|
|
233
|
+
embeddings: "embeddings";
|
|
234
|
+
nmt: "nmt";
|
|
235
|
+
parakeet: "parakeet";
|
|
236
|
+
tts: "tts";
|
|
237
|
+
ocr: "ocr";
|
|
238
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
239
|
+
}, z.core.$strip>]>>;
|
|
240
|
+
parakeetPreprocessorSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
241
|
+
src: z.ZodString;
|
|
242
|
+
name: z.ZodOptional<z.ZodString>;
|
|
243
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
244
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
245
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
246
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
247
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
249
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
251
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
252
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
253
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
254
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
255
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
256
|
+
"onnx-tts": "onnx-tts";
|
|
257
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
258
|
+
"onnx-ocr": "onnx-ocr";
|
|
259
|
+
llm: "llm";
|
|
260
|
+
whisper: "whisper";
|
|
261
|
+
embeddings: "embeddings";
|
|
262
|
+
nmt: "nmt";
|
|
263
|
+
parakeet: "parakeet";
|
|
264
|
+
tts: "tts";
|
|
265
|
+
ocr: "ocr";
|
|
266
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
267
|
+
}, z.core.$strip>]>>;
|
|
268
|
+
parakeetCtcModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
269
|
+
src: z.ZodString;
|
|
270
|
+
name: z.ZodOptional<z.ZodString>;
|
|
271
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
272
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
273
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
274
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
275
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
277
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
279
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
280
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
281
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
282
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
283
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
284
|
+
"onnx-tts": "onnx-tts";
|
|
285
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
286
|
+
"onnx-ocr": "onnx-ocr";
|
|
287
|
+
llm: "llm";
|
|
288
|
+
whisper: "whisper";
|
|
289
|
+
embeddings: "embeddings";
|
|
290
|
+
nmt: "nmt";
|
|
291
|
+
parakeet: "parakeet";
|
|
292
|
+
tts: "tts";
|
|
293
|
+
ocr: "ocr";
|
|
294
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
295
|
+
}, z.core.$strip>]>>;
|
|
296
|
+
parakeetCtcModelDataSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
297
|
+
src: z.ZodString;
|
|
298
|
+
name: z.ZodOptional<z.ZodString>;
|
|
299
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
300
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
301
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
302
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
303
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
305
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
306
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
307
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
308
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
309
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
310
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
311
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
312
|
+
"onnx-tts": "onnx-tts";
|
|
313
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
314
|
+
"onnx-ocr": "onnx-ocr";
|
|
315
|
+
llm: "llm";
|
|
316
|
+
whisper: "whisper";
|
|
317
|
+
embeddings: "embeddings";
|
|
318
|
+
nmt: "nmt";
|
|
319
|
+
parakeet: "parakeet";
|
|
320
|
+
tts: "tts";
|
|
321
|
+
ocr: "ocr";
|
|
322
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
323
|
+
}, z.core.$strip>]>>;
|
|
324
|
+
parakeetTokenizerSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
325
|
+
src: z.ZodString;
|
|
326
|
+
name: z.ZodOptional<z.ZodString>;
|
|
327
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
328
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
329
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
330
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
331
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
333
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
335
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
336
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
337
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
338
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
339
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
340
|
+
"onnx-tts": "onnx-tts";
|
|
341
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
342
|
+
"onnx-ocr": "onnx-ocr";
|
|
343
|
+
llm: "llm";
|
|
344
|
+
whisper: "whisper";
|
|
345
|
+
embeddings: "embeddings";
|
|
346
|
+
nmt: "nmt";
|
|
347
|
+
parakeet: "parakeet";
|
|
348
|
+
tts: "tts";
|
|
349
|
+
ocr: "ocr";
|
|
350
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
351
|
+
}, z.core.$strip>]>>;
|
|
352
|
+
parakeetSortformerSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
353
|
+
src: z.ZodString;
|
|
354
|
+
name: z.ZodOptional<z.ZodString>;
|
|
355
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
356
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
357
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
358
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
359
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
361
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
363
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
364
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
365
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
366
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
367
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
368
|
+
"onnx-tts": "onnx-tts";
|
|
369
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
370
|
+
"onnx-ocr": "onnx-ocr";
|
|
371
|
+
llm: "llm";
|
|
372
|
+
whisper: "whisper";
|
|
373
|
+
embeddings: "embeddings";
|
|
374
|
+
nmt: "nmt";
|
|
375
|
+
parakeet: "parakeet";
|
|
376
|
+
tts: "tts";
|
|
377
|
+
ocr: "ocr";
|
|
378
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
379
|
+
}, z.core.$strip>]>>;
|
|
380
|
+
}, z.core.$strip>;
|
|
381
|
+
export type ParakeetRuntimeConfig = z.infer<typeof parakeetRuntimeConfigSchema>;
|
|
382
|
+
export type ParakeetConfig = z.infer<typeof parakeetConfigSchema>;
|
|
383
|
+
//# sourceMappingURL=transcription-config.d.ts.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { modelSrcInputSchema } from "./model-src-utils.js";
|
|
3
|
+
// === Shared ===
|
|
2
4
|
export const audioFormatSchema = z.enum(["f32le", "s16le"]);
|
|
5
|
+
// === Whisper (whisper.cpp) engine config ===
|
|
3
6
|
const vadParamsSchema = z
|
|
4
7
|
.object({
|
|
5
8
|
threshold: z.number().optional(),
|
|
@@ -59,9 +62,34 @@ export const whisperConfigSchema = z.object({
|
|
|
59
62
|
logprob_thold: z.number().optional(),
|
|
60
63
|
greedy_best_of: z.number().int().optional(),
|
|
61
64
|
beam_search_beam_size: z.number().int().optional(),
|
|
62
|
-
vad_model_path: z.string().optional(),
|
|
63
65
|
vad_params: vadParamsSchema,
|
|
64
66
|
audio_format: audioFormatSchema.optional(),
|
|
65
67
|
contextParams: contextParamsSchema,
|
|
66
68
|
miscConfig: miscConfigSchema,
|
|
69
|
+
vadModelSrc: modelSrcInputSchema.optional(),
|
|
70
|
+
});
|
|
71
|
+
// === Parakeet (NVIDIA NeMo ONNX) engine config ===
|
|
72
|
+
export const parakeetModelTypeEnumSchema = z.enum(["tdt", "ctc", "sortformer"]);
|
|
73
|
+
export const parakeetRuntimeConfigSchema = z.object({
|
|
74
|
+
modelType: parakeetModelTypeEnumSchema.default("tdt"),
|
|
75
|
+
maxThreads: z.number().int().optional(),
|
|
76
|
+
useGPU: z.boolean().optional(),
|
|
77
|
+
sampleRate: z.number().int().optional(),
|
|
78
|
+
channels: z.number().int().optional(),
|
|
79
|
+
captionEnabled: z.boolean().optional(),
|
|
80
|
+
timestampsEnabled: z.boolean().optional(),
|
|
81
|
+
});
|
|
82
|
+
export const parakeetConfigSchema = parakeetRuntimeConfigSchema.extend({
|
|
83
|
+
// TDT sources
|
|
84
|
+
parakeetEncoderSrc: modelSrcInputSchema.optional(),
|
|
85
|
+
parakeetEncoderDataSrc: modelSrcInputSchema.optional(),
|
|
86
|
+
parakeetDecoderSrc: modelSrcInputSchema.optional(),
|
|
87
|
+
parakeetVocabSrc: modelSrcInputSchema.optional(),
|
|
88
|
+
parakeetPreprocessorSrc: modelSrcInputSchema.optional(),
|
|
89
|
+
// CTC sources
|
|
90
|
+
parakeetCtcModelSrc: modelSrcInputSchema.optional(),
|
|
91
|
+
parakeetCtcModelDataSrc: modelSrcInputSchema.optional(),
|
|
92
|
+
parakeetTokenizerSrc: modelSrcInputSchema.optional(),
|
|
93
|
+
// Sortformer source
|
|
94
|
+
parakeetSortformerSrc: modelSrcInputSchema.optional(),
|
|
67
95
|
});
|