@qvac/sdk 0.17.0 → 0.18.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 +83 -18
- package/README.md +19 -0
- package/dist/client/api/audio-gen.d.ts +17 -0
- package/dist/client/api/audio-gen.js +17 -0
- package/dist/client/api/finetune.d.ts +2 -0
- package/dist/client/api/finetune.js +7 -1
- package/dist/client/api/index.d.ts +1 -1
- package/dist/client/api/index.js +1 -1
- package/dist/client/api/load-model.d.ts +8 -0
- package/dist/client/api/transcribe.d.ts +19 -2
- package/dist/client/api/transcribe.js +66 -27
- package/dist/client/api/translate.d.ts +3 -2
- package/dist/client/api/translate.js +42 -21
- package/dist/client/api/vla.d.ts +42 -1
- package/dist/client/api/vla.js +50 -1
- package/dist/commands/bundle/entry-gen.d.ts +4 -0
- package/dist/commands/bundle/entry-gen.js +6 -0
- package/dist/commands/bundle/index.js +19 -12
- package/dist/examples/asr/parakeet-indic-conformer-filesystem.d.ts +2 -0
- package/dist/examples/asr/parakeet-indic-conformer-filesystem.js +52 -0
- package/dist/examples/audiogen/generate-cover.d.ts +2 -0
- package/dist/examples/audiogen/generate-cover.js +100 -0
- package/dist/examples/llamacpp-fallback.d.ts +2 -0
- package/dist/examples/llamacpp-fallback.js +34 -0
- package/dist/examples/multi-job-completion.d.ts +28 -0
- package/dist/examples/multi-job-completion.js +128 -0
- package/dist/examples/profiling/basic.js +32 -1
- package/dist/examples/system-resources.d.ts +2 -0
- package/dist/examples/system-resources.js +86 -0
- package/dist/examples/tts/audio8.d.ts +2 -0
- package/dist/examples/tts/audio8.js +54 -0
- package/dist/examples/tts/cosyvoice3.d.ts +2 -0
- package/dist/examples/tts/cosyvoice3.js +52 -0
- package/dist/examples/vla-groot.js +92 -49
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/models/registry/models.d.ts +782 -6
- package/dist/models/registry/models.js +2664 -1859
- package/dist/schemas/audio-gen.d.ts +103 -0
- package/dist/schemas/audio-gen.js +135 -4
- package/dist/schemas/common.d.ts +550 -11
- package/dist/schemas/constants-registry.d.ts +18 -4
- package/dist/schemas/constants-registry.js +16 -3
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/llamacpp-config.d.ts +10 -10
- package/dist/schemas/llamacpp-config.js +12 -5
- package/dist/schemas/load-model.d.ts +3678 -323
- package/dist/schemas/load-model.js +21 -3
- package/dist/schemas/sdk-config.d.ts +60 -24
- package/dist/schemas/sdk-errors-server.d.ts +1 -0
- package/dist/schemas/sdk-errors-server.js +5 -0
- package/dist/schemas/text-to-speech.d.ts +1086 -110
- package/dist/schemas/text-to-speech.js +194 -4
- package/dist/schemas/tools.d.ts +0 -16
- package/dist/schemas/tools.js +0 -15
- package/dist/schemas/transcription-config.d.ts +2 -0
- package/dist/schemas/transcription-config.js +10 -4
- package/dist/schemas/transcription.d.ts +3 -0
- package/dist/schemas/vla.d.ts +83 -0
- package/dist/schemas/vla.js +105 -2
- package/dist/scripts/link-workspace-inference.d.ts +2 -0
- package/dist/scripts/link-workspace-inference.js +31 -0
- package/dist/server/bare/ops/cancel.d.ts +1 -1
- package/dist/server/bare/ops/cancel.js +1 -1
- package/dist/server/bare/ops/kv-cache-retention.js +11 -0
- package/dist/server/bare/ops/kv-cache-utils.d.ts +1 -1
- package/dist/server/bare/ops/kv-cache-utils.js +40 -12
- package/dist/server/bare/ops/transcribe.d.ts +2 -2
- package/dist/server/bare/ops/transcribe.js +54 -48
- package/dist/server/bare/ops/translate-stats.d.ts +5 -0
- package/dist/server/bare/ops/translate-stats.js +11 -0
- package/dist/server/bare/ops/translate.js +66 -38
- package/dist/server/bare/ops/unload-model.js +30 -24
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-input.d.ts +20 -0
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-input.js +153 -0
- package/dist/server/bare/plugins/audiogen-ggml/ops/audio-gen-stream.js +52 -1
- package/dist/server/bare/plugins/audiogen-ggml/plugin.d.ts +28 -0
- package/dist/server/bare/plugins/ggml-ocr/plugin.js +3 -1
- package/dist/server/bare/plugins/ggml-vla/ops/vla-set-embodiment.d.ts +3 -0
- package/dist/server/bare/plugins/ggml-vla/ops/vla-set-embodiment.js +9 -0
- package/dist/server/bare/plugins/ggml-vla/plugin.d.ts +37 -0
- package/dist/server/bare/plugins/ggml-vla/plugin.js +21 -4
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-completion-stream.js +16 -15
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +1 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +2 -2
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.d.ts +6 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stats.js +10 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +131 -123
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +110 -20
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.d.ts +49 -23
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-session.js +308 -143
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.d.ts +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/kv-cache-state.js +2 -2
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +6 -6
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +55 -36
- package/dist/server/bare/plugins/llamacpp-completion/transform.js +1 -7
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +2 -3
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +6 -5
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +27 -16
- package/dist/server/bare/plugins/tts-ggml/ops/parler-options.js +23 -3
- package/dist/server/bare/plugins/tts-ggml/plugin.d.ts +302 -4
- package/dist/server/bare/plugins/tts-ggml/plugin.js +131 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +48 -39
- package/dist/server/bare/registry/model-registry.d.ts +1 -0
- package/dist/server/bare/runtime/request-registry-singleton.js +29 -15
- package/dist/server/bare/runtime/request-registry.d.ts +27 -0
- package/dist/server/bare/runtime/request-registry.js +246 -76
- package/dist/server/bare/types/addon-responses.d.ts +4 -12
- package/dist/server/rpc/handlers/load-model/handler.js +2 -2
- package/dist/server/rpc/handlers/load-model/resolve-session.d.ts +1 -1
- package/dist/server/rpc/handlers/load-model/resolve-session.js +3 -3
- package/dist/server/rpc/handlers/load-model/resolve.d.ts +12 -2
- package/dist/server/rpc/handlers/load-model/resolve.js +90 -12
- package/dist/server/utils/audio/decoder.d.ts +37 -1
- package/dist/server/utils/audio/decoder.js +81 -51
- package/dist/server/utils/config-transform.d.ts +3 -0
- package/dist/server/utils/config-transform.js +6 -0
- package/dist/server/utils/index.d.ts +0 -1
- package/dist/server/utils/index.js +0 -1
- package/dist/server/utils/shard-utils.d.ts +1 -0
- package/dist/server/utils/shard-utils.js +14 -0
- package/dist/server/utils/tool-integration.d.ts +3 -10
- package/dist/server/utils/tool-integration.js +3 -12
- package/dist/utils/errors-server.d.ts +3 -0
- package/dist/utils/errors-server.js +5 -0
- package/package.json +12 -14
- package/dist/examples/llamacpp-dynamic-tools.d.ts +0 -2
- package/dist/examples/llamacpp-dynamic-tools.js +0 -152
- package/dist/models/update-models/codegen.d.ts +0 -3
- package/dist/models/update-models/codegen.js +0 -196
- package/dist/models/update-models/companions.d.ts +0 -30
- package/dist/models/update-models/companions.js +0 -296
- package/dist/models/update-models/history.d.ts +0 -24
- package/dist/models/update-models/history.js +0 -107
- package/dist/models/update-models/index.d.ts +0 -2
- package/dist/models/update-models/index.js +0 -123
- package/dist/models/update-models/naming.d.ts +0 -4
- package/dist/models/update-models/naming.js +0 -396
- package/dist/models/update-models/processing.d.ts +0 -8
- package/dist/models/update-models/processing.js +0 -65
- package/dist/models/update-models/registry.d.ts +0 -5
- package/dist/models/update-models/registry.js +0 -87
- package/dist/models/update-models/shards.d.ts +0 -4
- package/dist/models/update-models/shards.js +0 -57
- package/dist/models/update-models/types.d.ts +0 -88
- package/dist/models/update-models/types.js +0 -1
- package/dist/models/update-models/utils.d.ts +0 -3
- package/dist/models/update-models/utils.js +0 -21
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.d.ts +0 -23
- package/dist/server/bare/plugins/llamacpp-completion/ops/batch-cancelled.js +0 -30
- package/dist/server/utils/expand-gguf-shards.d.ts +0 -3
- package/dist/server/utils/expand-gguf-shards.js +0 -22
|
@@ -39,12 +39,273 @@ export declare const ttsPlugin: {
|
|
|
39
39
|
surprise: "surprise";
|
|
40
40
|
}>>;
|
|
41
41
|
pitch: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
|
-
pace: import("zod").ZodOptional<import("zod").
|
|
42
|
+
pace: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
43
|
+
slow: "slow";
|
|
44
|
+
moderate: "moderate";
|
|
45
|
+
fast: "fast";
|
|
46
|
+
}>>;
|
|
43
47
|
expressivity: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
48
|
noise: import("zod").ZodOptional<import("zod").ZodString>;
|
|
45
49
|
reverb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
50
|
quality: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
51
|
ttsEngine: import("zod").ZodLiteral<"parler">;
|
|
52
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
53
|
+
lavasrEnhancerModelSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
54
|
+
src: import("zod").ZodString;
|
|
55
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
registryPath: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
registrySource: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
+
blobCoreKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
60
|
+
blobIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
61
|
+
engine: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
expectedSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
63
|
+
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
+
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
65
|
+
embeddings: "embeddings";
|
|
66
|
+
diffusion: "diffusion";
|
|
67
|
+
audiogen: "audiogen";
|
|
68
|
+
tts: "tts";
|
|
69
|
+
ocr: "ocr";
|
|
70
|
+
vla: "vla";
|
|
71
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
72
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
73
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
74
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
75
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
76
|
+
"onnx-tts": "onnx-tts";
|
|
77
|
+
"tts-ggml": "tts-ggml";
|
|
78
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
79
|
+
"ggml-ocr": "ggml-ocr";
|
|
80
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
81
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
82
|
+
"ggml-vla": "ggml-vla";
|
|
83
|
+
"ggml-classification": "ggml-classification";
|
|
84
|
+
llm: "llm";
|
|
85
|
+
whisper: "whisper";
|
|
86
|
+
bci: "bci";
|
|
87
|
+
nmt: "nmt";
|
|
88
|
+
parakeet: "parakeet";
|
|
89
|
+
classification: "classification";
|
|
90
|
+
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
91
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
92
|
+
lavasrDenoiserModelSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
93
|
+
src: import("zod").ZodString;
|
|
94
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
95
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
|
+
registryPath: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
+
registrySource: import("zod").ZodOptional<import("zod").ZodString>;
|
|
98
|
+
blobCoreKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
|
+
blobIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
100
|
+
engine: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
|
+
expectedSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
102
|
+
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
103
|
+
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
104
|
+
embeddings: "embeddings";
|
|
105
|
+
diffusion: "diffusion";
|
|
106
|
+
audiogen: "audiogen";
|
|
107
|
+
tts: "tts";
|
|
108
|
+
ocr: "ocr";
|
|
109
|
+
vla: "vla";
|
|
110
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
111
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
112
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
113
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
114
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
115
|
+
"onnx-tts": "onnx-tts";
|
|
116
|
+
"tts-ggml": "tts-ggml";
|
|
117
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
118
|
+
"ggml-ocr": "ggml-ocr";
|
|
119
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
120
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
121
|
+
"ggml-vla": "ggml-vla";
|
|
122
|
+
"ggml-classification": "ggml-classification";
|
|
123
|
+
llm: "llm";
|
|
124
|
+
whisper: "whisper";
|
|
125
|
+
bci: "bci";
|
|
126
|
+
nmt: "nmt";
|
|
127
|
+
parakeet: "parakeet";
|
|
128
|
+
classification: "classification";
|
|
129
|
+
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
130
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
131
|
+
ttsEngine: import("zod").ZodLiteral<"cosyvoice3">;
|
|
132
|
+
emotion: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
133
|
+
anger: "anger";
|
|
134
|
+
happy: "happy";
|
|
135
|
+
neutral: "neutral";
|
|
136
|
+
sad: "sad";
|
|
137
|
+
}>>;
|
|
138
|
+
pace: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
139
|
+
slow: "slow";
|
|
140
|
+
moderate: "moderate";
|
|
141
|
+
fast: "fast";
|
|
142
|
+
}>>;
|
|
143
|
+
instruct: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
144
|
+
dialect: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
145
|
+
cantonese: "cantonese";
|
|
146
|
+
northeastern: "northeastern";
|
|
147
|
+
gansu: "gansu";
|
|
148
|
+
guizhou: "guizhou";
|
|
149
|
+
henan: "henan";
|
|
150
|
+
hubei: "hubei";
|
|
151
|
+
hunan: "hunan";
|
|
152
|
+
jiangxi: "jiangxi";
|
|
153
|
+
minnan: "minnan";
|
|
154
|
+
ningxia: "ningxia";
|
|
155
|
+
shanxi: "shanxi";
|
|
156
|
+
shaanxi: "shaanxi";
|
|
157
|
+
shandong: "shandong";
|
|
158
|
+
shanghai: "shanghai";
|
|
159
|
+
sichuan: "sichuan";
|
|
160
|
+
tianjin: "tianjin";
|
|
161
|
+
yunnan: "yunnan";
|
|
162
|
+
}>>;
|
|
163
|
+
volume: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
164
|
+
loud: "loud";
|
|
165
|
+
soft: "soft";
|
|
166
|
+
}>>;
|
|
167
|
+
style: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
168
|
+
peppa: "peppa";
|
|
169
|
+
robot: "robot";
|
|
170
|
+
}>>;
|
|
171
|
+
}, import("zod/v4/core").$strict>]>>;
|
|
172
|
+
useGPU: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
173
|
+
outputSampleRate: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
174
|
+
streamChunkTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
175
|
+
streamFirstChunkTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
176
|
+
threads: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
177
|
+
nGpuLayers: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
178
|
+
seed: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
179
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
180
|
+
audio8CodecDecoderModelSrc: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
181
|
+
src: import("zod").ZodString;
|
|
182
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
183
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
184
|
+
registryPath: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
|
+
registrySource: import("zod").ZodOptional<import("zod").ZodString>;
|
|
186
|
+
blobCoreKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
187
|
+
blobIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
188
|
+
engine: import("zod").ZodOptional<import("zod").ZodString>;
|
|
189
|
+
expectedSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
190
|
+
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
191
|
+
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
192
|
+
embeddings: "embeddings";
|
|
193
|
+
diffusion: "diffusion";
|
|
194
|
+
audiogen: "audiogen";
|
|
195
|
+
tts: "tts";
|
|
196
|
+
ocr: "ocr";
|
|
197
|
+
vla: "vla";
|
|
198
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
199
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
200
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
201
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
202
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
203
|
+
"onnx-tts": "onnx-tts";
|
|
204
|
+
"tts-ggml": "tts-ggml";
|
|
205
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
206
|
+
"ggml-ocr": "ggml-ocr";
|
|
207
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
208
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
209
|
+
"ggml-vla": "ggml-vla";
|
|
210
|
+
"ggml-classification": "ggml-classification";
|
|
211
|
+
llm: "llm";
|
|
212
|
+
whisper: "whisper";
|
|
213
|
+
bci: "bci";
|
|
214
|
+
nmt: "nmt";
|
|
215
|
+
parakeet: "parakeet";
|
|
216
|
+
classification: "classification";
|
|
217
|
+
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
218
|
+
}, import("zod/v4/core").$strip>]>;
|
|
219
|
+
audio8CodecEncoderModelSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
220
|
+
src: import("zod").ZodString;
|
|
221
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
222
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
223
|
+
registryPath: import("zod").ZodOptional<import("zod").ZodString>;
|
|
224
|
+
registrySource: import("zod").ZodOptional<import("zod").ZodString>;
|
|
225
|
+
blobCoreKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
226
|
+
blobIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
227
|
+
engine: import("zod").ZodOptional<import("zod").ZodString>;
|
|
228
|
+
expectedSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
229
|
+
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
230
|
+
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
231
|
+
embeddings: "embeddings";
|
|
232
|
+
diffusion: "diffusion";
|
|
233
|
+
audiogen: "audiogen";
|
|
234
|
+
tts: "tts";
|
|
235
|
+
ocr: "ocr";
|
|
236
|
+
vla: "vla";
|
|
237
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
238
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
239
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
240
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
241
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
242
|
+
"onnx-tts": "onnx-tts";
|
|
243
|
+
"tts-ggml": "tts-ggml";
|
|
244
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
245
|
+
"ggml-ocr": "ggml-ocr";
|
|
246
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
247
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
248
|
+
"ggml-vla": "ggml-vla";
|
|
249
|
+
"ggml-classification": "ggml-classification";
|
|
250
|
+
llm: "llm";
|
|
251
|
+
whisper: "whisper";
|
|
252
|
+
bci: "bci";
|
|
253
|
+
nmt: "nmt";
|
|
254
|
+
parakeet: "parakeet";
|
|
255
|
+
classification: "classification";
|
|
256
|
+
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
257
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
258
|
+
referenceAudioSrc: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
259
|
+
src: import("zod").ZodString;
|
|
260
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
261
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
262
|
+
registryPath: import("zod").ZodOptional<import("zod").ZodString>;
|
|
263
|
+
registrySource: import("zod").ZodOptional<import("zod").ZodString>;
|
|
264
|
+
blobCoreKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
265
|
+
blobIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
266
|
+
engine: import("zod").ZodOptional<import("zod").ZodString>;
|
|
267
|
+
expectedSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
268
|
+
sha256Checksum: import("zod").ZodOptional<import("zod").ZodString>;
|
|
269
|
+
addon: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
270
|
+
embeddings: "embeddings";
|
|
271
|
+
diffusion: "diffusion";
|
|
272
|
+
audiogen: "audiogen";
|
|
273
|
+
tts: "tts";
|
|
274
|
+
ocr: "ocr";
|
|
275
|
+
vla: "vla";
|
|
276
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
277
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
278
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
279
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
280
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
281
|
+
"onnx-tts": "onnx-tts";
|
|
282
|
+
"tts-ggml": "tts-ggml";
|
|
283
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
284
|
+
"ggml-ocr": "ggml-ocr";
|
|
285
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
286
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
287
|
+
"ggml-vla": "ggml-vla";
|
|
288
|
+
"ggml-classification": "ggml-classification";
|
|
289
|
+
llm: "llm";
|
|
290
|
+
whisper: "whisper";
|
|
291
|
+
bci: "bci";
|
|
292
|
+
nmt: "nmt";
|
|
293
|
+
parakeet: "parakeet";
|
|
294
|
+
classification: "classification";
|
|
295
|
+
}>, import("zod").ZodLiteral<"vad">]>>;
|
|
296
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
297
|
+
ttsEngine: import("zod").ZodLiteral<"audio8">;
|
|
298
|
+
referenceText: import("zod").ZodOptional<import("zod").ZodString>;
|
|
299
|
+
greedy: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
300
|
+
temperature: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
301
|
+
topK: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
302
|
+
topP: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
303
|
+
maxFrames: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
304
|
+
useGPU: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
305
|
+
outputSampleRate: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
306
|
+
threads: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
307
|
+
nGpuLayers: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
308
|
+
seed: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
48
309
|
}, import("zod/v4/core").$strict>], "ttsEngine">;
|
|
49
310
|
resolveConfig(cfg: Record<string, unknown>, ctx: ResolveContext): Promise<ResolveResult<{
|
|
50
311
|
ttsEngine: "parler";
|
|
@@ -66,11 +327,27 @@ export declare const ttsPlugin: {
|
|
|
66
327
|
voice?: string | undefined;
|
|
67
328
|
emotion?: "command" | "anger" | "narration" | "conversation" | "disgust" | "fear" | "happy" | "neutral" | "proper noun" | "news" | "sad" | "surprise" | undefined;
|
|
68
329
|
pitch?: string | undefined;
|
|
69
|
-
pace?:
|
|
330
|
+
pace?: "slow" | "moderate" | "fast" | undefined;
|
|
70
331
|
expressivity?: string | undefined;
|
|
71
332
|
noise?: string | undefined;
|
|
72
333
|
reverb?: string | undefined;
|
|
73
334
|
quality?: string | undefined;
|
|
335
|
+
} | {
|
|
336
|
+
ttsEngine: "cosyvoice3";
|
|
337
|
+
emotion?: "anger" | "happy" | "neutral" | "sad" | undefined;
|
|
338
|
+
pace?: "slow" | "moderate" | "fast" | undefined;
|
|
339
|
+
instruct?: string | {
|
|
340
|
+
dialect?: "cantonese" | "northeastern" | "gansu" | "guizhou" | "henan" | "hubei" | "hunan" | "jiangxi" | "minnan" | "ningxia" | "shanxi" | "shaanxi" | "shandong" | "shanghai" | "sichuan" | "tianjin" | "yunnan" | undefined;
|
|
341
|
+
volume?: "loud" | "soft" | undefined;
|
|
342
|
+
style?: "peppa" | "robot" | undefined;
|
|
343
|
+
} | undefined;
|
|
344
|
+
useGPU?: boolean | undefined;
|
|
345
|
+
outputSampleRate?: number | undefined;
|
|
346
|
+
streamChunkTokens?: number | undefined;
|
|
347
|
+
streamFirstChunkTokens?: number | undefined;
|
|
348
|
+
threads?: number | undefined;
|
|
349
|
+
nGpuLayers?: number | undefined;
|
|
350
|
+
seed?: number | undefined;
|
|
74
351
|
} | {
|
|
75
352
|
ttsEngine: "chatterbox";
|
|
76
353
|
language: "en" | "ar" | "de" | "es" | "fi" | "fr" | "it" | "ja" | "ko" | "nl" | "pl" | "pt" | "ru" | "zh" | "da" | "el" | "he" | "hi" | "ms" | "no" | "sv" | "tr" | "sw";
|
|
@@ -92,6 +369,19 @@ export declare const ttsPlugin: {
|
|
|
92
369
|
useGPU?: boolean | undefined;
|
|
93
370
|
outputSampleRate?: number | undefined;
|
|
94
371
|
vulkanCacheDir?: string | undefined;
|
|
372
|
+
} | {
|
|
373
|
+
ttsEngine: "audio8";
|
|
374
|
+
referenceText?: string | undefined;
|
|
375
|
+
greedy?: boolean | undefined;
|
|
376
|
+
temperature?: number | undefined;
|
|
377
|
+
topK?: number | undefined;
|
|
378
|
+
topP?: number | undefined;
|
|
379
|
+
maxFrames?: number | undefined;
|
|
380
|
+
useGPU?: boolean | undefined;
|
|
381
|
+
outputSampleRate?: number | undefined;
|
|
382
|
+
threads?: number | undefined;
|
|
383
|
+
nGpuLayers?: number | undefined;
|
|
384
|
+
seed?: number | undefined;
|
|
95
385
|
}, string>>;
|
|
96
386
|
createModel(params: CreateModelParams): PluginModelResult;
|
|
97
387
|
handlers: {
|
|
@@ -115,7 +405,11 @@ export declare const ttsPlugin: {
|
|
|
115
405
|
surprise: "surprise";
|
|
116
406
|
}>>;
|
|
117
407
|
pitch: import("zod").ZodOptional<import("zod").ZodString>;
|
|
118
|
-
pace: import("zod").ZodOptional<import("zod").
|
|
408
|
+
pace: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
409
|
+
slow: "slow";
|
|
410
|
+
moderate: "moderate";
|
|
411
|
+
fast: "fast";
|
|
412
|
+
}>>;
|
|
119
413
|
expressivity: import("zod").ZodOptional<import("zod").ZodString>;
|
|
120
414
|
noise: import("zod").ZodOptional<import("zod").ZodString>;
|
|
121
415
|
reverb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -160,7 +454,11 @@ export declare const ttsPlugin: {
|
|
|
160
454
|
surprise: "surprise";
|
|
161
455
|
}>>;
|
|
162
456
|
pitch: import("zod").ZodOptional<import("zod").ZodString>;
|
|
163
|
-
pace: import("zod").ZodOptional<import("zod").
|
|
457
|
+
pace: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
458
|
+
slow: "slow";
|
|
459
|
+
moderate: "moderate";
|
|
460
|
+
fast: "fast";
|
|
461
|
+
}>>;
|
|
164
462
|
expressivity: import("zod").ZodOptional<import("zod").ZodString>;
|
|
165
463
|
noise: import("zod").ZodOptional<import("zod").ZodString>;
|
|
166
464
|
reverb: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -66,6 +66,34 @@ async function resolveSupertonicConfig(config, ctx) {
|
|
|
66
66
|
function resolveParlerConfig(config) {
|
|
67
67
|
return { config, artifacts: {} };
|
|
68
68
|
}
|
|
69
|
+
// CosyVoice3's multi-file layout (flow/HiFT GGUFs, voice.gguf, vocab.json,
|
|
70
|
+
// merges.txt) rides the primary model's registry companion set, so only the
|
|
71
|
+
// optional LavaSR post-processing sources need resolution here.
|
|
72
|
+
async function resolveCosyvoice3Config(config, ctx) {
|
|
73
|
+
const { lavasrEnhancerModelSrc, lavasrDenoiserModelSrc, ...runtime } = config;
|
|
74
|
+
const lavasrArtifacts = await resolveLavasrArtifacts(lavasrEnhancerModelSrc, lavasrDenoiserModelSrc, ctx);
|
|
75
|
+
return { config: runtime, artifacts: lavasrArtifacts };
|
|
76
|
+
}
|
|
77
|
+
async function resolveAudio8Config(config, ctx) {
|
|
78
|
+
const { audio8CodecDecoderModelSrc, audio8CodecEncoderModelSrc, referenceAudioSrc, ...runtime } = config;
|
|
79
|
+
if (!audio8CodecDecoderModelSrc) {
|
|
80
|
+
throw new TtsArtifactsRequiredError();
|
|
81
|
+
}
|
|
82
|
+
const resolve = ctx.resolveModelPath;
|
|
83
|
+
const [audio8CodecDecoderPath, audio8CodecEncoderPath, referenceAudioPath] = await Promise.all([
|
|
84
|
+
resolve(audio8CodecDecoderModelSrc),
|
|
85
|
+
audio8CodecEncoderModelSrc ? resolve(audio8CodecEncoderModelSrc) : Promise.resolve(undefined),
|
|
86
|
+
referenceAudioSrc ? resolve(referenceAudioSrc) : Promise.resolve(undefined)
|
|
87
|
+
]);
|
|
88
|
+
return {
|
|
89
|
+
config: runtime,
|
|
90
|
+
artifacts: {
|
|
91
|
+
audio8CodecDecoderPath,
|
|
92
|
+
...(audio8CodecEncoderPath ? { audio8CodecEncoderPath } : {}),
|
|
93
|
+
...(referenceAudioPath ? { referenceAudioPath } : {})
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
69
97
|
// Build the optional LavaSR `files` entries from resolved artifacts. Supplying
|
|
70
98
|
// a path is what enables the stage in @qvac/tts-ggml — there is no on/off flag.
|
|
71
99
|
function lavasrFiles(artifacts) {
|
|
@@ -194,6 +222,97 @@ function createParlerModel(modelId, config, params) {
|
|
|
194
222
|
registerAddonLogger(modelId, ModelType.ttsGgml, logger);
|
|
195
223
|
return { model };
|
|
196
224
|
}
|
|
225
|
+
// Rebuild the structured instruct without explicit-undefined keys so it
|
|
226
|
+
// satisfies the addon's exactOptionalPropertyTypes constructor typing.
|
|
227
|
+
function toAddonInstruct(instruct) {
|
|
228
|
+
if (typeof instruct === 'string')
|
|
229
|
+
return instruct;
|
|
230
|
+
return {
|
|
231
|
+
...(instruct.dialect !== undefined ? { dialect: instruct.dialect } : {}),
|
|
232
|
+
...(instruct.volume !== undefined ? { volume: instruct.volume } : {}),
|
|
233
|
+
...(instruct.style !== undefined ? { style: instruct.style } : {})
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function createCosyvoice3Model(modelId, config, params, artifacts) {
|
|
237
|
+
const cosyvoiceLlmModel = params.modelPath;
|
|
238
|
+
if (!cosyvoiceLlmModel) {
|
|
239
|
+
throw new TtsArtifactsRequiredError();
|
|
240
|
+
}
|
|
241
|
+
const logger = createStreamLogger(modelId, ModelType.ttsGgml);
|
|
242
|
+
const model = new TTSGgml({
|
|
243
|
+
engine: TTSGgml.ENGINE_COSYVOICE3,
|
|
244
|
+
// The LLM GGUF's registry companion set co-locates the flow/HiFT GGUFs,
|
|
245
|
+
// voice.gguf, vocab.json and merges.txt next to it, so its containing
|
|
246
|
+
// directory is the addon's model dir.
|
|
247
|
+
files: {
|
|
248
|
+
cosyvoiceModelDir: dirname(cosyvoiceLlmModel),
|
|
249
|
+
cosyvoiceLlmModel,
|
|
250
|
+
...lavasrFiles(artifacts)
|
|
251
|
+
},
|
|
252
|
+
...(config.emotion !== undefined ? { emotion: config.emotion } : {}),
|
|
253
|
+
...(config.pace !== undefined ? { pace: config.pace } : {}),
|
|
254
|
+
...(config.instruct !== undefined ? { instruct: toAddonInstruct(config.instruct) } : {}),
|
|
255
|
+
...(config.streamChunkTokens !== undefined
|
|
256
|
+
? { streamChunkTokens: config.streamChunkTokens }
|
|
257
|
+
: {}),
|
|
258
|
+
...(config.streamFirstChunkTokens !== undefined
|
|
259
|
+
? { streamFirstChunkTokens: config.streamFirstChunkTokens }
|
|
260
|
+
: {}),
|
|
261
|
+
...(config.threads !== undefined ? { threads: config.threads } : {}),
|
|
262
|
+
...(config.nGpuLayers !== undefined ? { nGpuLayers: config.nGpuLayers } : {}),
|
|
263
|
+
...(config.seed !== undefined ? { seed: config.seed } : {}),
|
|
264
|
+
config: {
|
|
265
|
+
...(config.useGPU !== undefined ? { useGPU: config.useGPU } : {}),
|
|
266
|
+
...(config.outputSampleRate !== undefined
|
|
267
|
+
? { outputSampleRate: config.outputSampleRate }
|
|
268
|
+
: {})
|
|
269
|
+
},
|
|
270
|
+
logger,
|
|
271
|
+
opts: { stats: true },
|
|
272
|
+
exclusiveRun: true
|
|
273
|
+
});
|
|
274
|
+
registerAddonLogger(modelId, ModelType.ttsGgml, logger);
|
|
275
|
+
return { model };
|
|
276
|
+
}
|
|
277
|
+
function createAudio8Model(modelId, config, params, artifacts) {
|
|
278
|
+
const audio8Lm = params.modelPath;
|
|
279
|
+
const audio8CodecDecoder = artifacts['audio8CodecDecoderPath'];
|
|
280
|
+
const audio8CodecEncoder = artifacts['audio8CodecEncoderPath'];
|
|
281
|
+
const referenceAudioPath = artifacts['referenceAudioPath'];
|
|
282
|
+
if (!audio8Lm || !audio8CodecDecoder) {
|
|
283
|
+
throw new TtsArtifactsRequiredError();
|
|
284
|
+
}
|
|
285
|
+
const logger = createStreamLogger(modelId, ModelType.ttsGgml);
|
|
286
|
+
const model = new TTSGgml({
|
|
287
|
+
engine: TTSGgml.ENGINE_AUDIO8,
|
|
288
|
+
files: {
|
|
289
|
+
audio8Lm,
|
|
290
|
+
audio8CodecDecoder,
|
|
291
|
+
...(audio8CodecEncoder ? { audio8CodecEncoder } : {})
|
|
292
|
+
},
|
|
293
|
+
...(referenceAudioPath ? { referenceAudio: referenceAudioPath } : {}),
|
|
294
|
+
...(config.referenceText !== undefined ? { referenceText: config.referenceText } : {}),
|
|
295
|
+
...(config.greedy !== undefined ? { greedy: config.greedy } : {}),
|
|
296
|
+
...(config.temperature !== undefined ? { temperature: config.temperature } : {}),
|
|
297
|
+
...(config.topK !== undefined ? { topK: config.topK } : {}),
|
|
298
|
+
...(config.topP !== undefined ? { topP: config.topP } : {}),
|
|
299
|
+
...(config.maxFrames !== undefined ? { maxFrames: config.maxFrames } : {}),
|
|
300
|
+
...(config.threads !== undefined ? { threads: config.threads } : {}),
|
|
301
|
+
...(config.nGpuLayers !== undefined ? { nGpuLayers: config.nGpuLayers } : {}),
|
|
302
|
+
...(config.seed !== undefined ? { seed: config.seed } : {}),
|
|
303
|
+
config: {
|
|
304
|
+
...(config.useGPU !== undefined ? { useGPU: config.useGPU } : {}),
|
|
305
|
+
...(config.outputSampleRate !== undefined
|
|
306
|
+
? { outputSampleRate: config.outputSampleRate }
|
|
307
|
+
: {})
|
|
308
|
+
},
|
|
309
|
+
logger,
|
|
310
|
+
opts: { stats: true },
|
|
311
|
+
exclusiveRun: true
|
|
312
|
+
});
|
|
313
|
+
registerAddonLogger(modelId, ModelType.ttsGgml, logger);
|
|
314
|
+
return { model };
|
|
315
|
+
}
|
|
197
316
|
export const ttsPlugin = definePlugin({
|
|
198
317
|
modelType: ModelType.ttsGgml,
|
|
199
318
|
displayName: 'TTS (GGML)',
|
|
@@ -205,6 +324,12 @@ export const ttsPlugin = definePlugin({
|
|
|
205
324
|
if (ttsEngine === 'parler') {
|
|
206
325
|
return resolveParlerConfig(cfg);
|
|
207
326
|
}
|
|
327
|
+
if (ttsEngine === 'cosyvoice3') {
|
|
328
|
+
return resolveCosyvoice3Config(cfg, ctx);
|
|
329
|
+
}
|
|
330
|
+
if (ttsEngine === 'audio8') {
|
|
331
|
+
return resolveAudio8Config(cfg, ctx);
|
|
332
|
+
}
|
|
208
333
|
if (ttsEngine === 'supertonic') {
|
|
209
334
|
return resolveSupertonicConfig(cfg, ctx);
|
|
210
335
|
}
|
|
@@ -216,6 +341,12 @@ export const ttsPlugin = definePlugin({
|
|
|
216
341
|
if (config.ttsEngine === 'parler') {
|
|
217
342
|
return createParlerModel(params.modelId, config, params);
|
|
218
343
|
}
|
|
344
|
+
if (config.ttsEngine === 'cosyvoice3') {
|
|
345
|
+
return createCosyvoice3Model(params.modelId, config, params, artifacts);
|
|
346
|
+
}
|
|
347
|
+
if (config.ttsEngine === 'audio8') {
|
|
348
|
+
return createAudio8Model(params.modelId, config, params, artifacts);
|
|
349
|
+
}
|
|
219
350
|
if (config.ttsEngine === 'supertonic') {
|
|
220
351
|
return createSupertonicModel(params.modelId, config, params, artifacts);
|
|
221
352
|
}
|
|
@@ -112,53 +112,62 @@ export const whisperPlugin = definePlugin({
|
|
|
112
112
|
const iterator = metadata
|
|
113
113
|
? transcribeStream(request.modelId, inputStream, request.prompt, true, streamOpts, request.requestId)
|
|
114
114
|
: transcribeStream(request.modelId, inputStream, request.prompt, false, streamOpts, request.requestId);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
// stable SDK-level Whisper/Parakeet variants.
|
|
130
|
-
if (value.source === 'parakeet') {
|
|
115
|
+
try {
|
|
116
|
+
let result = await iterator.next();
|
|
117
|
+
while (!result.done) {
|
|
118
|
+
const value = result.value;
|
|
119
|
+
if (typeof value === 'object' && value !== null && 'type' in value) {
|
|
120
|
+
if (value.type === 'vad') {
|
|
121
|
+
yield {
|
|
122
|
+
type: 'transcribeStream',
|
|
123
|
+
vad: {
|
|
124
|
+
speaking: value.speaking,
|
|
125
|
+
probability: value.probability
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
result = await iterator.next();
|
|
131
129
|
continue;
|
|
132
130
|
}
|
|
133
|
-
if (
|
|
131
|
+
if (value.type === 'endOfTurn') {
|
|
132
|
+
// The shared ASR op normalizes addon engine sources to the
|
|
133
|
+
// stable SDK-level Whisper/Parakeet variants.
|
|
134
|
+
if (value.source !== 'parakeet' && typeof value.silenceDurationMs === 'number') {
|
|
135
|
+
yield {
|
|
136
|
+
type: 'transcribeStream',
|
|
137
|
+
endOfTurn: {
|
|
138
|
+
source: 'whisper',
|
|
139
|
+
silenceDurationMs: value.silenceDurationMs
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
result = await iterator.next();
|
|
134
144
|
continue;
|
|
135
145
|
}
|
|
136
|
-
|
|
137
|
-
type: 'transcribeStream',
|
|
138
|
-
endOfTurn: {
|
|
139
|
-
source: 'whisper',
|
|
140
|
-
silenceDurationMs: value.silenceDurationMs
|
|
141
|
-
}
|
|
142
|
-
};
|
|
146
|
+
result = await iterator.next();
|
|
143
147
|
continue;
|
|
144
148
|
}
|
|
145
|
-
|
|
149
|
+
yield metadata
|
|
150
|
+
? {
|
|
151
|
+
type: 'transcribeStream',
|
|
152
|
+
segment: value
|
|
153
|
+
}
|
|
154
|
+
: {
|
|
155
|
+
type: 'transcribeStream',
|
|
156
|
+
text: value
|
|
157
|
+
};
|
|
158
|
+
result = await iterator.next();
|
|
146
159
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
const { modelExecutionMs, stats } = result.value;
|
|
161
|
+
yield attachModelExecutionMs({
|
|
162
|
+
type: 'transcribeStream',
|
|
163
|
+
text: '',
|
|
164
|
+
done: true,
|
|
165
|
+
...(stats && { stats })
|
|
166
|
+
}, modelExecutionMs);
|
|
167
|
+
}
|
|
168
|
+
finally {
|
|
169
|
+
await iterator.return?.(undefined);
|
|
156
170
|
}
|
|
157
|
-
yield {
|
|
158
|
-
type: 'transcribeStream',
|
|
159
|
-
text: '',
|
|
160
|
-
done: true
|
|
161
|
-
};
|
|
162
171
|
}
|
|
163
172
|
})
|
|
164
173
|
},
|