mulmocast 1.1.0 → 1.1.1
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/assets/templates/ani.json +2 -2
- package/assets/templates/ani_ja.json +2 -2
- package/lib/actions/image_agents.d.ts +21 -0
- package/lib/actions/image_agents.js +7 -0
- package/lib/actions/images.js +33 -4
- package/lib/actions/movie.js +3 -2
- package/lib/agents/index.d.ts +2 -1
- package/lib/agents/index.js +2 -1
- package/lib/agents/lipsync_replicate_agent.d.ts +5 -0
- package/lib/agents/lipsync_replicate_agent.js +57 -0
- package/lib/data/index.d.ts +2 -0
- package/lib/data/index.js +2 -0
- package/lib/data/promptTemplates.d.ts +695 -0
- package/lib/data/promptTemplates.js +957 -0
- package/lib/data/scriptTemplates.d.ts +233 -0
- package/lib/data/scriptTemplates.js +580 -0
- package/lib/index.browser.d.ts +2 -1
- package/lib/index.browser.js +2 -1
- package/lib/methods/mulmo_presentation_style.d.ts +8 -0
- package/lib/methods/mulmo_presentation_style.js +8 -1
- package/lib/tools/story_to_script.js +2 -2
- package/lib/types/agent.d.ts +10 -0
- package/lib/types/schema.d.ts +230 -0
- package/lib/types/schema.js +9 -0
- package/lib/types/type.d.ts +1 -1
- package/lib/utils/context.d.ts +15 -0
- package/lib/utils/context.js +1 -0
- package/lib/utils/file.d.ts +8 -3
- package/lib/utils/file.js +46 -20
- package/lib/utils/preprocess.d.ts +10 -0
- package/lib/utils/provider2agent.d.ts +11 -0
- package/lib/utils/provider2agent.js +13 -0
- package/lib/utils/utils.js +3 -0
- package/package.json +8 -4
- package/scripts/templates/business.json +1 -1
- package/scripts/templates/children_book.json +1 -1
- package/scripts/templates/coding.json +1 -1
- package/scripts/templates/html.json +1 -1
- package/scripts/templates/image_prompt_only_template.json +1 -1
- package/scripts/templates/image_prompts_template.json +1 -1
- package/scripts/templates/image_refs.json +1 -1
- package/scripts/templates/movie_prompts_no_text_template.json +1 -1
- package/scripts/templates/movie_prompts_template.json +1 -1
- package/scripts/templates/presentation.json +1 -1
- package/scripts/templates/sensei_and_taro.json +1 -1
- package/scripts/templates/shorts_template.json +1 -1
- package/scripts/templates/text_only_template.json +1 -1
- package/scripts/templates/voice_over.json +1 -1
package/lib/types/schema.js
CHANGED
|
@@ -233,6 +233,10 @@ export const mulmoSoundEffectParamsSchema = z.object({
|
|
|
233
233
|
provider: text2SoundEffectProviderSchema.optional(),
|
|
234
234
|
model: z.string().optional(), // default: provider specific
|
|
235
235
|
});
|
|
236
|
+
export const mulmoLipSyncParamsSchema = z.object({
|
|
237
|
+
provider: z.string().optional(), // lip sync provider
|
|
238
|
+
model: z.string().optional(), // default: provider specific
|
|
239
|
+
});
|
|
236
240
|
export const mulmoBeatSchema = z
|
|
237
241
|
.object({
|
|
238
242
|
speaker: speakerIdSchema.optional(),
|
|
@@ -253,6 +257,7 @@ export const mulmoBeatSchema = z
|
|
|
253
257
|
})
|
|
254
258
|
.optional(),
|
|
255
259
|
soundEffectParams: mulmoSoundEffectParamsSchema.optional(),
|
|
260
|
+
lipSyncParams: mulmoLipSyncParamsSchema.optional(),
|
|
256
261
|
htmlImageParams: mulmoHtmlImageParamsSchema.optional(),
|
|
257
262
|
speechOptions: speechOptionsSchema.optional(),
|
|
258
263
|
textSlideParams: textSlideParamsSchema.optional(),
|
|
@@ -262,6 +267,7 @@ export const mulmoBeatSchema = z
|
|
|
262
267
|
moviePrompt: z.string().optional(),
|
|
263
268
|
soundEffectPrompt: z.string().optional(),
|
|
264
269
|
htmlPrompt: htmlPromptParamsSchema.optional(),
|
|
270
|
+
enableLipSync: z.boolean().optional().describe("Enable lip sync generation for this beat"),
|
|
265
271
|
})
|
|
266
272
|
.strict();
|
|
267
273
|
export const mulmoCanvasDimensionSchema = z
|
|
@@ -332,6 +338,7 @@ export const mulmoPresentationStyleSchema = z.object({
|
|
|
332
338
|
soundEffectParams: mulmoSoundEffectParamsSchema.optional().default({
|
|
333
339
|
provider: defaultProviders.soundEffect,
|
|
334
340
|
}),
|
|
341
|
+
lipSyncParams: mulmoLipSyncParamsSchema.optional(),
|
|
335
342
|
htmlImageParams: mulmoHtmlImageParamsSchema
|
|
336
343
|
.extend({
|
|
337
344
|
provider: text2HtmlImageProviderSchema,
|
|
@@ -381,6 +388,7 @@ export const mulmoStudioBeatSchema = z
|
|
|
381
388
|
imageFile: z.string().optional(), // path to the image
|
|
382
389
|
movieFile: z.string().optional(), // path to the movie file
|
|
383
390
|
soundEffectFile: z.string().optional(), // path to the sound effect file
|
|
391
|
+
lipSyncFile: z.string().optional(), // path to the lip sync file
|
|
384
392
|
captionFile: z.string().optional(), // path to the caption image
|
|
385
393
|
})
|
|
386
394
|
.strict();
|
|
@@ -406,6 +414,7 @@ export const mulmoSessionStateSchema = z.object({
|
|
|
406
414
|
html: z.record(z.number().int(), z.boolean()),
|
|
407
415
|
imageReference: z.record(z.number().int(), z.boolean()),
|
|
408
416
|
soundEffect: z.record(z.number().int(), z.boolean()),
|
|
417
|
+
lipSync: z.record(z.number().int(), z.boolean()),
|
|
409
418
|
}),
|
|
410
419
|
});
|
|
411
420
|
export const mulmoStudioSchema = z
|
package/lib/types/type.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export type Text2HtmlAgentInfo = {
|
|
|
91
91
|
export type BeatMediaType = "movie" | "image";
|
|
92
92
|
export type StoryToScriptGenerateMode = (typeof storyToScriptGenerateMode)[keyof typeof storyToScriptGenerateMode];
|
|
93
93
|
export type SessionType = "audio" | "image" | "video" | "multiLingual" | "caption" | "pdf";
|
|
94
|
-
export type BeatSessionType = "audio" | "image" | "multiLingual" | "caption" | "movie" | "html" | "imageReference" | "soundEffect";
|
|
94
|
+
export type BeatSessionType = "audio" | "image" | "multiLingual" | "caption" | "movie" | "html" | "imageReference" | "soundEffect" | "lipSync";
|
|
95
95
|
export type SessionProgressEvent = {
|
|
96
96
|
kind: "session";
|
|
97
97
|
sessionType: SessionType;
|
package/lib/utils/context.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
17
17
|
imageFile?: string | undefined;
|
|
18
18
|
movieFile?: string | undefined;
|
|
19
19
|
soundEffectFile?: string | undefined;
|
|
20
|
+
lipSyncFile?: string | undefined;
|
|
20
21
|
captionFile?: string | undefined;
|
|
21
22
|
}[];
|
|
22
23
|
script: {
|
|
@@ -278,6 +279,10 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
278
279
|
provider?: string | undefined;
|
|
279
280
|
model?: string | undefined;
|
|
280
281
|
} | undefined;
|
|
282
|
+
lipSyncParams?: {
|
|
283
|
+
provider?: string | undefined;
|
|
284
|
+
model?: string | undefined;
|
|
285
|
+
} | undefined;
|
|
281
286
|
htmlImageParams?: {
|
|
282
287
|
model?: string | undefined;
|
|
283
288
|
} | undefined;
|
|
@@ -297,10 +302,15 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
297
302
|
images?: Record<string, any> | undefined;
|
|
298
303
|
systemPrompt?: string | undefined;
|
|
299
304
|
} | undefined;
|
|
305
|
+
enableLipSync?: boolean | undefined;
|
|
300
306
|
}[];
|
|
301
307
|
lang?: string | undefined;
|
|
302
308
|
title?: string | undefined;
|
|
303
309
|
description?: string | undefined;
|
|
310
|
+
lipSyncParams?: {
|
|
311
|
+
provider?: string | undefined;
|
|
312
|
+
model?: string | undefined;
|
|
313
|
+
} | undefined;
|
|
304
314
|
htmlImageParams?: {
|
|
305
315
|
provider: string;
|
|
306
316
|
model?: string | undefined;
|
|
@@ -344,6 +354,7 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
344
354
|
html: {};
|
|
345
355
|
imageReference: {};
|
|
346
356
|
soundEffect: {};
|
|
357
|
+
lipSync: {};
|
|
347
358
|
};
|
|
348
359
|
};
|
|
349
360
|
presentationStyle: {
|
|
@@ -430,6 +441,10 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
430
441
|
model?: string | undefined;
|
|
431
442
|
}>;
|
|
432
443
|
};
|
|
444
|
+
lipSyncParams?: {
|
|
445
|
+
provider?: string | undefined;
|
|
446
|
+
model?: string | undefined;
|
|
447
|
+
} | undefined;
|
|
433
448
|
htmlImageParams?: {
|
|
434
449
|
provider: string;
|
|
435
450
|
model?: string | undefined;
|
package/lib/utils/context.js
CHANGED
package/lib/utils/file.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MulmoScript, MulmoScriptTemplateFile, MulmoStudioContext } from "../types/index.js";
|
|
2
2
|
import { PDFMode } from "../types/index.js";
|
|
3
|
-
import { ZodSchema } from "zod";
|
|
3
|
+
import { ZodSchema, ZodType } from "zod";
|
|
4
4
|
export declare const updateNpmRoot: (_npmRoot: string) => void;
|
|
5
5
|
export declare function readMulmoScriptFile<T = MulmoScript>(path: string, errorMessage: string): {
|
|
6
6
|
mulmoData: T;
|
|
@@ -28,11 +28,12 @@ export declare const getBeatPngImagePath: (context: MulmoStudioContext, index: n
|
|
|
28
28
|
export declare const getBeatMoviePaths: (context: MulmoStudioContext, index: number) => {
|
|
29
29
|
movieFile: string;
|
|
30
30
|
soundEffectFile: string;
|
|
31
|
+
lipSyncFile: string;
|
|
31
32
|
};
|
|
32
33
|
export declare const getReferenceImagePath: (context: MulmoStudioContext, key: string, extension: string) => string;
|
|
33
34
|
export declare const getCaptionImagePath: (context: MulmoStudioContext, index: number) => string;
|
|
34
35
|
export declare const getOutputPdfFilePath: (outDirPath: string, fileName: string, pdfMode: PDFMode, lang?: string) => string;
|
|
35
|
-
export declare const
|
|
36
|
+
export declare const getPromptTemplateFilePath: (promptTemplateName: string) => string;
|
|
36
37
|
export declare const mkdir: (dirPath: string) => void;
|
|
37
38
|
export declare const silent60secPath: () => string;
|
|
38
39
|
export declare const defaultBGMPath: () => string;
|
|
@@ -40,8 +41,12 @@ export declare const getHTMLFile: (filename: string) => string;
|
|
|
40
41
|
export declare const getBaseDirPath: (basedir?: string) => string;
|
|
41
42
|
export declare const getFullPath: (baseDirPath: string | undefined, file: string) => string;
|
|
42
43
|
export declare const readScriptTemplateFile: (scriptName: string) => any;
|
|
43
|
-
export declare const
|
|
44
|
+
export declare const getScriptFromPromptTemplate: (promptTemplateName: string) => any;
|
|
45
|
+
export declare const readTemplatePrompt: (promptTemplateName: string) => string;
|
|
44
46
|
export declare const getAvailableTemplates: () => MulmoScriptTemplateFile[];
|
|
47
|
+
export declare const getAvailablePromptTemplates: () => MulmoScriptTemplateFile[];
|
|
48
|
+
export declare const getAvailableScriptTemplates: () => MulmoScriptTemplateFile[];
|
|
49
|
+
export declare const getPromptTemplates: <T>(dirPath: string, schema: ZodType) => T[];
|
|
45
50
|
export declare const writingMessage: (filePath: string) => void;
|
|
46
51
|
export declare const readAndParseJson: <S extends ZodSchema<any>>(filePath: string, schema: S) => ReturnType<S["parse"]>;
|
|
47
52
|
export declare const generateTimestampedFileName: (prefix: string) => string;
|
package/lib/utils/file.js
CHANGED
|
@@ -4,7 +4,9 @@ import { parse as yamlParse } from "yaml";
|
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
import { GraphAILogger } from "graphai";
|
|
6
6
|
import { MulmoScriptTemplateMethods, MulmoStudioContextMethods } from "../methods/index.js";
|
|
7
|
-
import { mulmoScriptTemplateSchema } from "../types/schema.js";
|
|
7
|
+
import { mulmoScriptTemplateSchema, mulmoPresentationStyleSchema } from "../types/schema.js";
|
|
8
|
+
const promptTemplateDirName = "./assets/templates";
|
|
9
|
+
const scriptTemplateDirName = "./scripts/templates";
|
|
8
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
11
|
const __dirname = path.dirname(__filename);
|
|
10
12
|
let npmRoot = path.resolve(__dirname, "../../");
|
|
@@ -91,7 +93,11 @@ export const getBeatMoviePaths = (context, index) => {
|
|
|
91
93
|
const imageProjectDirPath = MulmoStudioContextMethods.getImageProjectDirPath(context);
|
|
92
94
|
const beat = context.studio.script.beats[index]; // beat could be undefined only in a test case.
|
|
93
95
|
const filename = beat?.id ? `${beat.id}` : `${index}`;
|
|
94
|
-
return {
|
|
96
|
+
return {
|
|
97
|
+
movieFile: `${imageProjectDirPath}/${filename}.mov`,
|
|
98
|
+
soundEffectFile: `${imageProjectDirPath}/${filename}_sound.mov`,
|
|
99
|
+
lipSyncFile: `${imageProjectDirPath}/${filename}_lipsync.mov`,
|
|
100
|
+
};
|
|
95
101
|
};
|
|
96
102
|
export const getReferenceImagePath = (context, key, extension) => {
|
|
97
103
|
const imageProjectDirPath = MulmoStudioContextMethods.getImageProjectDirPath(context);
|
|
@@ -108,8 +114,8 @@ export const getOutputPdfFilePath = (outDirPath, fileName, pdfMode, lang) => {
|
|
|
108
114
|
}
|
|
109
115
|
return path.resolve(outDirPath, `${fileName}_${pdfMode}.pdf`);
|
|
110
116
|
};
|
|
111
|
-
export const
|
|
112
|
-
return path.resolve(npmRoot,
|
|
117
|
+
export const getPromptTemplateFilePath = (promptTemplateName) => {
|
|
118
|
+
return path.resolve(npmRoot, promptTemplateDirName, promptTemplateName + ".json");
|
|
113
119
|
};
|
|
114
120
|
export const mkdir = (dirPath) => {
|
|
115
121
|
if (!fs.existsSync(dirPath)) {
|
|
@@ -145,36 +151,56 @@ export const getFullPath = (baseDirPath, file) => {
|
|
|
145
151
|
return path.resolve(file);
|
|
146
152
|
};
|
|
147
153
|
export const readScriptTemplateFile = (scriptName) => {
|
|
148
|
-
const scriptPath = path.resolve(npmRoot,
|
|
154
|
+
const scriptPath = path.resolve(npmRoot, scriptTemplateDirName, scriptName);
|
|
149
155
|
const scriptData = fs.readFileSync(scriptPath, "utf-8");
|
|
150
156
|
// NOTE: We don't want to schema parse the script here to eliminate default values.
|
|
151
157
|
return JSON.parse(scriptData);
|
|
152
158
|
};
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
const
|
|
159
|
+
const readPromptTemplateFile = (promptTemplateName) => {
|
|
160
|
+
const promptTemplatePath = getPromptTemplateFilePath(promptTemplateName);
|
|
161
|
+
const promptTemplateData = fs.readFileSync(promptTemplatePath, "utf-8");
|
|
156
162
|
// NOTE: We don't want to schema parse the template here to eliminate default values.
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return
|
|
164
|
-
}
|
|
165
|
-
|
|
163
|
+
const promptTemplate = JSON.parse(promptTemplateData);
|
|
164
|
+
return promptTemplate;
|
|
165
|
+
};
|
|
166
|
+
const mulmoScriptTemplate2Script = (scriptTemplate) => {
|
|
167
|
+
if (scriptTemplate.scriptName) {
|
|
168
|
+
const scriptData = readScriptTemplateFile(scriptTemplate.scriptName);
|
|
169
|
+
return { ...scriptData, ...(scriptTemplate.presentationStyle ?? {}) };
|
|
170
|
+
}
|
|
171
|
+
return undefined;
|
|
172
|
+
};
|
|
173
|
+
export const getScriptFromPromptTemplate = (promptTemplateName) => {
|
|
174
|
+
const promptTemplate = readPromptTemplateFile(promptTemplateName);
|
|
175
|
+
return mulmoScriptTemplate2Script(promptTemplate);
|
|
176
|
+
};
|
|
177
|
+
export const readTemplatePrompt = (promptTemplateName) => {
|
|
178
|
+
const promptTemplate = readPromptTemplateFile(promptTemplateName);
|
|
179
|
+
const script = mulmoScriptTemplate2Script(promptTemplate);
|
|
180
|
+
const prompt = MulmoScriptTemplateMethods.getSystemPrompt(promptTemplate, script);
|
|
166
181
|
return prompt;
|
|
167
182
|
};
|
|
183
|
+
// TODO: MulmoScriptTemplateFileは、実際はpromptTempate
|
|
184
|
+
// TODO: remove it after update app
|
|
168
185
|
export const getAvailableTemplates = () => {
|
|
169
|
-
|
|
186
|
+
return getAvailablePromptTemplates();
|
|
187
|
+
};
|
|
188
|
+
export const getAvailablePromptTemplates = () => {
|
|
189
|
+
return getPromptTemplates(promptTemplateDirName, mulmoScriptTemplateSchema);
|
|
190
|
+
};
|
|
191
|
+
export const getAvailableScriptTemplates = () => {
|
|
192
|
+
return getPromptTemplates(scriptTemplateDirName, mulmoPresentationStyleSchema);
|
|
193
|
+
};
|
|
194
|
+
export const getPromptTemplates = (dirPath, schema) => {
|
|
195
|
+
const templatesDir = path.resolve(npmRoot, dirPath);
|
|
170
196
|
if (!fs.existsSync(templatesDir)) {
|
|
171
197
|
return [];
|
|
172
198
|
}
|
|
173
199
|
const files = fs.readdirSync(templatesDir);
|
|
174
200
|
return files.map((file) => {
|
|
175
|
-
const
|
|
201
|
+
const promptTemplate = JSON.parse(fs.readFileSync(path.resolve(templatesDir, file), "utf-8"));
|
|
176
202
|
return {
|
|
177
|
-
...
|
|
203
|
+
...schema.parse(promptTemplate),
|
|
178
204
|
filename: file.replace(/\.json$/, ""),
|
|
179
205
|
};
|
|
180
206
|
});
|
|
@@ -12,6 +12,7 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
|
|
|
12
12
|
imageFile?: string | undefined;
|
|
13
13
|
movieFile?: string | undefined;
|
|
14
14
|
soundEffectFile?: string | undefined;
|
|
15
|
+
lipSyncFile?: string | undefined;
|
|
15
16
|
captionFile?: string | undefined;
|
|
16
17
|
}[];
|
|
17
18
|
script: {
|
|
@@ -273,6 +274,10 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
|
|
|
273
274
|
provider?: string | undefined;
|
|
274
275
|
model?: string | undefined;
|
|
275
276
|
} | undefined;
|
|
277
|
+
lipSyncParams?: {
|
|
278
|
+
provider?: string | undefined;
|
|
279
|
+
model?: string | undefined;
|
|
280
|
+
} | undefined;
|
|
276
281
|
htmlImageParams?: {
|
|
277
282
|
model?: string | undefined;
|
|
278
283
|
} | undefined;
|
|
@@ -292,10 +297,15 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
|
|
|
292
297
|
images?: Record<string, any> | undefined;
|
|
293
298
|
systemPrompt?: string | undefined;
|
|
294
299
|
} | undefined;
|
|
300
|
+
enableLipSync?: boolean | undefined;
|
|
295
301
|
}[];
|
|
296
302
|
lang?: string | undefined;
|
|
297
303
|
title?: string | undefined;
|
|
298
304
|
description?: string | undefined;
|
|
305
|
+
lipSyncParams?: {
|
|
306
|
+
provider?: string | undefined;
|
|
307
|
+
model?: string | undefined;
|
|
308
|
+
} | undefined;
|
|
299
309
|
htmlImageParams?: {
|
|
300
310
|
provider: string;
|
|
301
311
|
model?: string | undefined;
|
|
@@ -61,6 +61,16 @@ export declare const provider2SoundEffectAgent: {
|
|
|
61
61
|
}>;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
+
export declare const provider2LipSyncAgent: {
|
|
65
|
+
replicate: {
|
|
66
|
+
agentName: string;
|
|
67
|
+
defaultModel: ReplicateModel;
|
|
68
|
+
models: ReplicateModel[];
|
|
69
|
+
modelParams: Record<ReplicateModel, {
|
|
70
|
+
identifier?: `${string}/${string}:${string}`;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
64
74
|
export declare const provider2LLMAgent: {
|
|
65
75
|
readonly openai: {
|
|
66
76
|
readonly agentName: "openAIAgent";
|
|
@@ -90,6 +100,7 @@ export declare const defaultProviders: {
|
|
|
90
100
|
text2Html: keyof typeof provider2LLMAgent;
|
|
91
101
|
llm: keyof typeof provider2LLMAgent;
|
|
92
102
|
soundEffect: keyof typeof provider2SoundEffectAgent;
|
|
103
|
+
lipSync: keyof typeof provider2LipSyncAgent;
|
|
93
104
|
};
|
|
94
105
|
export declare const llm: (keyof typeof provider2LLMAgent)[];
|
|
95
106
|
export type LLM = keyof typeof provider2LLMAgent;
|
|
@@ -130,6 +130,18 @@ export const provider2SoundEffectAgent = {
|
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
132
|
};
|
|
133
|
+
export const provider2LipSyncAgent = {
|
|
134
|
+
replicate: {
|
|
135
|
+
agentName: "lipSyncReplicateAgent",
|
|
136
|
+
defaultModel: "bytedance/latentsync",
|
|
137
|
+
models: ["bytedance/latentsync"],
|
|
138
|
+
modelParams: {
|
|
139
|
+
"bytedance/latentsync": {
|
|
140
|
+
identifier: "bytedance/latentsync:637ce1919f807ca20da3a448ddc2743535d2853649574cd52a933120e9b9e293",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
};
|
|
133
145
|
// : Record<LLM, { agent: string; defaultModel: string; max_tokens: number }>
|
|
134
146
|
export const provider2LLMAgent = {
|
|
135
147
|
openai: {
|
|
@@ -160,6 +172,7 @@ export const defaultProviders = {
|
|
|
160
172
|
text2Html: "openai",
|
|
161
173
|
llm: "openai",
|
|
162
174
|
soundEffect: "replicate",
|
|
175
|
+
lipSync: "replicate",
|
|
163
176
|
};
|
|
164
177
|
export const llm = Object.keys(provider2LLMAgent);
|
|
165
178
|
export const htmlLLMProvider = ["openai", "anthropic"];
|
package/lib/utils/utils.js
CHANGED
|
@@ -76,6 +76,9 @@ export const settings2GraphAIConfig = (settings, env) => {
|
|
|
76
76
|
soundEffectReplicateAgent: {
|
|
77
77
|
apiKey: getKey("SOUND_EFFECT", "REPLICATE_API_TOKEN"),
|
|
78
78
|
},
|
|
79
|
+
lipSyncReplicateAgent: {
|
|
80
|
+
apiKey: getKey("LIPSYNC", "REPLICATE_API_TOKEN"),
|
|
81
|
+
},
|
|
79
82
|
// TODO
|
|
80
83
|
// browserlessAgent
|
|
81
84
|
// ttsGoogleAgent
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.node.js",
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"./browser": {
|
|
13
13
|
"types": "./lib/index.browser.d.ts",
|
|
14
14
|
"default": "./lib/index.browser.js"
|
|
15
|
+
},
|
|
16
|
+
"./data": {
|
|
17
|
+
"default": "./lib/data/index.js"
|
|
15
18
|
}
|
|
16
19
|
},
|
|
17
20
|
"bin": {
|
|
@@ -48,6 +51,7 @@
|
|
|
48
51
|
"latest": "yarn upgrade-interactive --latest",
|
|
49
52
|
"format": "prettier --write '{src,scripts,assets/templates,assets/styles,draft,ideason,scripts_mag2,proto,test,graphai,output,docs/scripts}/**/*.{ts,json,yaml}'",
|
|
50
53
|
"deep_research": "npx tsx ./src/tools/deep_research.ts",
|
|
54
|
+
"template": "npx tsx batch/template2tsobject.ts",
|
|
51
55
|
"fake_data": "npx tsx test/fake/sample.ts",
|
|
52
56
|
"mcp_server": "npx tsx ./src/mcp/server.ts"
|
|
53
57
|
},
|
|
@@ -73,14 +77,14 @@
|
|
|
73
77
|
"@tavily/core": "^0.5.9",
|
|
74
78
|
"canvas": "^3.1.2",
|
|
75
79
|
"clipboardy": "^4.0.0",
|
|
76
|
-
"dotenv": "^17.2.
|
|
80
|
+
"dotenv": "^17.2.1",
|
|
77
81
|
"fluent-ffmpeg": "^2.1.3",
|
|
78
82
|
"google-auth-library": "^10.1.0",
|
|
79
83
|
"graphai": "^2.0.13",
|
|
80
84
|
"inquirer": "^12.7.0",
|
|
81
85
|
"marked": "^16.1.1",
|
|
82
86
|
"ora": "^8.2.0",
|
|
83
|
-
"puppeteer": "^24.
|
|
87
|
+
"puppeteer": "^24.15.0",
|
|
84
88
|
"replicate": "^1.0.1",
|
|
85
89
|
"yaml": "^2.8.0",
|
|
86
90
|
"yargs": "^18.0.0",
|
|
@@ -93,7 +97,7 @@
|
|
|
93
97
|
"@receptron/test_utils": "^2.0.0",
|
|
94
98
|
"@types/fluent-ffmpeg": "^2.1.26",
|
|
95
99
|
"@types/yargs": "^17.0.33",
|
|
96
|
-
"eslint": "^9.
|
|
100
|
+
"eslint": "^9.32.0",
|
|
97
101
|
"eslint-config-prettier": "^10.1.8",
|
|
98
102
|
"eslint-plugin-prettier": "^5.5.3",
|
|
99
103
|
"eslint-plugin-sonarjs": "^3.0.4",
|