@qvac/sdk 0.8.3 → 0.9.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 +267 -63
- package/dist/client/api/diffusion.d.ts +32 -0
- package/dist/client/api/diffusion.js +103 -0
- package/dist/client/api/embed.d.ts +9 -3
- package/dist/client/api/embed.js +4 -1
- package/dist/client/api/finetune.d.ts +69 -0
- package/dist/client/api/finetune.js +139 -0
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/index.d.ts +4 -0
- package/dist/client/api/index.js +4 -0
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +1 -1
- package/dist/client/api/resume.d.ts +14 -0
- package/dist/client/api/resume.js +20 -0
- package/dist/client/api/suspend.d.ts +13 -0
- package/dist/client/api/suspend.js +19 -0
- package/dist/client/api/transcribe.d.ts +25 -17
- package/dist/client/api/transcribe.js +115 -35
- package/dist/client/rpc/bare-client.d.ts +5 -1
- package/dist/client/rpc/bare-client.js +70 -57
- package/dist/client/rpc/expo-rpc-client.d.ts +4 -0
- package/dist/client/rpc/expo-rpc-client.js +8 -0
- package/dist/client/rpc/node-rpc-client.d.ts +4 -0
- package/dist/client/rpc/node-rpc-client.js +8 -0
- package/dist/client/rpc/rpc-client.d.ts +13 -0
- package/dist/client/rpc/rpc-client.js +131 -1
- package/dist/examples/delegated-inference/composite.d.ts +2 -0
- package/dist/examples/delegated-inference/composite.js +99 -0
- package/dist/examples/diffusion-flux2-klein.d.ts +2 -0
- package/dist/examples/diffusion-flux2-klein.js +46 -0
- package/dist/examples/diffusion-simple.d.ts +2 -0
- package/dist/examples/diffusion-simple.js +17 -0
- package/dist/examples/diffusion-txt2img.d.ts +2 -0
- package/dist/examples/diffusion-txt2img.js +40 -0
- package/dist/examples/embed-p2p.js +2 -2
- package/dist/examples/finetune/llamacpp-finetune.d.ts +2 -0
- package/dist/examples/finetune/llamacpp-finetune.js +78 -0
- package/dist/examples/logging-streaming.js +1 -1
- package/dist/examples/mcp-websearch.js +2 -0
- package/dist/examples/ocr-fasttext.js +11 -0
- package/dist/examples/profiling/per-call.js +3 -3
- package/dist/examples/rag/rag-chromadb.js +2 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.js +1 -1
- package/dist/examples/rag/rag-lancedb.js +2 -2
- package/dist/examples/rag/rag-sqlite.js +2 -2
- package/dist/examples/suspend-resume.d.ts +2 -0
- package/dist/examples/suspend-resume.js +52 -0
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +3 -5
- package/dist/examples/transcription/parakeet-microphone-record.js +42 -33
- package/dist/examples/transcription/parakeet-sortformer.js +13 -3
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +5 -7
- package/dist/examples/transcription/whispercpp-filesystem-streaming.d.ts +2 -0
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +99 -0
- package/dist/examples/transcription/whispercpp-microphone-record.js +78 -299
- package/dist/examples/transcription/whispercpp-prompt.js +11 -0
- package/dist/examples/translation/translation-llm.js +2 -2
- package/dist/examples/tts/supertonic-multilingual.d.ts +2 -0
- package/dist/examples/tts/supertonic-multilingual.js +56 -0
- package/dist/examples/tts/supertonic.js +12 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/models.d.ts +15176 -4264
- package/dist/models/registry/models.js +18657 -7404
- package/dist/models/update-models/codegen.js +2 -2
- package/dist/models/update-models/naming.js +26 -0
- package/dist/pear/pre.js +2 -0
- package/dist/polyfills/bare-globals.d.ts +2 -0
- package/dist/polyfills/bare-globals.js +4 -0
- package/dist/polyfills/bare-globals.noop.d.ts +2 -0
- package/dist/polyfills/bare-globals.noop.js +1 -0
- package/dist/profiling/exporters.js +16 -11
- package/dist/profiling/model-execution.d.ts +16 -0
- package/dist/profiling/model-execution.js +33 -0
- package/dist/schemas/common.d.ts +967 -198
- package/dist/schemas/common.js +16 -1
- package/dist/schemas/completion-stream.d.ts +14 -6
- package/dist/schemas/completion-stream.js +4 -3
- package/dist/schemas/download-asset.d.ts +7 -3
- package/dist/schemas/embed.d.ts +19 -0
- package/dist/schemas/embed.js +7 -0
- package/dist/schemas/engine-addon-map.js +4 -1
- package/dist/schemas/finetune.d.ts +620 -0
- package/dist/schemas/finetune.js +161 -0
- 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 +5 -1
- package/dist/schemas/index.js +5 -1
- package/dist/schemas/llamacpp-config.d.ts +26 -6
- package/dist/schemas/llamacpp-config.js +12 -0
- package/dist/schemas/load-model.d.ts +4005 -1400
- package/dist/schemas/load-model.js +34 -1
- 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 +2 -0
- package/dist/schemas/plugin.d.ts +24 -3
- package/dist/schemas/plugin.js +14 -0
- package/dist/schemas/profiling.d.ts +4 -0
- package/dist/schemas/profiling.js +4 -0
- package/dist/schemas/registry.d.ts +18 -0
- package/dist/schemas/registry.js +2 -0
- package/dist/schemas/reload-config.d.ts +9 -1
- package/dist/schemas/resume.d.ts +10 -0
- package/dist/schemas/resume.js +7 -0
- package/dist/schemas/sdcpp-config.d.ts +327 -0
- package/dist/schemas/sdcpp-config.js +102 -0
- package/dist/schemas/sdk-config.d.ts +1225 -235
- package/dist/schemas/sdk-config.js +4 -0
- package/dist/schemas/sdk-errors-server.d.ts +2 -0
- package/dist/schemas/sdk-errors-server.js +12 -0
- package/dist/schemas/suspend.d.ts +10 -0
- package/dist/schemas/suspend.js +7 -0
- package/dist/schemas/text-to-speech.d.ts +187 -10
- package/dist/schemas/text-to-speech.js +12 -4
- package/dist/schemas/transcription-config.d.ts +16 -56
- package/dist/schemas/transcription-config.js +0 -2
- package/dist/schemas/transcription.d.ts +66 -6
- package/dist/schemas/transcription.js +29 -7
- package/dist/schemas/translate.d.ts +14 -4
- package/dist/schemas/translate.js +10 -2
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/server/bare/delegate-rpc-client.js +3 -3
- package/dist/server/bare/hyperswarm.js +15 -3
- package/dist/server/bare/ops/embed.d.ts +8 -4
- package/dist/server/bare/ops/embed.js +15 -4
- package/dist/server/bare/ops/transcribe.d.ts +6 -2
- package/dist/server/bare/ops/transcribe.js +53 -1
- package/dist/server/bare/ops/translate.d.ts +4 -1
- package/dist/server/bare/ops/translate.js +28 -65
- package/dist/server/bare/ops/unload-model.js +2 -0
- 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 +3 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +45 -9
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +11 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +112 -0
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +175 -5
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +45 -35
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +11 -1
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +9 -4
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +17 -2
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +16 -15
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.d.ts +5 -7
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.js +11 -3
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +2 -0
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +24 -19
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.d.ts +7 -2
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.js +22 -97
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +98 -9
- package/dist/server/bare/plugins/onnx-tts/plugin.js +85 -46
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +30 -60
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +49 -37
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +3 -0
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +51 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +278 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +70 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +38 -2
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +43 -22
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +2 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +2 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +7 -0
- package/dist/server/bare/registry/model-config-utils.js +3 -0
- package/dist/server/bare/registry/model-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-registry.js +1 -1
- package/dist/server/bare/registry/registry-client.js +21 -0
- package/dist/server/bare/runtime-lifecycle.d.ts +28 -0
- package/dist/server/bare/runtime-lifecycle.js +132 -0
- package/dist/server/bare/types/addon-responses.d.ts +62 -0
- package/dist/server/bare/types/addon-responses.js +1 -0
- package/dist/server/env.js +3 -1
- package/dist/server/rpc/delegate-transport.js +1 -1
- package/dist/server/rpc/handle-request.js +50 -4
- package/dist/server/rpc/handler-registry.js +20 -1
- package/dist/server/rpc/handler-utils.d.ts +5 -3
- package/dist/server/rpc/handler-utils.js +52 -50
- package/dist/server/rpc/handlers/delete-cache.js +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.js +4 -0
- package/dist/server/rpc/handlers/finetune.d.ts +3 -0
- package/dist/server/rpc/handlers/finetune.js +16 -0
- package/dist/server/rpc/handlers/index.d.ts +10 -0
- package/dist/server/rpc/handlers/index.js +10 -0
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +24 -9
- package/dist/server/rpc/handlers/load-model/registry.d.ts +11 -0
- package/dist/server/rpc/handlers/load-model/registry.js +31 -4
- package/dist/server/rpc/handlers/plugin-dispatch.d.ts +1 -13
- package/dist/server/rpc/handlers/plugin-dispatch.js +21 -21
- package/dist/server/rpc/handlers/resume.d.ts +3 -0
- package/dist/server/rpc/handlers/resume.js +11 -0
- package/dist/server/rpc/handlers/suspend.d.ts +3 -0
- package/dist/server/rpc/handlers/suspend.js +11 -0
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/transcribe.d.ts +3 -0
- package/dist/server/rpc/handlers/transcribe.js +4 -0
- package/dist/server/rpc/profiling/operation-metrics.js +107 -16
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +51 -19
- package/dist/server/rpc/progress-throttle.d.ts +8 -0
- package/dist/server/rpc/progress-throttle.js +47 -0
- package/dist/server/rpc/rpc-utils.d.ts +5 -0
- package/dist/server/rpc/rpc-utils.js +11 -0
- package/dist/server/utils/path-security.js +1 -1
- package/dist/server/utils/tool-integration.js +10 -0
- package/dist/server/utils/tool-parser.js +9 -5
- package/dist/server/worker-core.d.ts +2 -0
- package/dist/server/worker-core.js +26 -23
- package/dist/server/worker.js +2 -1
- package/dist/utils/encoding.d.ts +9 -0
- package/dist/utils/encoding.js +14 -0
- package/dist/utils/errors-server.d.ts +6 -0
- package/dist/utils/errors-server.js +11 -0
- package/package.json +36 -25
- package/dist/server/rpc/delegate-utils.d.ts +0 -2
- package/dist/server/rpc/delegate-utils.js +0 -5
|
@@ -17,6 +17,7 @@ export const ttsSupertonicRuntimeConfigSchema = z.object({
|
|
|
17
17
|
language: ttsLanguageSchema,
|
|
18
18
|
ttsSpeed: z.number().optional(),
|
|
19
19
|
ttsNumInferenceSteps: z.number().optional(),
|
|
20
|
+
ttsSupertonicMultilingual: z.boolean().optional(),
|
|
20
21
|
});
|
|
21
22
|
export const ttsRuntimeConfigSchema = z.union([
|
|
22
23
|
ttsChatterboxRuntimeConfigSchema,
|
|
@@ -31,11 +32,13 @@ export const ttsChatterboxConfigSchema = ttsChatterboxRuntimeConfigSchema.extend
|
|
|
31
32
|
referenceAudioSrc: modelSrcInputSchema,
|
|
32
33
|
});
|
|
33
34
|
export const ttsSupertonicConfigSchema = ttsSupertonicRuntimeConfigSchema.extend({
|
|
34
|
-
ttsTokenizerSrc: modelSrcInputSchema,
|
|
35
35
|
ttsTextEncoderSrc: modelSrcInputSchema,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
ttsDurationPredictorSrc: modelSrcInputSchema,
|
|
37
|
+
ttsVectorEstimatorSrc: modelSrcInputSchema,
|
|
38
|
+
ttsVocoderSrc: modelSrcInputSchema,
|
|
39
|
+
ttsUnicodeIndexerSrc: modelSrcInputSchema,
|
|
40
|
+
ttsTtsConfigSrc: modelSrcInputSchema,
|
|
41
|
+
ttsVoiceStyleSrc: modelSrcInputSchema,
|
|
39
42
|
});
|
|
40
43
|
export const ttsConfigSchema = z.union([
|
|
41
44
|
ttsChatterboxConfigSchema,
|
|
@@ -50,8 +53,13 @@ export const ttsClientParamsSchema = z.object({
|
|
|
50
53
|
export const ttsRequestSchema = ttsClientParamsSchema.extend({
|
|
51
54
|
type: z.literal("textToSpeech"),
|
|
52
55
|
});
|
|
56
|
+
export const ttsStatsSchema = z.object({
|
|
57
|
+
audioDuration: z.number().optional(),
|
|
58
|
+
totalSamples: z.number().optional(),
|
|
59
|
+
});
|
|
53
60
|
export const ttsResponseSchema = z.object({
|
|
54
61
|
type: z.literal("textToSpeech"),
|
|
55
62
|
buffer: z.array(z.number()),
|
|
56
63
|
done: z.boolean().default(false),
|
|
64
|
+
stats: ttsStatsSchema.optional(),
|
|
57
65
|
});
|
|
@@ -83,6 +83,7 @@ export declare const whisperConfigSchema: z.ZodObject<{
|
|
|
83
83
|
"onnx-tts": "onnx-tts";
|
|
84
84
|
"parakeet-transcription": "parakeet-transcription";
|
|
85
85
|
"onnx-ocr": "onnx-ocr";
|
|
86
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
86
87
|
llm: "llm";
|
|
87
88
|
whisper: "whisper";
|
|
88
89
|
embeddings: "embeddings";
|
|
@@ -90,6 +91,7 @@ export declare const whisperConfigSchema: z.ZodObject<{
|
|
|
90
91
|
parakeet: "parakeet";
|
|
91
92
|
tts: "tts";
|
|
92
93
|
ocr: "ocr";
|
|
94
|
+
diffusion: "diffusion";
|
|
93
95
|
}>, z.ZodLiteral<"vad">]>>;
|
|
94
96
|
}, z.core.$strip>]>>;
|
|
95
97
|
}, z.core.$strip>;
|
|
@@ -144,6 +146,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
144
146
|
"onnx-tts": "onnx-tts";
|
|
145
147
|
"parakeet-transcription": "parakeet-transcription";
|
|
146
148
|
"onnx-ocr": "onnx-ocr";
|
|
149
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
147
150
|
llm: "llm";
|
|
148
151
|
whisper: "whisper";
|
|
149
152
|
embeddings: "embeddings";
|
|
@@ -151,34 +154,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
151
154
|
parakeet: "parakeet";
|
|
152
155
|
tts: "tts";
|
|
153
156
|
ocr: "ocr";
|
|
154
|
-
|
|
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";
|
|
157
|
+
diffusion: "diffusion";
|
|
182
158
|
}>, z.ZodLiteral<"vad">]>>;
|
|
183
159
|
}, z.core.$strip>]>>;
|
|
184
160
|
parakeetDecoderSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -200,6 +176,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
200
176
|
"onnx-tts": "onnx-tts";
|
|
201
177
|
"parakeet-transcription": "parakeet-transcription";
|
|
202
178
|
"onnx-ocr": "onnx-ocr";
|
|
179
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
203
180
|
llm: "llm";
|
|
204
181
|
whisper: "whisper";
|
|
205
182
|
embeddings: "embeddings";
|
|
@@ -207,6 +184,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
207
184
|
parakeet: "parakeet";
|
|
208
185
|
tts: "tts";
|
|
209
186
|
ocr: "ocr";
|
|
187
|
+
diffusion: "diffusion";
|
|
210
188
|
}>, z.ZodLiteral<"vad">]>>;
|
|
211
189
|
}, z.core.$strip>]>>;
|
|
212
190
|
parakeetVocabSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -228,6 +206,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
228
206
|
"onnx-tts": "onnx-tts";
|
|
229
207
|
"parakeet-transcription": "parakeet-transcription";
|
|
230
208
|
"onnx-ocr": "onnx-ocr";
|
|
209
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
231
210
|
llm: "llm";
|
|
232
211
|
whisper: "whisper";
|
|
233
212
|
embeddings: "embeddings";
|
|
@@ -235,6 +214,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
235
214
|
parakeet: "parakeet";
|
|
236
215
|
tts: "tts";
|
|
237
216
|
ocr: "ocr";
|
|
217
|
+
diffusion: "diffusion";
|
|
238
218
|
}>, z.ZodLiteral<"vad">]>>;
|
|
239
219
|
}, z.core.$strip>]>>;
|
|
240
220
|
parakeetPreprocessorSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -256,6 +236,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
256
236
|
"onnx-tts": "onnx-tts";
|
|
257
237
|
"parakeet-transcription": "parakeet-transcription";
|
|
258
238
|
"onnx-ocr": "onnx-ocr";
|
|
239
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
259
240
|
llm: "llm";
|
|
260
241
|
whisper: "whisper";
|
|
261
242
|
embeddings: "embeddings";
|
|
@@ -263,6 +244,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
263
244
|
parakeet: "parakeet";
|
|
264
245
|
tts: "tts";
|
|
265
246
|
ocr: "ocr";
|
|
247
|
+
diffusion: "diffusion";
|
|
266
248
|
}>, z.ZodLiteral<"vad">]>>;
|
|
267
249
|
}, z.core.$strip>]>>;
|
|
268
250
|
parakeetCtcModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -284,6 +266,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
284
266
|
"onnx-tts": "onnx-tts";
|
|
285
267
|
"parakeet-transcription": "parakeet-transcription";
|
|
286
268
|
"onnx-ocr": "onnx-ocr";
|
|
269
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
287
270
|
llm: "llm";
|
|
288
271
|
whisper: "whisper";
|
|
289
272
|
embeddings: "embeddings";
|
|
@@ -291,34 +274,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
291
274
|
parakeet: "parakeet";
|
|
292
275
|
tts: "tts";
|
|
293
276
|
ocr: "ocr";
|
|
294
|
-
|
|
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";
|
|
277
|
+
diffusion: "diffusion";
|
|
322
278
|
}>, z.ZodLiteral<"vad">]>>;
|
|
323
279
|
}, z.core.$strip>]>>;
|
|
324
280
|
parakeetTokenizerSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -340,6 +296,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
340
296
|
"onnx-tts": "onnx-tts";
|
|
341
297
|
"parakeet-transcription": "parakeet-transcription";
|
|
342
298
|
"onnx-ocr": "onnx-ocr";
|
|
299
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
343
300
|
llm: "llm";
|
|
344
301
|
whisper: "whisper";
|
|
345
302
|
embeddings: "embeddings";
|
|
@@ -347,6 +304,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
347
304
|
parakeet: "parakeet";
|
|
348
305
|
tts: "tts";
|
|
349
306
|
ocr: "ocr";
|
|
307
|
+
diffusion: "diffusion";
|
|
350
308
|
}>, z.ZodLiteral<"vad">]>>;
|
|
351
309
|
}, z.core.$strip>]>>;
|
|
352
310
|
parakeetSortformerSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -368,6 +326,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
368
326
|
"onnx-tts": "onnx-tts";
|
|
369
327
|
"parakeet-transcription": "parakeet-transcription";
|
|
370
328
|
"onnx-ocr": "onnx-ocr";
|
|
329
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
371
330
|
llm: "llm";
|
|
372
331
|
whisper: "whisper";
|
|
373
332
|
embeddings: "embeddings";
|
|
@@ -375,6 +334,7 @@ export declare const parakeetConfigSchema: z.ZodObject<{
|
|
|
375
334
|
parakeet: "parakeet";
|
|
376
335
|
tts: "tts";
|
|
377
336
|
ocr: "ocr";
|
|
337
|
+
diffusion: "diffusion";
|
|
378
338
|
}>, z.ZodLiteral<"vad">]>>;
|
|
379
339
|
}, z.core.$strip>]>>;
|
|
380
340
|
}, z.core.$strip>;
|
|
@@ -82,13 +82,11 @@ export const parakeetRuntimeConfigSchema = z.object({
|
|
|
82
82
|
export const parakeetConfigSchema = parakeetRuntimeConfigSchema.extend({
|
|
83
83
|
// TDT sources
|
|
84
84
|
parakeetEncoderSrc: modelSrcInputSchema.optional(),
|
|
85
|
-
parakeetEncoderDataSrc: modelSrcInputSchema.optional(),
|
|
86
85
|
parakeetDecoderSrc: modelSrcInputSchema.optional(),
|
|
87
86
|
parakeetVocabSrc: modelSrcInputSchema.optional(),
|
|
88
87
|
parakeetPreprocessorSrc: modelSrcInputSchema.optional(),
|
|
89
88
|
// CTC sources
|
|
90
89
|
parakeetCtcModelSrc: modelSrcInputSchema.optional(),
|
|
91
|
-
parakeetCtcModelDataSrc: modelSrcInputSchema.optional(),
|
|
92
90
|
parakeetTokenizerSrc: modelSrcInputSchema.optional(),
|
|
93
91
|
// Sortformer source
|
|
94
92
|
parakeetSortformerSrc: modelSrcInputSchema.optional(),
|
|
@@ -8,6 +8,7 @@ export declare const audioInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
8
8
|
}, z.core.$strip>], "type">;
|
|
9
9
|
export declare const transcribeParamsSchema: z.ZodObject<{
|
|
10
10
|
modelId: z.ZodString;
|
|
11
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
11
12
|
audioChunk: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
13
|
type: z.ZodLiteral<"base64">;
|
|
13
14
|
value: z.ZodString;
|
|
@@ -15,10 +16,22 @@ export declare const transcribeParamsSchema: z.ZodObject<{
|
|
|
15
16
|
type: z.ZodLiteral<"filePath">;
|
|
16
17
|
value: z.ZodString;
|
|
17
18
|
}, z.core.$strip>], "type">;
|
|
18
|
-
prompt: z.ZodOptional<z.ZodString>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const transcribeStatsSchema: z.ZodObject<{
|
|
21
|
+
audioDuration: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
realTimeFactor: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
tokensPerSecond: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
totalSegments: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
whisperEncodeTime: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
whisperDecodeTime: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
encoderTime: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
decoderTime: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
melSpecTime: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const transcribeRequestSchema: z.ZodObject<{
|
|
21
33
|
modelId: z.ZodString;
|
|
34
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
22
35
|
audioChunk: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
36
|
type: z.ZodLiteral<"base64">;
|
|
24
37
|
value: z.ZodString;
|
|
@@ -26,14 +39,25 @@ export declare const transcribeStreamRequestSchema: z.ZodObject<{
|
|
|
26
39
|
type: z.ZodLiteral<"filePath">;
|
|
27
40
|
value: z.ZodString;
|
|
28
41
|
}, z.core.$strip>], "type">;
|
|
29
|
-
|
|
30
|
-
type: z.ZodLiteral<"transcribeStream">;
|
|
42
|
+
type: z.ZodLiteral<"transcribe">;
|
|
31
43
|
}, z.core.$strip>;
|
|
32
|
-
export declare const
|
|
33
|
-
type: z.ZodLiteral<"transcribeStream">;
|
|
44
|
+
export declare const transcribeResponseSchema: z.ZodObject<{
|
|
34
45
|
text: z.ZodOptional<z.ZodString>;
|
|
35
46
|
done: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
audioDuration: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
realTimeFactor: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
tokensPerSecond: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
totalSegments: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
whisperEncodeTime: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
whisperDecodeTime: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
encoderTime: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
decoderTime: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
melSpecTime: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
36
59
|
error: z.ZodOptional<z.ZodString>;
|
|
60
|
+
type: z.ZodLiteral<"transcribe">;
|
|
37
61
|
}, z.core.$strip>;
|
|
38
62
|
export type AudioInput = z.infer<typeof audioInputSchema>;
|
|
39
63
|
export type TranscribeParams = z.infer<typeof transcribeParamsSchema>;
|
|
@@ -42,6 +66,42 @@ export type TranscribeClientParams = {
|
|
|
42
66
|
audioChunk: string | Buffer;
|
|
43
67
|
prompt?: string;
|
|
44
68
|
};
|
|
69
|
+
export type TranscribeRequest = z.infer<typeof transcribeRequestSchema>;
|
|
70
|
+
export type TranscribeResponse = z.infer<typeof transcribeResponseSchema>;
|
|
71
|
+
export declare const transcribeStreamRequestSchema: z.ZodObject<{
|
|
72
|
+
modelId: z.ZodString;
|
|
73
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
74
|
+
type: z.ZodLiteral<"transcribeStream">;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export declare const transcribeStreamResponseSchema: z.ZodObject<{
|
|
77
|
+
text: z.ZodOptional<z.ZodString>;
|
|
78
|
+
done: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
audioDuration: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
realTimeFactor: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
tokensPerSecond: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
totalSegments: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
whisperEncodeTime: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
whisperDecodeTime: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
encoderTime: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
decoderTime: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
melSpecTime: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
error: z.ZodOptional<z.ZodString>;
|
|
92
|
+
type: z.ZodLiteral<"transcribeStream">;
|
|
93
|
+
}, z.core.$strip>;
|
|
45
94
|
export type TranscribeStreamRequest = z.infer<typeof transcribeStreamRequestSchema>;
|
|
46
95
|
export type TranscribeStreamResponse = z.infer<typeof transcribeStreamResponseSchema>;
|
|
96
|
+
export type TranscribeStreamClientParams = {
|
|
97
|
+
modelId: string;
|
|
98
|
+
prompt?: string;
|
|
99
|
+
};
|
|
100
|
+
export interface TranscribeStreamSession {
|
|
101
|
+
write(audioChunk: Buffer): void;
|
|
102
|
+
end(): void;
|
|
103
|
+
destroy(): void;
|
|
104
|
+
[Symbol.asyncIterator](): AsyncIterator<string>;
|
|
105
|
+
}
|
|
106
|
+
export type TranscribeStats = z.infer<typeof transcribeStatsSchema>;
|
|
47
107
|
//# sourceMappingURL=transcription.d.ts.map
|
|
@@ -9,18 +9,40 @@ export const audioInputSchema = z.discriminatedUnion("type", [
|
|
|
9
9
|
value: z.string(),
|
|
10
10
|
}),
|
|
11
11
|
]);
|
|
12
|
-
|
|
12
|
+
const transcribeBaseSchema = z.object({
|
|
13
13
|
modelId: z.string(),
|
|
14
|
-
audioChunk: audioInputSchema,
|
|
15
14
|
prompt: z.string().optional(),
|
|
16
15
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
type: z.literal("transcribeStream"),
|
|
16
|
+
export const transcribeParamsSchema = transcribeBaseSchema.extend({
|
|
17
|
+
audioChunk: audioInputSchema,
|
|
20
18
|
});
|
|
21
|
-
export const
|
|
22
|
-
|
|
19
|
+
export const transcribeStatsSchema = z.object({
|
|
20
|
+
audioDuration: z.number().optional(),
|
|
21
|
+
realTimeFactor: z.number().optional(),
|
|
22
|
+
tokensPerSecond: z.number().optional(),
|
|
23
|
+
totalTokens: z.number().optional(),
|
|
24
|
+
totalSegments: z.number().optional(),
|
|
25
|
+
whisperEncodeTime: z.number().optional(),
|
|
26
|
+
whisperDecodeTime: z.number().optional(),
|
|
27
|
+
encoderTime: z.number().optional(),
|
|
28
|
+
decoderTime: z.number().optional(),
|
|
29
|
+
melSpecTime: z.number().optional(),
|
|
30
|
+
});
|
|
31
|
+
export const transcribeRequestSchema = transcribeParamsSchema.extend({
|
|
32
|
+
type: z.literal("transcribe"),
|
|
33
|
+
});
|
|
34
|
+
const transcriptionResultBase = z.object({
|
|
23
35
|
text: z.string().optional(),
|
|
24
36
|
done: z.boolean().optional(),
|
|
37
|
+
stats: transcribeStatsSchema.optional(),
|
|
25
38
|
error: z.string().optional(),
|
|
26
39
|
});
|
|
40
|
+
export const transcribeResponseSchema = transcriptionResultBase.extend({
|
|
41
|
+
type: z.literal("transcribe"),
|
|
42
|
+
});
|
|
43
|
+
export const transcribeStreamRequestSchema = transcribeBaseSchema.extend({
|
|
44
|
+
type: z.literal("transcribeStream"),
|
|
45
|
+
});
|
|
46
|
+
export const transcribeStreamResponseSchema = transcriptionResultBase.extend({
|
|
47
|
+
type: z.literal("transcribeStream"),
|
|
48
|
+
});
|
|
@@ -22,8 +22,13 @@ declare const translateParamsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
22
22
|
context: z.ZodOptional<z.ZodString>;
|
|
23
23
|
}, z.core.$strip>]>;
|
|
24
24
|
export declare const translationStatsSchema: z.ZodObject<{
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
totalTime: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
tokensPerSecond: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
timeToFirstToken: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
decodeTime: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
encodeTime: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
cacheTokens: z.ZodOptional<z.ZodNumber>;
|
|
27
32
|
}, z.core.$strip>;
|
|
28
33
|
export declare const translateRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
29
34
|
modelId: z.ZodString;
|
|
@@ -98,8 +103,13 @@ export declare const translateResponseSchema: z.ZodObject<{
|
|
|
98
103
|
token: z.ZodString;
|
|
99
104
|
done: z.ZodOptional<z.ZodBoolean>;
|
|
100
105
|
stats: z.ZodOptional<z.ZodObject<{
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
totalTime: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
tokensPerSecond: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
timeToFirstToken: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
decodeTime: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
encodeTime: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
cacheTokens: z.ZodOptional<z.ZodNumber>;
|
|
103
113
|
}, z.core.$strip>>;
|
|
104
114
|
error: z.ZodOptional<z.ZodString>;
|
|
105
115
|
}, z.core.$strip>;
|
|
@@ -26,8 +26,16 @@ const translateParamsSchema = z.union([
|
|
|
26
26
|
translateParamsLlmSchema,
|
|
27
27
|
]);
|
|
28
28
|
export const translationStatsSchema = z.object({
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// Common stats
|
|
30
|
+
totalTime: z.number().optional(),
|
|
31
|
+
totalTokens: z.number().optional(),
|
|
32
|
+
tokensPerSecond: z.number().optional(),
|
|
33
|
+
timeToFirstToken: z.number().optional(),
|
|
34
|
+
// NMT-specific
|
|
35
|
+
decodeTime: z.number().optional(),
|
|
36
|
+
encodeTime: z.number().optional(),
|
|
37
|
+
// LLM-specific
|
|
38
|
+
cacheTokens: z.number().optional(),
|
|
31
39
|
});
|
|
32
40
|
export const translateRequestSchema = z.union([
|
|
33
41
|
translateParamsNmtSchema.extend({ type: z.literal("translate") }),
|