mulmocast 1.2.62 → 1.2.63
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/lib/types/schema.d.ts +243 -1
- package/lib/types/schema.js +20 -18
- package/lib/types/type.d.ts +3 -1
- package/package.json +1 -1
package/lib/types/schema.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export declare const speechOptionsSchema: z.ZodObject<{
|
|
|
54
54
|
speed?: number | undefined;
|
|
55
55
|
instruction?: string | undefined;
|
|
56
56
|
}>;
|
|
57
|
+
export declare const defaultSpeaker = "Presenter";
|
|
57
58
|
export declare const text2SpeechProviderSchema: z.ZodDefault<z.ZodEnum<[string, ...string[]]>>;
|
|
58
59
|
export declare const speakerDataSchema: z.ZodObject<{
|
|
59
60
|
displayName: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -92,6 +93,103 @@ export declare const speakerDataSchema: z.ZodObject<{
|
|
|
92
93
|
provider?: string | undefined;
|
|
93
94
|
model?: string | undefined;
|
|
94
95
|
}>;
|
|
96
|
+
export declare const speakerSchema: z.ZodObject<{
|
|
97
|
+
displayName: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
98
|
+
voiceId: z.ZodString;
|
|
99
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
speechOptions: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, "strict", z.ZodTypeAny, {
|
|
104
|
+
speed?: number | undefined;
|
|
105
|
+
instruction?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
speed?: number | undefined;
|
|
108
|
+
instruction?: string | undefined;
|
|
109
|
+
}>>;
|
|
110
|
+
provider: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
|
|
111
|
+
model: z.ZodOptional<z.ZodString>;
|
|
112
|
+
} & {
|
|
113
|
+
lang: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
114
|
+
displayName: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
115
|
+
voiceId: z.ZodString;
|
|
116
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
speechOptions: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, "strict", z.ZodTypeAny, {
|
|
121
|
+
speed?: number | undefined;
|
|
122
|
+
instruction?: string | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
speed?: number | undefined;
|
|
125
|
+
instruction?: string | undefined;
|
|
126
|
+
}>>;
|
|
127
|
+
provider: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
|
|
128
|
+
model: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, "strict", z.ZodTypeAny, {
|
|
130
|
+
voiceId: string;
|
|
131
|
+
displayName?: Record<string, string> | undefined;
|
|
132
|
+
isDefault?: boolean | undefined;
|
|
133
|
+
speechOptions?: {
|
|
134
|
+
speed?: number | undefined;
|
|
135
|
+
instruction?: string | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
provider?: string | undefined;
|
|
138
|
+
model?: string | undefined;
|
|
139
|
+
}, {
|
|
140
|
+
voiceId: string;
|
|
141
|
+
displayName?: Record<string, string> | undefined;
|
|
142
|
+
isDefault?: boolean | undefined;
|
|
143
|
+
speechOptions?: {
|
|
144
|
+
speed?: number | undefined;
|
|
145
|
+
instruction?: string | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
provider?: string | undefined;
|
|
148
|
+
model?: string | undefined;
|
|
149
|
+
}>>>;
|
|
150
|
+
}, "strict", z.ZodTypeAny, {
|
|
151
|
+
voiceId: string;
|
|
152
|
+
lang?: Record<string, {
|
|
153
|
+
voiceId: string;
|
|
154
|
+
displayName?: Record<string, string> | undefined;
|
|
155
|
+
isDefault?: boolean | undefined;
|
|
156
|
+
speechOptions?: {
|
|
157
|
+
speed?: number | undefined;
|
|
158
|
+
instruction?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
provider?: string | undefined;
|
|
161
|
+
model?: string | undefined;
|
|
162
|
+
}> | undefined;
|
|
163
|
+
displayName?: Record<string, string> | undefined;
|
|
164
|
+
isDefault?: boolean | undefined;
|
|
165
|
+
speechOptions?: {
|
|
166
|
+
speed?: number | undefined;
|
|
167
|
+
instruction?: string | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
provider?: string | undefined;
|
|
170
|
+
model?: string | undefined;
|
|
171
|
+
}, {
|
|
172
|
+
voiceId: string;
|
|
173
|
+
lang?: Record<string, {
|
|
174
|
+
voiceId: string;
|
|
175
|
+
displayName?: Record<string, string> | undefined;
|
|
176
|
+
isDefault?: boolean | undefined;
|
|
177
|
+
speechOptions?: {
|
|
178
|
+
speed?: number | undefined;
|
|
179
|
+
instruction?: string | undefined;
|
|
180
|
+
} | undefined;
|
|
181
|
+
provider?: string | undefined;
|
|
182
|
+
model?: string | undefined;
|
|
183
|
+
}> | undefined;
|
|
184
|
+
displayName?: Record<string, string> | undefined;
|
|
185
|
+
isDefault?: boolean | undefined;
|
|
186
|
+
speechOptions?: {
|
|
187
|
+
speed?: number | undefined;
|
|
188
|
+
instruction?: string | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
provider?: string | undefined;
|
|
191
|
+
model?: string | undefined;
|
|
192
|
+
}>;
|
|
95
193
|
export declare const speakerDictionarySchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
96
194
|
displayName: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
97
195
|
voiceId: z.ZodString;
|
|
@@ -189,6 +287,151 @@ export declare const speakerDictionarySchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
189
287
|
provider?: string | undefined;
|
|
190
288
|
model?: string | undefined;
|
|
191
289
|
}>>;
|
|
290
|
+
export declare const mulmoSpeechParamsSchema: z.ZodDefault<z.ZodObject<{
|
|
291
|
+
speakers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
292
|
+
displayName: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
293
|
+
voiceId: z.ZodString;
|
|
294
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
295
|
+
speechOptions: z.ZodOptional<z.ZodObject<{
|
|
296
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
298
|
+
}, "strict", z.ZodTypeAny, {
|
|
299
|
+
speed?: number | undefined;
|
|
300
|
+
instruction?: string | undefined;
|
|
301
|
+
}, {
|
|
302
|
+
speed?: number | undefined;
|
|
303
|
+
instruction?: string | undefined;
|
|
304
|
+
}>>;
|
|
305
|
+
provider: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
|
|
306
|
+
model: z.ZodOptional<z.ZodString>;
|
|
307
|
+
} & {
|
|
308
|
+
lang: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
309
|
+
displayName: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
310
|
+
voiceId: z.ZodString;
|
|
311
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
speechOptions: z.ZodOptional<z.ZodObject<{
|
|
313
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
315
|
+
}, "strict", z.ZodTypeAny, {
|
|
316
|
+
speed?: number | undefined;
|
|
317
|
+
instruction?: string | undefined;
|
|
318
|
+
}, {
|
|
319
|
+
speed?: number | undefined;
|
|
320
|
+
instruction?: string | undefined;
|
|
321
|
+
}>>;
|
|
322
|
+
provider: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
|
|
323
|
+
model: z.ZodOptional<z.ZodString>;
|
|
324
|
+
}, "strict", z.ZodTypeAny, {
|
|
325
|
+
voiceId: string;
|
|
326
|
+
displayName?: Record<string, string> | undefined;
|
|
327
|
+
isDefault?: boolean | undefined;
|
|
328
|
+
speechOptions?: {
|
|
329
|
+
speed?: number | undefined;
|
|
330
|
+
instruction?: string | undefined;
|
|
331
|
+
} | undefined;
|
|
332
|
+
provider?: string | undefined;
|
|
333
|
+
model?: string | undefined;
|
|
334
|
+
}, {
|
|
335
|
+
voiceId: string;
|
|
336
|
+
displayName?: Record<string, string> | undefined;
|
|
337
|
+
isDefault?: boolean | undefined;
|
|
338
|
+
speechOptions?: {
|
|
339
|
+
speed?: number | undefined;
|
|
340
|
+
instruction?: string | undefined;
|
|
341
|
+
} | undefined;
|
|
342
|
+
provider?: string | undefined;
|
|
343
|
+
model?: string | undefined;
|
|
344
|
+
}>>>;
|
|
345
|
+
}, "strict", z.ZodTypeAny, {
|
|
346
|
+
voiceId: string;
|
|
347
|
+
lang?: Record<string, {
|
|
348
|
+
voiceId: string;
|
|
349
|
+
displayName?: Record<string, string> | undefined;
|
|
350
|
+
isDefault?: boolean | undefined;
|
|
351
|
+
speechOptions?: {
|
|
352
|
+
speed?: number | undefined;
|
|
353
|
+
instruction?: string | undefined;
|
|
354
|
+
} | undefined;
|
|
355
|
+
provider?: string | undefined;
|
|
356
|
+
model?: string | undefined;
|
|
357
|
+
}> | undefined;
|
|
358
|
+
displayName?: Record<string, string> | undefined;
|
|
359
|
+
isDefault?: boolean | undefined;
|
|
360
|
+
speechOptions?: {
|
|
361
|
+
speed?: number | undefined;
|
|
362
|
+
instruction?: string | undefined;
|
|
363
|
+
} | undefined;
|
|
364
|
+
provider?: string | undefined;
|
|
365
|
+
model?: string | undefined;
|
|
366
|
+
}, {
|
|
367
|
+
voiceId: string;
|
|
368
|
+
lang?: Record<string, {
|
|
369
|
+
voiceId: string;
|
|
370
|
+
displayName?: Record<string, string> | undefined;
|
|
371
|
+
isDefault?: boolean | undefined;
|
|
372
|
+
speechOptions?: {
|
|
373
|
+
speed?: number | undefined;
|
|
374
|
+
instruction?: string | undefined;
|
|
375
|
+
} | undefined;
|
|
376
|
+
provider?: string | undefined;
|
|
377
|
+
model?: string | undefined;
|
|
378
|
+
}> | undefined;
|
|
379
|
+
displayName?: Record<string, string> | undefined;
|
|
380
|
+
isDefault?: boolean | undefined;
|
|
381
|
+
speechOptions?: {
|
|
382
|
+
speed?: number | undefined;
|
|
383
|
+
instruction?: string | undefined;
|
|
384
|
+
} | undefined;
|
|
385
|
+
provider?: string | undefined;
|
|
386
|
+
model?: string | undefined;
|
|
387
|
+
}>>;
|
|
388
|
+
}, "strip", z.ZodTypeAny, {
|
|
389
|
+
speakers: Record<string, {
|
|
390
|
+
voiceId: string;
|
|
391
|
+
lang?: Record<string, {
|
|
392
|
+
voiceId: string;
|
|
393
|
+
displayName?: Record<string, string> | undefined;
|
|
394
|
+
isDefault?: boolean | undefined;
|
|
395
|
+
speechOptions?: {
|
|
396
|
+
speed?: number | undefined;
|
|
397
|
+
instruction?: string | undefined;
|
|
398
|
+
} | undefined;
|
|
399
|
+
provider?: string | undefined;
|
|
400
|
+
model?: string | undefined;
|
|
401
|
+
}> | undefined;
|
|
402
|
+
displayName?: Record<string, string> | undefined;
|
|
403
|
+
isDefault?: boolean | undefined;
|
|
404
|
+
speechOptions?: {
|
|
405
|
+
speed?: number | undefined;
|
|
406
|
+
instruction?: string | undefined;
|
|
407
|
+
} | undefined;
|
|
408
|
+
provider?: string | undefined;
|
|
409
|
+
model?: string | undefined;
|
|
410
|
+
}>;
|
|
411
|
+
}, {
|
|
412
|
+
speakers: Record<string, {
|
|
413
|
+
voiceId: string;
|
|
414
|
+
lang?: Record<string, {
|
|
415
|
+
voiceId: string;
|
|
416
|
+
displayName?: Record<string, string> | undefined;
|
|
417
|
+
isDefault?: boolean | undefined;
|
|
418
|
+
speechOptions?: {
|
|
419
|
+
speed?: number | undefined;
|
|
420
|
+
instruction?: string | undefined;
|
|
421
|
+
} | undefined;
|
|
422
|
+
provider?: string | undefined;
|
|
423
|
+
model?: string | undefined;
|
|
424
|
+
}> | undefined;
|
|
425
|
+
displayName?: Record<string, string> | undefined;
|
|
426
|
+
isDefault?: boolean | undefined;
|
|
427
|
+
speechOptions?: {
|
|
428
|
+
speed?: number | undefined;
|
|
429
|
+
instruction?: string | undefined;
|
|
430
|
+
} | undefined;
|
|
431
|
+
provider?: string | undefined;
|
|
432
|
+
model?: string | undefined;
|
|
433
|
+
}>;
|
|
434
|
+
}>>;
|
|
192
435
|
export declare const mediaSourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
193
436
|
kind: z.ZodLiteral<"url">;
|
|
194
437
|
url: z.ZodString;
|
|
@@ -2410,7 +2653,6 @@ export declare const mulmoMovieParamsSchema: z.ZodObject<{
|
|
|
2410
2653
|
duration?: number | undefined;
|
|
2411
2654
|
} | undefined;
|
|
2412
2655
|
}>;
|
|
2413
|
-
export declare const defaultSpeaker = "Presenter";
|
|
2414
2656
|
export declare const mulmoPresentationStyleSchema: z.ZodObject<{
|
|
2415
2657
|
$mulmocast: z.ZodObject<{
|
|
2416
2658
|
version: z.ZodLiteral<"1.1">;
|
package/lib/types/schema.js
CHANGED
|
@@ -23,6 +23,7 @@ export const speechOptionsSchema = z
|
|
|
23
23
|
})
|
|
24
24
|
.strict();
|
|
25
25
|
const speakerIdSchema = z.string();
|
|
26
|
+
export const defaultSpeaker = "Presenter";
|
|
26
27
|
export const text2SpeechProviderSchema = z.enum(Object.keys(provider2TTSAgent)).default(defaultProviders.tts);
|
|
27
28
|
export const speakerDataSchema = z
|
|
28
29
|
.object({
|
|
@@ -34,9 +35,25 @@ export const speakerDataSchema = z
|
|
|
34
35
|
model: z.string().optional().describe("TTS model to use for this speaker"),
|
|
35
36
|
})
|
|
36
37
|
.strict();
|
|
37
|
-
export const
|
|
38
|
+
export const speakerSchema = speakerDataSchema.extend({
|
|
38
39
|
lang: z.record(langSchema, speakerDataSchema).optional(),
|
|
39
|
-
})
|
|
40
|
+
});
|
|
41
|
+
export const speakerDictionarySchema = z.record(speakerIdSchema, speakerSchema);
|
|
42
|
+
export const mulmoSpeechParamsSchema = z
|
|
43
|
+
.object({
|
|
44
|
+
speakers: speakerDictionarySchema,
|
|
45
|
+
})
|
|
46
|
+
.default({
|
|
47
|
+
speakers: {
|
|
48
|
+
[defaultSpeaker]: {
|
|
49
|
+
provider: defaultProviders.tts,
|
|
50
|
+
voiceId: "shimmer",
|
|
51
|
+
displayName: {
|
|
52
|
+
en: defaultSpeaker,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
40
57
|
export const mediaSourceSchema = z.discriminatedUnion("kind", [
|
|
41
58
|
z.object({ kind: z.literal("url"), url: URLStringSchema }).strict(), // https://example.com/foo.pdf
|
|
42
59
|
z.object({ kind: z.literal("base64"), data: z.string().min(1) }).strict(), // base64
|
|
@@ -335,25 +352,10 @@ export const mulmoMovieParamsSchema = z
|
|
|
335
352
|
fillOption: mulmoFillOptionSchema.optional(), // for movie.ts
|
|
336
353
|
})
|
|
337
354
|
.strict();
|
|
338
|
-
export const defaultSpeaker = "Presenter";
|
|
339
355
|
export const mulmoPresentationStyleSchema = z.object({
|
|
340
356
|
$mulmocast: mulmoCastCreditSchema,
|
|
341
357
|
canvasSize: mulmoCanvasDimensionSchema, // has default value
|
|
342
|
-
speechParams:
|
|
343
|
-
.object({
|
|
344
|
-
speakers: speakerDictionarySchema,
|
|
345
|
-
})
|
|
346
|
-
.default({
|
|
347
|
-
speakers: {
|
|
348
|
-
[defaultSpeaker]: {
|
|
349
|
-
provider: defaultProviders.tts,
|
|
350
|
-
voiceId: "shimmer",
|
|
351
|
-
displayName: {
|
|
352
|
-
en: defaultSpeaker,
|
|
353
|
-
},
|
|
354
|
-
},
|
|
355
|
-
},
|
|
356
|
-
}),
|
|
358
|
+
speechParams: mulmoSpeechParamsSchema,
|
|
357
359
|
imageParams: mulmoImageParamsSchema.optional().default({
|
|
358
360
|
provider: defaultProviders.text2image,
|
|
359
361
|
images: {},
|
package/lib/types/type.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type CallbackFunction } from "graphai";
|
|
2
|
-
import { langSchema, localizedTextSchema, mulmoBeatSchema, mulmoScriptSchema, mulmoStudioSchema, mulmoStudioBeatSchema, mulmoStoryboardSchema, mulmoStoryboardSceneSchema, mulmoStudioMultiLingualSchema, mulmoStudioMultiLingualArraySchema, mulmoStudioMultiLingualDataSchema, mulmoStudioMultiLingualFileSchema, speakerDictionarySchema, mulmoImageParamsSchema, mulmoImageParamsImagesValueSchema, mulmoImageParamsImagesSchema, mulmoFillOptionSchema, mulmoMovieParamsSchema, textSlideParamsSchema, speechOptionsSchema, speakerDataSchema, mulmoCanvasDimensionSchema, mulmoPromptTemplateSchema, mulmoPromptTemplateFileSchema, text2ImageProviderSchema, text2HtmlImageProviderSchema, text2MovieProviderSchema, text2SpeechProviderSchema, mulmoPresentationStyleSchema, multiLingualTextsSchema, mulmoImageAssetSchema, mulmoMermaidMediaSchema, mulmoTextSlideMediaSchema, mulmoMarkdownMediaSchema, mulmoImageMediaSchema, mulmoChartMediaSchema, mediaSourceSchema, mediaSourceMermaidSchema, mulmoSessionStateSchema, mulmoOpenAIImageModelSchema, mulmoGoogleImageModelSchema, mulmoGoogleMovieModelSchema, mulmoReplicateMovieModelSchema, mulmoImagePromptMediaSchema } from "./schema.js";
|
|
2
|
+
import { langSchema, localizedTextSchema, mulmoBeatSchema, mulmoScriptSchema, mulmoStudioSchema, mulmoStudioBeatSchema, mulmoStoryboardSchema, mulmoStoryboardSceneSchema, mulmoStudioMultiLingualSchema, mulmoStudioMultiLingualArraySchema, mulmoStudioMultiLingualDataSchema, mulmoStudioMultiLingualFileSchema, speakerDictionarySchema, speakerSchema, mulmoSpeechParamsSchema, mulmoImageParamsSchema, mulmoImageParamsImagesValueSchema, mulmoImageParamsImagesSchema, mulmoFillOptionSchema, mulmoMovieParamsSchema, textSlideParamsSchema, speechOptionsSchema, speakerDataSchema, mulmoCanvasDimensionSchema, mulmoPromptTemplateSchema, mulmoPromptTemplateFileSchema, text2ImageProviderSchema, text2HtmlImageProviderSchema, text2MovieProviderSchema, text2SpeechProviderSchema, mulmoPresentationStyleSchema, multiLingualTextsSchema, mulmoImageAssetSchema, mulmoMermaidMediaSchema, mulmoTextSlideMediaSchema, mulmoMarkdownMediaSchema, mulmoImageMediaSchema, mulmoChartMediaSchema, mediaSourceSchema, mediaSourceMermaidSchema, mulmoSessionStateSchema, mulmoOpenAIImageModelSchema, mulmoGoogleImageModelSchema, mulmoGoogleMovieModelSchema, mulmoReplicateMovieModelSchema, mulmoImagePromptMediaSchema } from "./schema.js";
|
|
3
3
|
import { pdf_modes, pdf_sizes, storyToScriptGenerateMode } from "../utils/const.js";
|
|
4
4
|
import type { LLM } from "../utils/provider2agent.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
export type LANG = z.infer<typeof langSchema>;
|
|
7
7
|
export type MulmoBeat = z.infer<typeof mulmoBeatSchema>;
|
|
8
|
+
export type MulmoSpeechParams = z.infer<typeof mulmoSpeechParamsSchema>;
|
|
9
|
+
export type Speaker = z.infer<typeof speakerSchema>;
|
|
8
10
|
export type SpeakerDictonary = z.infer<typeof speakerDictionarySchema>;
|
|
9
11
|
export type SpeechOptions = z.infer<typeof speechOptionsSchema>;
|
|
10
12
|
export type SpeakerData = z.infer<typeof speakerDataSchema>;
|