mulmocast 2.1.15 → 2.1.17
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/actions/audio.js +1 -1
- package/lib/actions/bundle.d.ts +4 -1
- package/lib/actions/bundle.js +37 -21
- package/lib/actions/translate.js +1 -1
- package/lib/agents/image_genai_agent.js +2 -2
- package/lib/agents/image_openai_agent.js +1 -1
- package/lib/agents/image_replicate_agent.js +1 -1
- package/lib/agents/lipsync_replicate_agent.js +1 -1
- package/lib/agents/movie_genai_agent.js +2 -2
- package/lib/agents/movie_replicate_agent.js +1 -1
- package/lib/agents/sound_effect_replicate_agent.js +1 -1
- package/lib/agents/tts_elevenlabs_agent.js +1 -1
- package/lib/agents/tts_gemini_agent.js +1 -1
- package/lib/agents/tts_google_agent.js +15 -2
- package/lib/agents/tts_kotodama_agent.js +1 -1
- package/lib/agents/tts_openai_agent.js +5 -2
- package/lib/cli/commands/bundle/handler.js +1 -1
- package/lib/cli/commands/movie/builder.js +1 -1
- package/lib/cli/commands/pdf/builder.js +1 -1
- package/lib/cli/commands/tool/scripting/builder.js +1 -1
- package/lib/cli/commands/tool/scripting/handler.d.ts +1 -1
- package/lib/cli/commands/tool/scripting/handler.js +1 -1
- package/lib/cli/commands/tool/story_to_script/builder.js +2 -2
- package/lib/cli/commands/tool/story_to_script/handler.d.ts +1 -1
- package/lib/cli/commands/tool/story_to_script/handler.js +1 -1
- package/lib/cli/common.js +1 -1
- package/lib/cli/helpers.js +1 -1
- package/lib/data/scriptTemplates.js +2 -2
- package/lib/data/templateDataSet.js +1 -1
- package/lib/index.common.d.ts +2 -2
- package/lib/index.common.js +2 -2
- package/lib/mcp/server.js +1 -1
- package/lib/methods/mulmo_presentation_style.d.ts +6 -6
- package/lib/methods/mulmo_presentation_style.js +1 -1
- package/lib/methods/mulmo_studio_context.d.ts +1 -1
- package/lib/tools/story_to_script.d.ts +1 -1
- package/lib/tools/story_to_script.js +1 -1
- package/lib/types/agent.d.ts +1 -0
- package/lib/types/const.d.ts +15 -0
- package/lib/types/const.js +15 -0
- package/lib/types/provider2agent.d.ts +191 -0
- package/lib/types/provider2agent.js +326 -0
- package/lib/types/schema.js +2 -2
- package/lib/types/type.d.ts +2 -2
- package/lib/utils/utils.d.ts +1 -1
- package/lib/utils/utils.js +1 -1
- package/package.json +11 -11
- package/scripts/templates/html.json +1 -1
- package/scripts/templates/presentation.json +1 -1
- package/scripts/test/test_captions_2.json +31 -0
- package/scripts/test/test_captions_2.json~ +278 -0
- package/scripts/test/test_gcp_tts.json +55 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
export declare const provider2TTSAgent: {
|
|
2
|
+
nijivoice: {
|
|
3
|
+
agentName: string;
|
|
4
|
+
hasLimitedConcurrency: boolean;
|
|
5
|
+
keyName: string;
|
|
6
|
+
};
|
|
7
|
+
openai: {
|
|
8
|
+
agentName: string;
|
|
9
|
+
hasLimitedConcurrency: boolean;
|
|
10
|
+
defaultModel: string;
|
|
11
|
+
defaultVoice: string;
|
|
12
|
+
keyName: string;
|
|
13
|
+
baseURLKeyName: string;
|
|
14
|
+
};
|
|
15
|
+
google: {
|
|
16
|
+
agentName: string;
|
|
17
|
+
hasLimitedConcurrency: boolean;
|
|
18
|
+
keyName: string;
|
|
19
|
+
};
|
|
20
|
+
gemini: {
|
|
21
|
+
agentName: string;
|
|
22
|
+
hasLimitedConcurrency: boolean;
|
|
23
|
+
defaultModel: string;
|
|
24
|
+
defaultVoice: string;
|
|
25
|
+
models: string[];
|
|
26
|
+
keyName: string;
|
|
27
|
+
};
|
|
28
|
+
elevenlabs: {
|
|
29
|
+
agentName: string;
|
|
30
|
+
hasLimitedConcurrency: boolean;
|
|
31
|
+
defaultModel: string;
|
|
32
|
+
models: string[];
|
|
33
|
+
keyName: string;
|
|
34
|
+
};
|
|
35
|
+
kotodama: {
|
|
36
|
+
agentName: string;
|
|
37
|
+
hasLimitedConcurrency: boolean;
|
|
38
|
+
defaultVoice: string;
|
|
39
|
+
defaultDecoration: string;
|
|
40
|
+
keyName: string;
|
|
41
|
+
};
|
|
42
|
+
mock: {
|
|
43
|
+
agentName: string;
|
|
44
|
+
hasLimitedConcurrency: boolean;
|
|
45
|
+
defaultModel: string;
|
|
46
|
+
models: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const gptImages: string[];
|
|
50
|
+
export declare const provider2ImageAgent: {
|
|
51
|
+
openai: {
|
|
52
|
+
agentName: string;
|
|
53
|
+
defaultModel: string;
|
|
54
|
+
models: string[];
|
|
55
|
+
keyName: string;
|
|
56
|
+
baseURLKeyName: string;
|
|
57
|
+
};
|
|
58
|
+
google: {
|
|
59
|
+
agentName: string;
|
|
60
|
+
defaultModel: string;
|
|
61
|
+
models: string[];
|
|
62
|
+
keyName: string;
|
|
63
|
+
};
|
|
64
|
+
replicate: {
|
|
65
|
+
agentName: string;
|
|
66
|
+
defaultModel: string;
|
|
67
|
+
models: string[];
|
|
68
|
+
keyName: string;
|
|
69
|
+
};
|
|
70
|
+
mock: {
|
|
71
|
+
agentName: string;
|
|
72
|
+
defaultModel: string;
|
|
73
|
+
models: string[];
|
|
74
|
+
keyName: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export type ReplicateModel = `${string}/${string}`;
|
|
78
|
+
export declare const provider2MovieAgent: {
|
|
79
|
+
replicate: {
|
|
80
|
+
agentName: string;
|
|
81
|
+
defaultModel: ReplicateModel;
|
|
82
|
+
keyName: string;
|
|
83
|
+
models: string[];
|
|
84
|
+
modelParams: Record<ReplicateModel, {
|
|
85
|
+
durations: number[];
|
|
86
|
+
start_image: string | undefined;
|
|
87
|
+
last_image?: string;
|
|
88
|
+
price_per_sec: number;
|
|
89
|
+
}>;
|
|
90
|
+
};
|
|
91
|
+
google: {
|
|
92
|
+
agentName: string;
|
|
93
|
+
defaultModel: string;
|
|
94
|
+
models: string[];
|
|
95
|
+
keyName: string;
|
|
96
|
+
modelParams: {
|
|
97
|
+
"veo-3.1-generate-preview": {
|
|
98
|
+
durations: number[];
|
|
99
|
+
};
|
|
100
|
+
"veo-3.0-generate-001": {
|
|
101
|
+
durations: number[];
|
|
102
|
+
};
|
|
103
|
+
"veo-2.0-generate-001": {
|
|
104
|
+
durations: number[];
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
mock: {
|
|
109
|
+
agentName: string;
|
|
110
|
+
defaultModel: string;
|
|
111
|
+
models: string[];
|
|
112
|
+
keyName: string;
|
|
113
|
+
modelParams: {};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export declare const provider2SoundEffectAgent: {
|
|
117
|
+
replicate: {
|
|
118
|
+
agentName: string;
|
|
119
|
+
defaultModel: ReplicateModel;
|
|
120
|
+
keyName: string;
|
|
121
|
+
models: ReplicateModel[];
|
|
122
|
+
modelParams: Record<ReplicateModel, {
|
|
123
|
+
identifier?: `${string}/${string}:${string}`;
|
|
124
|
+
}>;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
export declare const provider2LipSyncAgent: {
|
|
128
|
+
replicate: {
|
|
129
|
+
agentName: string;
|
|
130
|
+
defaultModel: ReplicateModel;
|
|
131
|
+
keyName: string;
|
|
132
|
+
models: ReplicateModel[];
|
|
133
|
+
modelParams: Record<ReplicateModel, {
|
|
134
|
+
identifier?: `${string}/${string}:${string}` | `${string}/${string}`;
|
|
135
|
+
video?: string;
|
|
136
|
+
audio: string;
|
|
137
|
+
image?: string;
|
|
138
|
+
}>;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
export declare const provider2LLMAgent: {
|
|
142
|
+
readonly openai: {
|
|
143
|
+
readonly agentName: "openAIAgent";
|
|
144
|
+
readonly defaultModel: "gpt-5";
|
|
145
|
+
readonly keyName: "OPENAI_API_KEY";
|
|
146
|
+
readonly baseURLKeyName: "OPENAI_BASE_URL";
|
|
147
|
+
readonly max_tokens: 8192;
|
|
148
|
+
readonly models: readonly ["gpt-5", "gpt-5-nano", "gpt-5-mini", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "o3", "o3-mini", "o3-pro", "o1", "o1-pro", "gpt-4o", "gpt-4o-mini"];
|
|
149
|
+
};
|
|
150
|
+
readonly anthropic: {
|
|
151
|
+
readonly agentName: "anthropicAgent";
|
|
152
|
+
readonly defaultModel: "claude-sonnet-4-5-20250929";
|
|
153
|
+
readonly max_tokens: 8192;
|
|
154
|
+
readonly models: readonly ["claude-opus-4-1-20250805", "claude-opus-4-20250514", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "claude-haiku-4-5-20251001"];
|
|
155
|
+
readonly keyName: "ANTHROPIC_API_KEY";
|
|
156
|
+
readonly apiKeyNameOverride: "ANTHROPIC_API_TOKEN";
|
|
157
|
+
};
|
|
158
|
+
readonly gemini: {
|
|
159
|
+
readonly agentName: "geminiAgent";
|
|
160
|
+
readonly defaultModel: "gemini-2.5-flash";
|
|
161
|
+
readonly max_tokens: 8192;
|
|
162
|
+
readonly models: readonly ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-2.0-flash"];
|
|
163
|
+
readonly keyName: "GEMINI_API_KEY";
|
|
164
|
+
};
|
|
165
|
+
readonly groq: {
|
|
166
|
+
readonly agentName: "groqAgent";
|
|
167
|
+
readonly defaultModel: "llama-3.1-8b-instant";
|
|
168
|
+
readonly keyName: "GROQ_API_KEY";
|
|
169
|
+
readonly max_tokens: 4096;
|
|
170
|
+
readonly models: readonly ["llama-3.1-8b-instant", "llama-3.3-70b-versatile", "deepseek-r1-distill-llama-70b", "openai/gpt-oss-120b", "openai/gpt-oss-20b"];
|
|
171
|
+
};
|
|
172
|
+
readonly mock: {
|
|
173
|
+
readonly agentName: "mediaMockAgent";
|
|
174
|
+
readonly defaultModel: "mock";
|
|
175
|
+
readonly max_tokens: 4096;
|
|
176
|
+
readonly models: readonly ["mock"];
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
export declare const defaultProviders: {
|
|
180
|
+
tts: keyof typeof provider2TTSAgent;
|
|
181
|
+
text2image: keyof typeof provider2ImageAgent;
|
|
182
|
+
text2movie: keyof typeof provider2MovieAgent;
|
|
183
|
+
text2Html: keyof typeof provider2LLMAgent;
|
|
184
|
+
llm: keyof typeof provider2LLMAgent;
|
|
185
|
+
soundEffect: keyof typeof provider2SoundEffectAgent;
|
|
186
|
+
lipSync: keyof typeof provider2LipSyncAgent;
|
|
187
|
+
};
|
|
188
|
+
export declare const llm: (keyof typeof provider2LLMAgent)[];
|
|
189
|
+
export type LLM = keyof typeof provider2LLMAgent;
|
|
190
|
+
export declare const htmlLLMProvider: string[];
|
|
191
|
+
export declare const getModelDuration: (provider: keyof typeof provider2MovieAgent, model: string, movieDuration?: number) => number | undefined;
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
// node & browser
|
|
2
|
+
export const provider2TTSAgent = {
|
|
3
|
+
nijivoice: {
|
|
4
|
+
agentName: "ttsNijivoiceAgent",
|
|
5
|
+
hasLimitedConcurrency: true,
|
|
6
|
+
keyName: "NIJIVOICE_API_KEY",
|
|
7
|
+
},
|
|
8
|
+
openai: {
|
|
9
|
+
agentName: "ttsOpenaiAgent",
|
|
10
|
+
hasLimitedConcurrency: false,
|
|
11
|
+
defaultModel: "gpt-4o-mini-tts",
|
|
12
|
+
defaultVoice: "shimmer",
|
|
13
|
+
keyName: "OPENAI_API_KEY",
|
|
14
|
+
baseURLKeyName: "OPENAI_BASE_URL",
|
|
15
|
+
},
|
|
16
|
+
google: {
|
|
17
|
+
agentName: "ttsGoogleAgent",
|
|
18
|
+
hasLimitedConcurrency: false,
|
|
19
|
+
keyName: "GEMINI_API_KEY",
|
|
20
|
+
},
|
|
21
|
+
gemini: {
|
|
22
|
+
agentName: "ttsGeminiAgent",
|
|
23
|
+
hasLimitedConcurrency: false,
|
|
24
|
+
defaultModel: "gemini-2.5-flash-preview-tts",
|
|
25
|
+
defaultVoice: "Kore",
|
|
26
|
+
models: ["gemini-2.5-flash-preview-tts", "gemini-2.5-pro-preview-tts"],
|
|
27
|
+
keyName: "GEMINI_API_KEY",
|
|
28
|
+
},
|
|
29
|
+
elevenlabs: {
|
|
30
|
+
agentName: "ttsElevenlabsAgent",
|
|
31
|
+
hasLimitedConcurrency: true,
|
|
32
|
+
defaultModel: "eleven_multilingual_v2",
|
|
33
|
+
// Models | ElevenLabs Documentation
|
|
34
|
+
// https://elevenlabs.io/docs/models
|
|
35
|
+
models: ["eleven_multilingual_v2", "eleven_turbo_v2_5", "eleven_turbo_v2", "eleven_flash_v2_5", "eleven_flash_v2"],
|
|
36
|
+
keyName: "ELEVENLABS_API_KEY",
|
|
37
|
+
},
|
|
38
|
+
kotodama: {
|
|
39
|
+
agentName: "ttsKotodamaAgent",
|
|
40
|
+
hasLimitedConcurrency: true,
|
|
41
|
+
defaultVoice: "Atla",
|
|
42
|
+
defaultDecoration: "neutral",
|
|
43
|
+
keyName: "KOTODAMA_API_KEY",
|
|
44
|
+
},
|
|
45
|
+
mock: {
|
|
46
|
+
agentName: "mediaMockAgent",
|
|
47
|
+
hasLimitedConcurrency: true,
|
|
48
|
+
defaultModel: "mock-model",
|
|
49
|
+
models: ["mock-model"],
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export const gptImages = ["gpt-image-1.5", "gpt-image-1", "gpt-image-1-mini"];
|
|
53
|
+
export const provider2ImageAgent = {
|
|
54
|
+
openai: {
|
|
55
|
+
agentName: "imageOpenaiAgent",
|
|
56
|
+
defaultModel: "gpt-image-1",
|
|
57
|
+
models: ["dall-e-3", ...gptImages],
|
|
58
|
+
keyName: "OPENAI_API_KEY",
|
|
59
|
+
baseURLKeyName: "OPENAI_BASE_URL",
|
|
60
|
+
},
|
|
61
|
+
google: {
|
|
62
|
+
agentName: "imageGenAIAgent",
|
|
63
|
+
defaultModel: "gemini-2.5-flash-image",
|
|
64
|
+
models: ["imagen-4.0-generate-preview-06-06", "imagen-4.0-ultra-generate-preview-06-06", "gemini-2.5-flash-image", "gemini-3-pro-image-preview"],
|
|
65
|
+
keyName: "GEMINI_API_KEY",
|
|
66
|
+
},
|
|
67
|
+
replicate: {
|
|
68
|
+
agentName: "imageReplicateAgent",
|
|
69
|
+
defaultModel: "bytedance/seedream-4",
|
|
70
|
+
models: ["bytedance/seedream-4", "qwen/qwen-image"],
|
|
71
|
+
keyName: "REPLICATE_API_TOKEN",
|
|
72
|
+
},
|
|
73
|
+
mock: {
|
|
74
|
+
agentName: "mediaMockAgent",
|
|
75
|
+
defaultModel: "mock-model",
|
|
76
|
+
models: ["mock-model"],
|
|
77
|
+
keyName: "",
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
export const provider2MovieAgent = {
|
|
81
|
+
replicate: {
|
|
82
|
+
agentName: "movieReplicateAgent",
|
|
83
|
+
defaultModel: "bytedance/seedance-1-lite",
|
|
84
|
+
keyName: "REPLICATE_API_TOKEN",
|
|
85
|
+
models: [
|
|
86
|
+
"bytedance/seedance-1-lite",
|
|
87
|
+
"bytedance/seedance-1-pro",
|
|
88
|
+
"kwaivgi/kling-v1.6-pro",
|
|
89
|
+
"kwaivgi/kling-v2.1",
|
|
90
|
+
"kwaivgi/kling-v2.1-master",
|
|
91
|
+
"google/veo-2",
|
|
92
|
+
"google/veo-3",
|
|
93
|
+
"google/veo-3-fast",
|
|
94
|
+
"minimax/video-01",
|
|
95
|
+
"minimax/hailuo-02",
|
|
96
|
+
"minimax/hailuo-02-fast",
|
|
97
|
+
"pixverse/pixverse-v4.5",
|
|
98
|
+
"wan-video/wan-2.2-i2v-fast",
|
|
99
|
+
"wan-video/wan-2.2-t2v-fast",
|
|
100
|
+
],
|
|
101
|
+
modelParams: {
|
|
102
|
+
"bytedance/seedance-1-lite": {
|
|
103
|
+
durations: [5, 10],
|
|
104
|
+
start_image: "image",
|
|
105
|
+
last_image: "last_frame_image",
|
|
106
|
+
price_per_sec: 0.036, // in USD
|
|
107
|
+
},
|
|
108
|
+
"bytedance/seedance-1-pro": {
|
|
109
|
+
durations: [5, 10],
|
|
110
|
+
start_image: "image",
|
|
111
|
+
last_image: "last_frame_image",
|
|
112
|
+
price_per_sec: 0.15,
|
|
113
|
+
},
|
|
114
|
+
"kwaivgi/kling-v1.6-pro": {
|
|
115
|
+
durations: [5, 10],
|
|
116
|
+
start_image: "start_image",
|
|
117
|
+
price_per_sec: 0.095,
|
|
118
|
+
},
|
|
119
|
+
"kwaivgi/kling-v2.1": {
|
|
120
|
+
durations: [5, 10],
|
|
121
|
+
start_image: "start_image",
|
|
122
|
+
price_per_sec: 0.05,
|
|
123
|
+
},
|
|
124
|
+
"kwaivgi/kling-v2.1-master": {
|
|
125
|
+
durations: [5, 10],
|
|
126
|
+
start_image: "start_image",
|
|
127
|
+
price_per_sec: 0.28,
|
|
128
|
+
},
|
|
129
|
+
"google/veo-2": {
|
|
130
|
+
durations: [5, 6, 7, 8],
|
|
131
|
+
start_image: "image",
|
|
132
|
+
price_per_sec: 0.5,
|
|
133
|
+
},
|
|
134
|
+
"google/veo-3": {
|
|
135
|
+
durations: [8],
|
|
136
|
+
start_image: "image",
|
|
137
|
+
price_per_sec: 0.75,
|
|
138
|
+
},
|
|
139
|
+
"google/veo-3-fast": {
|
|
140
|
+
durations: [8],
|
|
141
|
+
start_image: "image",
|
|
142
|
+
price_per_sec: 0.4,
|
|
143
|
+
},
|
|
144
|
+
"minimax/video-01": {
|
|
145
|
+
durations: [6],
|
|
146
|
+
start_image: "first_frame_image",
|
|
147
|
+
price_per_sec: 0.5,
|
|
148
|
+
},
|
|
149
|
+
"minimax/hailuo-02": {
|
|
150
|
+
durations: [6], // NOTE: 10 for only 720p
|
|
151
|
+
start_image: "first_frame_image",
|
|
152
|
+
price_per_sec: 0.08,
|
|
153
|
+
},
|
|
154
|
+
"minimax/hailuo-02-fast": {
|
|
155
|
+
durations: [6, 10], // NOTE: 512P
|
|
156
|
+
start_image: "first_frame_image",
|
|
157
|
+
price_per_sec: 0.0166,
|
|
158
|
+
},
|
|
159
|
+
"pixverse/pixverse-v4.5": {
|
|
160
|
+
durations: [5, 8],
|
|
161
|
+
start_image: "image",
|
|
162
|
+
last_image: "last_frame_image",
|
|
163
|
+
price_per_sec: 0.12,
|
|
164
|
+
},
|
|
165
|
+
"wan-video/wan-2.2-i2v-fast": {
|
|
166
|
+
durations: [5],
|
|
167
|
+
start_image: "image",
|
|
168
|
+
price_per_sec: 0.012,
|
|
169
|
+
},
|
|
170
|
+
"wan-video/wan-2.2-t2v-fast": {
|
|
171
|
+
durations: [5],
|
|
172
|
+
start_image: undefined,
|
|
173
|
+
price_per_sec: 0.012,
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
google: {
|
|
178
|
+
agentName: "movieGenAIAgent",
|
|
179
|
+
defaultModel: "veo-2.0-generate-001",
|
|
180
|
+
models: ["veo-2.0-generate-001", "veo-3.0-generate-001", "veo-3.1-generate-preview"],
|
|
181
|
+
keyName: "GEMINI_API_KEY",
|
|
182
|
+
modelParams: {
|
|
183
|
+
"veo-3.1-generate-preview": {
|
|
184
|
+
durations: [4, 6, 8],
|
|
185
|
+
},
|
|
186
|
+
"veo-3.0-generate-001": {
|
|
187
|
+
durations: [4, 6, 8],
|
|
188
|
+
},
|
|
189
|
+
"veo-2.0-generate-001": {
|
|
190
|
+
durations: [5, 6, 7, 8],
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
mock: {
|
|
195
|
+
agentName: "mediaMockAgent",
|
|
196
|
+
defaultModel: "mock-model",
|
|
197
|
+
models: ["mock-model"],
|
|
198
|
+
keyName: "",
|
|
199
|
+
modelParams: {},
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
export const provider2SoundEffectAgent = {
|
|
203
|
+
replicate: {
|
|
204
|
+
agentName: "soundEffectReplicateAgent",
|
|
205
|
+
defaultModel: "zsxkib/mmaudio",
|
|
206
|
+
keyName: "REPLICATE_API_TOKEN",
|
|
207
|
+
models: ["zsxkib/mmaudio"],
|
|
208
|
+
modelParams: {
|
|
209
|
+
"zsxkib/mmaudio": {
|
|
210
|
+
identifier: "zsxkib/mmaudio:62871fb59889b2d7c13777f08deb3b36bdff88f7e1d53a50ad7694548a41b484",
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
export const provider2LipSyncAgent = {
|
|
216
|
+
replicate: {
|
|
217
|
+
agentName: "lipSyncReplicateAgent",
|
|
218
|
+
defaultModel: "bytedance/omni-human",
|
|
219
|
+
keyName: "REPLICATE_API_TOKEN",
|
|
220
|
+
models: ["bytedance/latentsync", "tmappdev/lipsync", "bytedance/omni-human"],
|
|
221
|
+
modelParams: {
|
|
222
|
+
"bytedance/latentsync": {
|
|
223
|
+
identifier: "bytedance/latentsync:637ce1919f807ca20da3a448ddc2743535d2853649574cd52a933120e9b9e293",
|
|
224
|
+
video: "video",
|
|
225
|
+
audio: "audio",
|
|
226
|
+
},
|
|
227
|
+
"tmappdev/lipsync": {
|
|
228
|
+
identifier: "tmappdev/lipsync:c54ce2fe673ea59b857b91250b3d71a2cd304a78f2370687632805c8405fbf4c",
|
|
229
|
+
video: "video_input",
|
|
230
|
+
audio: "audio_input",
|
|
231
|
+
},
|
|
232
|
+
"bytedance/omni-human": {
|
|
233
|
+
identifier: "bytedance/omni-human",
|
|
234
|
+
image: "image",
|
|
235
|
+
audio: "audio",
|
|
236
|
+
price_per_sec: 0.14,
|
|
237
|
+
},
|
|
238
|
+
/* NOTE: This model does not work with large base64 urls.
|
|
239
|
+
"sync/lipsync-2": {
|
|
240
|
+
video: "video",
|
|
241
|
+
audio: "audio",
|
|
242
|
+
},
|
|
243
|
+
*/
|
|
244
|
+
/* NOTE: This model does not work well for some unknown reason.
|
|
245
|
+
"kwaivgi/kling-lip-sync": {
|
|
246
|
+
video: "video_url",
|
|
247
|
+
audio: "audio_file",
|
|
248
|
+
},
|
|
249
|
+
*/
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
// : Record<LLM, { agent: string; defaultModel: string; max_tokens: number }>
|
|
254
|
+
export const provider2LLMAgent = {
|
|
255
|
+
openai: {
|
|
256
|
+
agentName: "openAIAgent",
|
|
257
|
+
defaultModel: "gpt-5",
|
|
258
|
+
keyName: "OPENAI_API_KEY",
|
|
259
|
+
baseURLKeyName: "OPENAI_BASE_URL",
|
|
260
|
+
max_tokens: 8192,
|
|
261
|
+
models: [
|
|
262
|
+
"gpt-5",
|
|
263
|
+
"gpt-5-nano",
|
|
264
|
+
"gpt-5-mini",
|
|
265
|
+
"gpt-4.1",
|
|
266
|
+
"gpt-4.1-mini",
|
|
267
|
+
"gpt-4.1-nano",
|
|
268
|
+
"o3",
|
|
269
|
+
"o3-mini",
|
|
270
|
+
"o3-pro",
|
|
271
|
+
"o1",
|
|
272
|
+
"o1-pro",
|
|
273
|
+
"gpt-4o",
|
|
274
|
+
"gpt-4o-mini",
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
anthropic: {
|
|
278
|
+
agentName: "anthropicAgent",
|
|
279
|
+
defaultModel: "claude-sonnet-4-5-20250929",
|
|
280
|
+
max_tokens: 8192,
|
|
281
|
+
models: ["claude-opus-4-1-20250805", "claude-opus-4-20250514", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "claude-haiku-4-5-20251001"],
|
|
282
|
+
keyName: "ANTHROPIC_API_KEY",
|
|
283
|
+
apiKeyNameOverride: "ANTHROPIC_API_TOKEN",
|
|
284
|
+
// GraphAI is currently using ANTHROPIC_API_KEY, but the official name is ANTHROPIC_API_TOKEN.
|
|
285
|
+
},
|
|
286
|
+
gemini: {
|
|
287
|
+
agentName: "geminiAgent",
|
|
288
|
+
defaultModel: "gemini-2.5-flash",
|
|
289
|
+
max_tokens: 8192,
|
|
290
|
+
models: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-2.0-flash"],
|
|
291
|
+
keyName: "GEMINI_API_KEY",
|
|
292
|
+
},
|
|
293
|
+
groq: {
|
|
294
|
+
agentName: "groqAgent",
|
|
295
|
+
defaultModel: "llama-3.1-8b-instant",
|
|
296
|
+
keyName: "GROQ_API_KEY",
|
|
297
|
+
max_tokens: 4096,
|
|
298
|
+
models: ["llama-3.1-8b-instant", "llama-3.3-70b-versatile", "deepseek-r1-distill-llama-70b", "openai/gpt-oss-120b", "openai/gpt-oss-20b"],
|
|
299
|
+
},
|
|
300
|
+
mock: {
|
|
301
|
+
agentName: "mediaMockAgent",
|
|
302
|
+
defaultModel: "mock",
|
|
303
|
+
max_tokens: 4096,
|
|
304
|
+
models: ["mock"],
|
|
305
|
+
},
|
|
306
|
+
};
|
|
307
|
+
export const defaultProviders = {
|
|
308
|
+
tts: "openai",
|
|
309
|
+
text2image: "openai",
|
|
310
|
+
text2movie: "replicate",
|
|
311
|
+
text2Html: "openai",
|
|
312
|
+
llm: "openai",
|
|
313
|
+
soundEffect: "replicate",
|
|
314
|
+
lipSync: "replicate",
|
|
315
|
+
};
|
|
316
|
+
export const llm = Object.keys(provider2LLMAgent);
|
|
317
|
+
export const htmlLLMProvider = ["openai", "anthropic", "mock"];
|
|
318
|
+
export const getModelDuration = (provider, model, movieDuration) => {
|
|
319
|
+
const modelParams = provider2MovieAgent[provider]?.modelParams;
|
|
320
|
+
const { durations } = modelParams[model];
|
|
321
|
+
if (durations && movieDuration) {
|
|
322
|
+
const largerDurations = durations.filter((d) => d >= movieDuration);
|
|
323
|
+
return largerDurations.length > 0 ? largerDurations[0] : durations[durations.length - 1];
|
|
324
|
+
}
|
|
325
|
+
return durations?.[0];
|
|
326
|
+
};
|
package/lib/types/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { htmlLLMProvider, provider2TTSAgent, provider2ImageAgent, provider2MovieAgent, defaultProviders, provider2SoundEffectAgent
|
|
3
|
-
import { currentMulmoScriptVersion } from "
|
|
2
|
+
import { htmlLLMProvider, provider2TTSAgent, provider2ImageAgent, provider2MovieAgent, defaultProviders, provider2SoundEffectAgent } from "./provider2agent.js";
|
|
3
|
+
import { currentMulmoScriptVersion } from "./const.js";
|
|
4
4
|
import { mulmoVideoFilterSchema } from "./schema_video_filter.js";
|
|
5
5
|
// Re-export video filter schema
|
|
6
6
|
export { mulmoVideoFilterSchema } from "./schema_video_filter.js";
|
package/lib/types/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CallbackFunction } from "graphai";
|
|
2
2
|
import { langSchema, localizedTextSchema, mulmoBeatSchema, mulmoScriptSchema, mulmoStudioSchema, mulmoStudioBeatSchema, mulmoStoryboardSchema, mulmoStoryboardSceneSchema, mulmoStudioMultiLingualSchema, mulmoStudioMultiLingualArraySchema, mulmoStudioMultiLingualDataSchema, mulmoStudioMultiLingualFileSchema, speakerDictionarySchema, speakerSchema, mulmoSpeechParamsSchema, mulmoImageParamsSchema, mulmoImageParamsImagesValueSchema, mulmoImageParamsImagesSchema, mulmoFillOptionSchema, mulmoTransitionSchema, mulmoVideoFilterSchema, mulmoMovieParamsSchema, mulmoSoundEffectParamsSchema, mulmoLipSyncParamsSchema, 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
|
-
import { pdf_modes, pdf_sizes, storyToScriptGenerateMode } from "
|
|
4
|
-
import type { LLM } from "
|
|
3
|
+
import { pdf_modes, pdf_sizes, storyToScriptGenerateMode } from "./const.js";
|
|
4
|
+
import type { LLM } from "./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>;
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { ConfigDataDictionary, DefaultConfigData } from "graphai";
|
|
7
7
|
import { MulmoBeat, MulmoStudioBeat, MulmoStudioMultiLingual, MulmoStudioMultiLingualData } from "../types/index.js";
|
|
8
|
-
import { type LLM } from "
|
|
8
|
+
import { type LLM } from "../types/provider2agent.js";
|
|
9
9
|
export declare const llmPair: (_llm?: LLM, _model?: string) => {
|
|
10
10
|
agent: "mediaMockAgent" | "openAIAgent" | "anthropicAgent" | "geminiAgent" | "groqAgent";
|
|
11
11
|
model: string;
|
package/lib/utils/utils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (No Node.js built-ins like fs, path, dotenv, etc.)
|
|
4
4
|
* Works in both Node.js and modern browsers.
|
|
5
5
|
*/
|
|
6
|
-
import { provider2LLMAgent, provider2TTSAgent, provider2ImageAgent, provider2MovieAgent, provider2SoundEffectAgent, provider2LipSyncAgent, } from "
|
|
6
|
+
import { provider2LLMAgent, provider2TTSAgent, provider2ImageAgent, provider2MovieAgent, provider2SoundEffectAgent, provider2LipSyncAgent, } from "../types/provider2agent.js";
|
|
7
7
|
export const llmPair = (_llm, _model) => {
|
|
8
8
|
const llmKey = _llm ?? "openai";
|
|
9
9
|
const agent = provider2LLMAgent[llmKey]?.agentName ?? provider2LLMAgent.openai.agentName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.node.js",
|
|
@@ -74,18 +74,18 @@
|
|
|
74
74
|
"homepage": "https://github.com/receptron/mulmocast-cli#readme",
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@google-cloud/text-to-speech": "^6.4.0",
|
|
77
|
-
"@google/genai": "^1.
|
|
77
|
+
"@google/genai": "^1.37.0",
|
|
78
78
|
"@graphai/anthropic_agent": "^2.0.12",
|
|
79
79
|
"@graphai/browserless_agent": "^2.0.1",
|
|
80
|
-
"@graphai/gemini_agent": "^2.0.
|
|
80
|
+
"@graphai/gemini_agent": "^2.0.2",
|
|
81
81
|
"@graphai/groq_agent": "^2.0.2",
|
|
82
82
|
"@graphai/input_agents": "^1.0.2",
|
|
83
83
|
"@graphai/openai_agent": "^2.0.8",
|
|
84
84
|
"@graphai/stream_agent_filter": "^2.0.2",
|
|
85
85
|
"@graphai/vanilla": "^2.0.12",
|
|
86
86
|
"@graphai/vanilla_node_agents": "^2.0.4",
|
|
87
|
-
"@inquirer/input": "^5.0.
|
|
88
|
-
"@inquirer/select": "^5.0.
|
|
87
|
+
"@inquirer/input": "^5.0.4",
|
|
88
|
+
"@inquirer/select": "^5.0.4",
|
|
89
89
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
90
90
|
"@mozilla/readability": "^0.6.0",
|
|
91
91
|
"@tavily/core": "^0.5.11",
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
"dotenv": "^17.2.3",
|
|
95
95
|
"fluent-ffmpeg": "^2.1.3",
|
|
96
96
|
"graphai": "^2.0.16",
|
|
97
|
-
"jsdom": "^27.
|
|
97
|
+
"jsdom": "^27.4.0",
|
|
98
98
|
"marked": "^17.0.1",
|
|
99
99
|
"mulmocast-vision": "^1.0.8",
|
|
100
100
|
"ora": "^9.0.0",
|
|
101
|
-
"puppeteer": "^24.
|
|
101
|
+
"puppeteer": "^24.35.0",
|
|
102
102
|
"replicate": "^1.4.0",
|
|
103
103
|
"yaml": "^2.8.2",
|
|
104
104
|
"yargs": "^18.0.0",
|
|
105
|
-
"zod": "^4.
|
|
105
|
+
"zod": "^4.3.5"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@receptron/test_utils": "^2.0.3",
|
|
@@ -112,12 +112,12 @@
|
|
|
112
112
|
"@types/yargs": "^17.0.35",
|
|
113
113
|
"eslint": "^9.39.2",
|
|
114
114
|
"eslint-config-prettier": "^10.1.8",
|
|
115
|
-
"eslint-plugin-prettier": "^5.5.
|
|
115
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
116
116
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
117
|
-
"prettier": "^3.
|
|
117
|
+
"prettier": "^3.8.0",
|
|
118
118
|
"tsx": "^4.21.0",
|
|
119
119
|
"typescript": "^5.9.3",
|
|
120
|
-
"typescript-eslint": "^8.
|
|
120
|
+
"typescript-eslint": "^8.53.0"
|
|
121
121
|
},
|
|
122
122
|
"engines": {
|
|
123
123
|
"node": ">=20.0.0"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$mulmocast": {
|
|
3
|
+
"version": "1.1"
|
|
4
|
+
},
|
|
5
|
+
"lang": "en",
|
|
6
|
+
"title": "Caption Test",
|
|
7
|
+
"speechParams": {
|
|
8
|
+
"speakers": {
|
|
9
|
+
"Presenter": {
|
|
10
|
+
"voiceId": "shimmer",
|
|
11
|
+
"displayName": {
|
|
12
|
+
"en": "Presenter"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"beats": [
|
|
18
|
+
{
|
|
19
|
+
"speaker": "Presenter",
|
|
20
|
+
"id": "pingpongmov",
|
|
21
|
+
"text": "This is a local movie with audio.",
|
|
22
|
+
"image": {
|
|
23
|
+
"type": "movie",
|
|
24
|
+
"source": {
|
|
25
|
+
"kind": "path",
|
|
26
|
+
"path": "../../test/assets/hello.mp4"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|