mulmocast 1.1.3 → 1.1.5

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.
Files changed (56) hide show
  1. package/lib/actions/audio.d.ts +0 -1
  2. package/lib/actions/audio.js +8 -12
  3. package/lib/actions/images.js +1 -0
  4. package/lib/actions/movie.js +1 -3
  5. package/lib/agents/image_openai_agent.js +4 -1
  6. package/lib/data/index.d.ts +1 -0
  7. package/lib/data/index.js +1 -0
  8. package/lib/data/templateDataSet.d.ts +25 -0
  9. package/lib/data/templateDataSet.js +97 -0
  10. package/lib/methods/mulmo_presentation_style.d.ts +2 -3
  11. package/lib/methods/mulmo_presentation_style.js +14 -8
  12. package/lib/types/agent.d.ts +3 -0
  13. package/lib/types/schema.d.ts +704 -0
  14. package/lib/types/schema.js +5 -1
  15. package/lib/utils/context.d.ts +25 -0
  16. package/lib/utils/file.d.ts +1 -1
  17. package/lib/utils/file.js +5 -2
  18. package/lib/utils/preprocess.d.ts +13 -0
  19. package/package.json +4 -3
  20. package/scripts/templates/image_prompt_only_template.ts +95 -0
  21. package/scripts/test/gpt.json +32 -0
  22. package/scripts/test/mulmo_story.json +11 -0
  23. package/scripts/test/test.json +64 -0
  24. package/scripts/test/test1.json +40 -0
  25. package/scripts/test/test2.json +66 -0
  26. package/scripts/test/test_audio.json +151 -0
  27. package/scripts/test/test_audio_instructions.json +69 -0
  28. package/scripts/test/test_beats.json +58 -0
  29. package/scripts/test/test_captions.json +52 -0
  30. package/scripts/test/test_elevenlabs_models.json +193 -0
  31. package/scripts/test/test_en.json +29 -0
  32. package/scripts/test/test_hello.json +17 -0
  33. package/scripts/test/test_hello_google.json +25 -0
  34. package/scripts/test/test_html.json +66 -0
  35. package/scripts/test/test_image_refs.json +49 -0
  36. package/scripts/test/test_images.json +48 -0
  37. package/scripts/test/test_lang.json +31 -0
  38. package/scripts/test/test_layout.json +152 -0
  39. package/scripts/test/test_lipsync.json +53 -0
  40. package/scripts/test/test_loop.json +34 -0
  41. package/scripts/test/test_media.json +244 -0
  42. package/scripts/test/test_mixed_providers.json +91 -0
  43. package/scripts/test/test_movie.json +39 -0
  44. package/scripts/test/test_no_audio.json +252 -0
  45. package/scripts/test/test_no_audio_with_credit.json +253 -0
  46. package/scripts/test/test_order.json +68 -0
  47. package/scripts/test/test_order_portrait.json +72 -0
  48. package/scripts/test/test_replicate.json +126 -0
  49. package/scripts/test/test_slideout_left_no_audio.json +45 -0
  50. package/scripts/test/test_sound_effect.json +41 -0
  51. package/scripts/test/test_spillover.json +116 -0
  52. package/scripts/test/test_transition.json +55 -0
  53. package/scripts/test/test_transition_no_audio.json +45 -0
  54. package/scripts/test/test_video_speed.json +80 -0
  55. package/scripts/test/test_voice_over.json +104 -0
  56. package/scripts/test/test_voices.json +54 -0
@@ -2,6 +2,5 @@ import "dotenv/config";
2
2
  import type { CallbackFunction } from "graphai";
3
3
  import { MulmoStudioContext, MulmoBeat } from "../types/index.js";
4
4
  export declare const getBeatAudioPath: (text: string, context: MulmoStudioContext, beat: MulmoBeat, lang?: string) => string | undefined;
5
- export declare const audioFilePath: (context: MulmoStudioContext) => string;
6
5
  export declare const generateBeatAudio: (index: number, context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<void>;
7
6
  export declare const audio: (context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<MulmoStudioContext>;
@@ -9,7 +9,7 @@ import ttsGoogleAgent from "../agents/tts_google_agent.js";
9
9
  import ttsElevenlabsAgent from "../agents/tts_elevenlabs_agent.js";
10
10
  import { fileWriteAgent } from "@graphai/vanilla_node_agents";
11
11
  import { MulmoPresentationStyleMethods } from "../methods/index.js";
12
- import { text2SpeechProviderSchema, } from "../types/index.js";
12
+ import { text2SpeechProviderSchema } from "../types/index.js";
13
13
  import { fileCacheAgentFilter } from "../utils/filters.js";
14
14
  import { getAudioArtifactFilePath, getAudioFilePath, getOutputStudioFilePath, resolveDirPath, defaultBGMPath, mkdir, writingMessage } from "../utils/file.js";
15
15
  import { text2hash, localizedText, settings2GraphAIConfig } from "../utils/utils.js";
@@ -30,15 +30,15 @@ const getAudioPath = (context, beat, audioFile) => {
30
30
  }
31
31
  return audioFile;
32
32
  };
33
- const getAudioParam = (presentationStyle, beat) => {
34
- const speaker = MulmoPresentationStyleMethods.getSpeaker(presentationStyle, beat);
33
+ const getAudioParam = (context, beat) => {
34
+ const speaker = MulmoPresentationStyleMethods.getSpeaker(context, beat);
35
35
  const speechOptions = { ...speaker.speechOptions, ...beat.speechOptions };
36
36
  const provider = text2SpeechProviderSchema.parse(speaker.provider);
37
37
  return { voiceId: speaker.voiceId, provider, speechOptions, model: speaker.model };
38
38
  };
39
39
  export const getBeatAudioPath = (text, context, beat, lang) => {
40
40
  const audioDirPath = MulmoStudioContextMethods.getAudioDirPath(context);
41
- const { voiceId, provider, speechOptions, model } = getAudioParam(context.presentationStyle, beat);
41
+ const { voiceId, provider, speechOptions, model } = getAudioParam(context, beat);
42
42
  const hash_string = [text, voiceId, speechOptions?.instruction ?? "", speechOptions?.speed ?? 1.0, provider, model ?? ""].join(":");
43
43
  const audioFileName = `${context.studio.filename}_${text2hash(hash_string)}`;
44
44
  const audioFile = getAudioFilePath(audioDirPath, context.studio.filename, audioFileName, lang);
@@ -46,9 +46,9 @@ export const getBeatAudioPath = (text, context, beat, lang) => {
46
46
  };
47
47
  const preprocessor = (namedInputs) => {
48
48
  const { beat, studioBeat, multiLingual, context } = namedInputs;
49
- const { lang, presentationStyle } = context;
49
+ const { lang } = context;
50
50
  const text = localizedText(beat, multiLingual, lang);
51
- const { voiceId, provider, speechOptions, model } = getAudioParam(presentationStyle, beat);
51
+ const { voiceId, provider, speechOptions, model } = getAudioParam(context, beat);
52
52
  const audioPath = getBeatAudioPath(text, context, beat, lang);
53
53
  studioBeat.audioFile = audioPath; // TODO: Passing by reference is difficult to maintain, so pass it using graphai inputs
54
54
  const needsTTS = !beat.audio && audioPath !== undefined;
@@ -174,11 +174,6 @@ const agentFilters = [
174
174
  nodeIds: ["tts"],
175
175
  },
176
176
  ];
177
- export const audioFilePath = (context) => {
178
- const fileName = MulmoStudioContextMethods.getFileName(context);
179
- const outDirPath = MulmoStudioContextMethods.getOutDirPath(context);
180
- return getAudioArtifactFilePath(outDirPath, fileName);
181
- };
182
177
  const getConcurrency = (context) => {
183
178
  // Check if any speaker uses nijivoice or elevenlabs (providers that require concurrency = 1)
184
179
  const hasLimitedConcurrencyProvider = Object.values(context.presentationStyle.speechParams.speakers).some((speaker) => {
@@ -231,7 +226,7 @@ export const audio = async (context, settings, callbacks) => {
231
226
  const fileName = MulmoStudioContextMethods.getFileName(context);
232
227
  const audioDirPath = MulmoStudioContextMethods.getAudioDirPath(context);
233
228
  const outDirPath = MulmoStudioContextMethods.getOutDirPath(context);
234
- const audioArtifactFilePath = audioFilePath(context);
229
+ const audioArtifactFilePath = getAudioArtifactFilePath(context);
235
230
  const audioSegmentDirPath = resolveDirPath(audioDirPath, fileName);
236
231
  const audioCombinedFilePath = getAudioFilePath(audioDirPath, fileName, fileName, context.lang);
237
232
  const outputStudioFilePath = getOutputStudioFilePath(outDirPath, fileName);
@@ -253,6 +248,7 @@ export const audio = async (context, settings, callbacks) => {
253
248
  const result = await graph.run();
254
249
  writingMessage(audioCombinedFilePath);
255
250
  MulmoStudioContextMethods.setSessionState(context, "audio", false);
251
+ writingMessage(audioArtifactFilePath);
256
252
  return result.combineFiles;
257
253
  }
258
254
  catch (__error) {
@@ -135,6 +135,7 @@ const beat_graph_data = {
135
135
  model: ":preprocessor.imageParams.model",
136
136
  moderation: ":preprocessor.imageParams.moderation",
137
137
  canvasSize: ":context.presentationStyle.canvasSize",
138
+ quality: ":preprocessor.imageParams.quality",
138
139
  },
139
140
  },
140
141
  defaultValue: {},
@@ -246,9 +246,7 @@ export const movieFilePath = (context) => {
246
246
  export const movie = async (context) => {
247
247
  MulmoStudioContextMethods.setSessionState(context, "video", true);
248
248
  try {
249
- const fileName = MulmoStudioContextMethods.getFileName(context);
250
- const outDirPath = MulmoStudioContextMethods.getOutDirPath(context);
251
- const audioArtifactFilePath = getAudioArtifactFilePath(outDirPath, fileName);
249
+ const audioArtifactFilePath = getAudioArtifactFilePath(context);
252
250
  const outputVideoPath = movieFilePath(context);
253
251
  if (await createVideo(audioArtifactFilePath, outputVideoPath, context)) {
254
252
  writingMessage(outputVideoPath);
@@ -6,7 +6,7 @@ import { provider2ImageAgent } from "../utils/provider2agent.js";
6
6
  // https://platform.openai.com/docs/guides/image-generation
7
7
  export const imageOpenaiAgent = async ({ namedInputs, params, config, }) => {
8
8
  const { prompt, referenceImages } = namedInputs;
9
- const { moderation, canvasSize } = params;
9
+ const { moderation, canvasSize, quality } = params;
10
10
  const { apiKey, baseURL } = { ...config };
11
11
  const model = params.model ?? provider2ImageAgent["openai"].defaultModel;
12
12
  const openai = new OpenAI({ apiKey, baseURL });
@@ -42,6 +42,9 @@ export const imageOpenaiAgent = async ({ namedInputs, params, config, }) => {
42
42
  };
43
43
  if (model === "gpt-image-1") {
44
44
  imageOptions.moderation = moderation || "auto";
45
+ if (quality) {
46
+ imageOptions.quality = quality;
47
+ }
45
48
  }
46
49
  const response = await (async () => {
47
50
  try {
@@ -1,2 +1,3 @@
1
1
  export * from "./promptTemplates.js";
2
2
  export * from "./scriptTemplates.js";
3
+ export * from "./templateDataSet.js";
package/lib/data/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./promptTemplates.js";
2
2
  export * from "./scriptTemplates.js";
3
+ export * from "./templateDataSet.js";
@@ -0,0 +1,25 @@
1
+ export declare const templateDataSet: {
2
+ akira_comic: string;
3
+ ani: string;
4
+ ani_ja: string;
5
+ business: string;
6
+ characters: string;
7
+ children_book: string;
8
+ coding: string;
9
+ comic_strips: string;
10
+ drslump_comic: string;
11
+ ghibli_comic: string;
12
+ ghibli_image_only: string;
13
+ ghibli_shorts: string;
14
+ ghost_comic: string;
15
+ html: string;
16
+ onepiece_comic: string;
17
+ podcast_standard: string;
18
+ portrait_movie: string;
19
+ realistic_movie: string;
20
+ sensei_and_taro: string;
21
+ shorts: string;
22
+ text_and_image: string;
23
+ text_only: string;
24
+ trailer: string;
25
+ };
@@ -0,0 +1,97 @@
1
+ export const templateDataSet = {
2
+ akira_comic: "Generate a script for a presentation of the given topic. Another AI will generate images for each beat based on the image prompt of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
3
+ "```JSON\n" +
4
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>AKIRA aesthetic.</style>","images":{"girl":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/akira_presenter.png"}}}}}\n` +
5
+ "```",
6
+ ani: "Generate a script for a presentation of the given topic. 言葉づかいは少しツンデレにして。Another AI will generate comic for each beat based on the image prompt of that beat. You don't need to specify the style of the image, just describe the scene. Mention the reference in one of beats, if it exists. Use the JSON below as a template. Create appropriate amount of beats, and make sure the beats are coherent and flow well.\n" +
7
+ "```JSON\n" +
8
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"movieParams":{"provider":"replicate","model":"bytedance/seedance-1-lite"},"speechParams":{"provider":"openai","speakers":{"Presenter":{"voiceId":"shimmer","speechOptions":{"instruction":"Speak in a slightly high-pitched, curt tone with sudden flustered shifts—like a tsundere anime girl."}}}},"audioParams":{"bgm":{"kind":"url","url":"https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/morning001.mp3"}},"canvasSize":{"width":1024,"height":1536},"imageParams":{"style":"<style>A highly polished 2D digital illustration in anime and manga style, featuring clean linework, soft shading, vivid colors, and expressive facial detailing. The composition emphasizes clarity and visual impact with a minimalistic background and a strong character focus. The lighting is even and bright, giving the image a crisp and energetic feel, reminiscent of high-quality character art used in Japanese visual novels or mobile games.</style>","images":{"ani":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/ani.png"}}}}}\n` +
9
+ "```",
10
+ ani_ja: "Generate a Japanese script for a presentation of the given topic. 言葉づかいは少しツンデレにして。Another AI will generate comic for each beat based on the image prompt of that beat. You don't need to specify the style of the image, just describe the scene. Mention the reference in one of beats, if it exists. Use the JSON below as a template. Create appropriate amount of beats, and make sure the beats are coherent and flow well.\n" +
11
+ "```JSON\n" +
12
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"ja","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"movieParams":{"provider":"replicate","model":"bytedance/seedance-1-lite"},"audioParams":{"bgm":{"kind":"url","url":"https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/morning001.mp3"}},"canvasSize":{"width":1024,"height":1536},"speechParams":{"speakers":{"Presenter":{"provider":"nijivoice","voiceId":"9d9ed276-49ee-443a-bc19-26e6136d05f0"}}},"imageParams":{"style":"<style>A highly polished 2D digital illustration in anime and manga style, featuring clean linework, soft shading, vivid colors, and expressive facial detailing. The composition emphasizes clarity and visual impact with a minimalistic background and a strong character focus. The lighting is even and bright, giving the image a crisp and energetic feel, reminiscent of high-quality character art used in Japanese visual novels or mobile games.</style>","images":{"ani":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/ani.png"}}}}}\n` +
13
+ "```",
14
+ business: "Generate a script for a business presentation of the given topic. Use textSlides, markdown, mermaid, or chart to show slides. Extract image links in the article (from <img> tag) to reuse them in the presentation. Mention the reference in one of beats, if it exists. Use the JSON below as a template. chartData is the data for Chart.js\n" +
15
+ "```JSON\n" +
16
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"Sample Title","references":[{"url":"https://www.somegreatwebsite.com/article/123","title":"Title of the article we are referencing","type":"article"}],"lang":"en","beats":[{"text":"Today we're exploring a fascinating concept that has shaped some of the most innovative companies and leaders of our time: the Reality Distortion Field.","image":{"type":"textSlide","slide":{"title":"This is the title of the presentation"}}},{"text":"This is a sample slide, which just displays the title and the presenter's name of this presentation.","image":{"type":"textSlide","slide":{"title":"This is the title of the presentation","subtitle":"Tom Johnson"}}},{"text":"The evolution of humans is a complex journey that spans millions of years, shaped by biology, environment, and culture. Here's a high-level summary of the key stages in human evolution","image":{"type":"textSlide","slide":{"title":"Human Evolution","bullets":["Early Primates","Hominids and Hominins","Australopithecus","Genus Homo Emerges","Homo erectus and Migration","Neanderthals and Other Archaic Humans","Homo sapiens"]}}},{"text":"This is a table of items in the store.","image":{"type":"markdown","markdown":["# Markdown Table Example","| Item | In Stock | Price |","| :---------------- | :------: | ----: |","| Python Hat | True | 23.99 |","| SQL Hat | True | 23.99 |","| Codecademy Tee | False | 19.99 |","| Codecademy Hoodie | False | 42.99 |"]}},{"text":"This page shows the sales and profits of this company from January 2024 to June 2024.","image":{"type":"chart","title":"Sales and Profits (from Jan to June)","chartData":{"type":"bar","data":{"labels":["January","February","March","April","May","June"],"datasets":[{"label":"Revenue ($1000s)","data":[120,135,180,155,170,190],"backgroundColor":"rgba(54, 162, 235, 0.5)","borderColor":"rgba(54, 162, 235, 1)","borderWidth":1},{"label":"Profit ($1000s)","data":[45,52,68,53,61,73],"backgroundColor":"rgba(75, 192, 192, 0.5)","borderColor":"rgba(75, 192, 192, 1)","borderWidth":1}]},"options":{"responsive":true,"animation":false}}}},{"text":"This is a sample pie chart","image":{"type":"chart","title":"A sample pie chart","chartData":{"type":"pie","data":{"labels":["OpenAIと投資家の取り分","マイクロソフトの取り分"],"datasets":[{"data":[90,10],"backgroundColor":["rgba(75, 192, 192, 0.5)","rgba(54, 162, 235, 0.5)"],"borderColor":["rgba(75, 192, 192, 1)","rgba(54, 162, 235, 1)"],"borderWidth":1}]},"options":{"responsive":true,"animation":false,"plugins":{"legend":{"position":"bottom"}}}}}},{"text":"Next, let's look at a diagram of our business process flow. This illustrates the key steps from product development to sales.","image":{"type":"mermaid","title":"Business Process Flow","code":{"kind":"text","text":"graph LR\\n A[Market Research] --> B[Product Planning]\\n B --> C[Development]\\n C --> D[Testing]\\n D --> E[Manufacturing]\\n E --> F[Marketing]\\n F --> G[Sales]\\n G --> H[Customer Support]\\n H --> A"}}},{"text":"This is a tailwind html format.","image":{"type":"html_tailwind","html":["<main class=\\"flex-grow\\">"," <!-- Hero Section -->"," <section class=\\"bg-blue-600 text-white py-20\\">"," <div class=\\"container mx-auto px-6 text-center\\">"," <h1 class=\\"text-4xl md:text-5xl font-bold mb-4\\">Welcome to Mulmocast</h1>"," <p class=\\"text-lg md:text-xl mb-8\\">A modern web experience powered by Tailwind CSS</p>"," <a href=\\"#features\\" class=\\"bg-white text-blue-600 px-6 py-3 rounded-lg font-semibold shadow hover:bg-gray-100 transition\\">"," Learn More"," </a>"," </div>"," </section>",""," <!-- Features Section -->"," <section id=\\"features\\" class=\\"py-16 bg-gray-100\\">"," <div class=\\"container mx-auto px-6\\">"," <div class=\\"grid grid-cols-1 md:grid-cols-3 gap-8 text-center\\">"," <div>"," <div class=\\"text-blue-600 text-4xl mb-2\\">⚡</div>"," <h3 class=\\"text-xl font-semibold mb-2\\">Fast</h3>"," <p class=\\"text-gray-600\\">Built with performance in mind using modern tools.</p>"," </div>"," <div>"," <div class=\\"text-blue-600 text-4xl mb-2\\">🎨</div>"," <h3 class=\\"text-xl font-semibold mb-2\\">Beautiful</h3>"," <p class=\\"text-gray-600\\">Styled with Tailwind CSS for clean, responsive design.</p>"," </div>"," <div>"," <div class=\\"text-blue-600 text-4xl mb-2\\">🚀</div>"," <h3 class=\\"text-xl font-semibold mb-2\\">Launch Ready</h3>"," <p class=\\"text-gray-600\\">Easy to deploy and extend for your next big idea.</p>"," </div>"," </div>"," </div>"," </section>","</main>","","<!-- Footer -->","<footer class=\\"bg-white text-gray-500 text-center py-6 border-t\\">"," 2025 Mulmocast.","</footer>"]}},{"text":"This is the image of the future of enterprise applications.","image":{"type":"image","source":{"kind":"url","url":"https://satoshi.blogs.com/mag2/May2025/enterprise_app.png"}}}]}\n` +
17
+ "```",
18
+ characters: "Generate a script for a the given story with multiple characters. Generate image prompts for each character, and make references to them in the beats. Use the JSON below as a template.\n" +
19
+ "```JSON\n" +
20
+ '{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE OF THE PRESENTAITON OR STORY]","imageParams":{"images":{"[CHARACTER_ID_1]":{"type":"imagePrompt","prompt":"[IMAGE PROMPT FOR THIS CHARACTER]"},"[CHARACTER_ID_2]":{"type":"imagePrompt","prompt":"[IMAGE PROMPT FOR THIS CHARACTER]"}}},"beats":[{"text":"[NARRATION FOR THIS BEAT]","imagePrompt":"[IMAGE PROMPT FOR THIS BEAT (with both characters)]","imageNames":["[CHARACTER_ID_1]","[CHARACTER_ID_2]"]},{"text":"[NARRATION FOR THIS BEAT]","imagePrompt":"[IMAGE PROMPT FOR THIS BEAT (only character 1)]","imageNames":["[CHARACTER_ID_1]"]},{"text":"[NARRATION FOR THIS BEAT]","imagePrompt":"[IMAGE PROMPT FOR THIS BEAT (no character)]","imageNames":[]}],"canvasSize":{"width":1536,"height":1024}}\n' +
21
+ "```",
22
+ children_book: "Please generate a script for a children book on the topic provided by the user. Each page (=beat) must haven an image prompt appropriate for the text.\n" +
23
+ "```JSON\n" +
24
+ '{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"桃太郎","lang":"ja","beats":[{"text":"むかしむかし、あるところにおじいさんとおばあさんが住んでいました。おじいさんは山へ芝刈りに、おばあさんは川へ洗濯に行きました。","imagePrompt":"藁葺き屋根の古い日本家屋。近くには清らかな川が流れ、裏には緑豊かな山がある。おじいさんは鎌を持って山へ向かい、おばあさんは洗濯かごを持って川へ向かっている。春の穏やかな日差しが風景を照らしている。"},{"text":"おばあさんが川で洗濯をしていると、上流から大きな桃が流れてきました。「まあ、なんて大きな桃でしょう」とおばあさんは驚きました。","imagePrompt":"川で洗濯するおばあさん。川面に映る青空と白い雲。上流から流れてくる異様に大きくて鮮やかな赤い桃。驚いた表情でそれを見つめるおばあさん。周りには洗濯物と石。"},{"text":"おばあさんはその桃を持ち帰り、「おじいさん、大きな桃を見つけましたよ」と言いました。二人が桃を切ろうとすると、中から元気な男の子が生まれました。","imagePrompt":"家の中、赤ん坊を高く抱き上げて、驚きと喜びの表情を浮かべる老夫婦。"},{"text":"二人は男の子を「桃太郎」と名付けて、大切に育てました。桃太郎はすくすくと成長し、とても強い子になりました。","imagePrompt":"時間の経過を示す4コマの連続画像。最初は赤ちゃん、次に幼児、そして少年、最後に若い男性へと成長する桃太郎。各段階でおじいさんとおばあさんが愛情深く見守っている。最後の画像では、たくましく成長した桃太郎が木を持ち上げたり、重い石を運んだりして力の強さを示している。"},{"text":"ある日、鬼が島から来た鬼たちが村を荒らしているという話を聞いた桃太郎は、おじいさんとおばあさんに「鬼退治に行きます」と告げました。","imagePrompt":"家の中の桃太郎、おじいさんとおばあさん。窓の外では村人たちが恐怖の表情で逃げ回り、遠くには炎と煙が見える。決意に満ちた表情の桃太郎が立ち上がり、おじいさんとおばあさんに語りかけている。憂慮と誇りの入り混じった表情の老夫婦。"},{"text":"おばあさんは桃太郎のために、日本一のきびだんごを作ってくれました。おじいさんは立派な刀と着物をくれました。","imagePrompt":"家の中。おばあさんが台所できびだんごを作り、おじいさんが桐箱から刀と鮮やかな着物を取り出している。準備を整える桃太郎。テーブルの上には小さな布包みにきびだんごが包まれている。朝日が障子を通して部屋を温かく照らしている。"},{"text":"「いってきます」と言って、桃太郎はきびだんごを持って、鬼が島へ向かいました。","imagePrompt":"家の前で出発する桃太郎。腰にはきびだんごの入った袋と刀、背中には小さな旗。見送るおじいさんとおばあさん、そして村人たち。桃太郎は自信に満ちた表情で前方を見つめている。朝霧の中、道は山々へと続いている。"},{"text":"道中、桃太郎は犬に出会いました。「桃太郎さん、桃太郎さん、お腰につけたきびだんご、一つわたしに下さいな」と犬は言いました。","imagePrompt":"山道を進む桃太郎。横には大きな茶色の犬が立っている。犬は尾を振り、期待を込めた表情で桃太郎を見上げている。周りには春の花と緑豊かな自然。桃太郎は犬に微笑みかけている。"},{"text":"「よし、一つあげよう。その代わり家来になるんだよ」と桃太郎は言いました。犬は喜んできびだんごを食べ、桃太郎の家来になりました。","imagePrompt":"桃太郎がきびだんごを犬に渡している様子。犬が嬉しそうにきびだんごを食べている。桃太郎の表情は優しく頼もしい。背景には山と川、遠くには鬼が島を思わせる遠景。"},{"text":"次に、桃太郎と犬は猿に出会いました。猿もきびだんごと引き換えに、桃太郎の家来になりました。","imagePrompt":"森の中の道。桃太郎と犬が木にとまる猿と話している。猿は好奇心いっぱいの表情で桃太郎の手にあるきびだんごを見ている。周りには色とりどりの木々と花。犬は猿を友好的に見上げている。"},{"text":"さらに進むと、今度はキジに出会いました。キジもきびだんごをもらい、桃太郎の家来になりました。","imagePrompt":"山の開けた場所。空高く舞うカラフルなキジが桃太郎たちに近づいてきている。地面には桃太郎、犬、猿が立っており、空を見上げている。キジは美しい羽を広げ、桃太郎のきびだんごに目を向けている。背景には雄大な山々と澄んだ青空。"},{"text":"こうして桃太郎は、犬、猿、キジを家来にして、いよいよ鬼が島へと向かいました。","imagePrompt":"海に浮かぶ鬼が島に向かう小さな船。船の上には桃太郎、犬、猿、キジが乗っている。桃太郎は立って指揮を取り、犬は船の前方を見据え、猿は帆を操作し、キジは空から見張りをしている。荒々しい波と暗雲が立ち込める中、島へと近づく彼らの姿。島には険しい岩山と不気味な城が見える。"},{"text":"鬼が島に着くと、そこには大きな門がありました。キジが飛んで様子を見ると、中では鬼たちが宴会をしていました。","imagePrompt":"鬼ヶ島の大きな赤い門。門の上空を飛ぶキジ。門の向こう側では、様々な色の鬼たちが酒を飲み、踊り、騒いでいる様子が見える。鬼の中には角が1本、2本、3本のものなど様々。宴会場の周りには盗んできた宝物が山積みになっている。門の手前には桃太郎、犬、猿が隠れて様子をうかがっている。"},{"text":"「よーし、みんな準備はいいか。今から鬼退治だ!」と桃太郎は言いました。","imagePrompt":"鬼ヶ島の入り口近く、岩陰に隠れた桃太郎と家来たち。桃太郎は刀を抜き、決意に満ちた表情で仲間たちに語りかけている。犬は牙をむき、猿は棒を構え、キジは鋭い嘴を見せて戦う準備をしている。全員が真剣な表情で桃太郎の言葉に耳を傾けている。背景には鬼の城が不気味にそびえ立っている。"},{"text":"桃太郎たちは勇敢に戦いました。犬は鬼の足に噛みつき、猿は鬼の髪を引っ張り、キジは鬼の目をつついて攻撃しました。","imagePrompt":"鬼ヶ島の城の中での激しい戦闘シーン。様々な色の鬼たちが驚きと怒りの表情で戦っている。犬は赤鬼の足に噛みついて倒し、猿は青鬼の髪を引っ張って混乱させ、キジは緑鬼の目をつついている。中央では桃太郎が刀を振るい、黄色い鬼と対峙している。背景には他の鬼たちも逃げ惑う姿がある。戦いの熱気と混乱が画面いっぱいに広がっている。"},{"text":"そして桃太郎は鬼の大将に向かって行きました。激しい戦いの末、桃太郎は鬼の大将を倒しました。","imagePrompt":"城の奥、豪華な部屋での桃太郎と鬼の大将との一騎打ち。鬼の大将は巨大で、赤い肌に金色の兜と鉄の棍棒を持っている。桃太郎は小さいながらも勇敢に刀を構えて対峙している。部屋の周りには宝物が散らばり、窓からは戦いを見守る家来たちの姿が見える。決定的な一撃を加えようとする桃太郎と、驚きの表情を浮かべる鬼の大将。"},{"text":"「もう悪いことはしません。命だけはお助けください」と鬼たちは降参しました。そして村から盗んだ宝物をすべて差し出しました。","imagePrompt":"床に頭を下げて土下座する鬼の大将と鬼たち。勝利した桃太郎が堂々と立ち、家来たちがその横に誇らしげに並んでいる。鬼たちの前には金銀財宝、布、米俵など盗んだ宝物が山と積まれている。鬼たちは恐れと後悔の表情を浮かべている。桃太郎の表情は厳しいながらも慈悲深さを感じさせる。"},{"text":"桃太郎と家来たちは宝物を持って村に帰りました。村人たちは大喜びで彼らを迎えました。","imagePrompt":"村に凱旋する桃太郎と家来たち。宝物を運ぶ犬、猿、キジ。桃太郎は誇らしげに村人たちに手を振っている。老若男女の村人たちが道の両側に集まり、喜びの表情で花や旗を振って迎えている。おじいさんとおばあさんも最前列で涙を流しながら桃太郎の帰りを待っている。春の明るい日差しが村全体を照らしている。"},{"text":"おじいさんとおばあさんは桃太郎の無事な帰りを喜び、抱きしめました。そして村はもう二度と鬼に襲われることはありませんでした。","imagePrompt":"家の前でおじいさんとおばあさんが桃太郎を抱きしめている感動的な場面。喜びの涙を流すおじいさんとおばあさん。犬、猿、キジも幸せそうに見守っている。周りには村人たちが集まり、祝福している。家の前には宝物の一部が置かれ、背景には平和な村の風景が広がっている。夕日が温かな光を投げかけ、晴れやかな雰囲気を作り出している。"},{"text":"こうして桃太郎とおじいさんとおばあさん、そして家来たちは幸せに暮らしました。めでたし、めでたし。","imagePrompt":"時が経ち、平和になった村の風景。桃太郎の家では、おじいさんとおばあさんが縁側でお茶を飲んでいる。庭では成長した桃太郎が犬、猿、キジと一緒に楽しそうに過ごしている。背景には実りある田んぼと平和な村の様子。桃の木が花を咲かせ、その下で皆が笑顔で暮らしている。夕暮れの優しい光が全体を包み込み、物語の幸せな結末を象徴している。"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"A hand-drawn style illustration with a warm, nostalgic atmosphere. The background is rich with natural scenery—lush forests, cloudy skies, and traditional Japanese architecture. Characters have expressive eyes, soft facial features, and are portrayed with gentle lighting and subtle shading. The color palette is muted yet vivid, using earthy tones and watercolor-like textures. The overall scene feels magical and peaceful, with a sense of quiet wonder and emotional depth, reminiscent of classic 1980s and 1990s Japanese animation."}}\n' +
25
+ "```",
26
+ coding: "Generate a script for a technical presentation of the given topic. Use markdown with a code block to show some code on a slide. Avoid long coding examples, which may not fit in a single slide. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
27
+ "```JSON\n" +
28
+ '{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"Sample Title","lang":"en","beats":[{"text":"This is a slide, which just displays the title of this presentation.","image":{"type":"textSlide","slide":{"title":"This is the title of the presentation"}}},{"text":"This is ta slide, which just displays the title and the presenter\'s name of this presentation.","image":{"type":"textSlide","slide":{"title":"This is the title of the presentation","subtitle":"Tom Johnson"}}},{"text":"Here is the sample code","image":{"type":"markdown","markdown":"# Markdown Table Example\\n```TypeScript\\nconst main = () => {\\n console.log(\'Hello World\')\\n}\\n```"}},{"text":"Here is two sets of code, side by side","image":{"type":"markdown","markdown":"# Hello World in two languages\\n<div style=\\"display: flex; gap: 16px;\\">\\n <pre>// JavaScript example\\nfunction greet(name) {\\n console.log(`Hello, ${name}!`);\\n}\\ngreet(\\"World\\");\\n</pre>\\n\\n <pre># Python example\\ndef greet(name):\\n print(f\\"Hello, {name}!\\")\\n\\ngreet(\\"World\\")\\n</pre>\\n</div>"}},{"text":"The evolution of humans is a complex journey that spans millions of years, shaped by biology, environment, and culture. Here\'s a high-level summary of the key stages in human evolution","image":{"type":"textSlide","slide":{"title":"Human Evolution","bullets":["Early Primates","Hominids and Hominins","Australopithecus","Genus Homo Emerges","Homo erectus and Migration","Neanderthals and Other Archaic Humans","Homo sapiens"]}}},{"text":"This table shows the items in the store.","image":{"type":"markdown","markdown":["# Markdown Table Example","| Item | In Stock | Price |","| :---------------- | :------: | ----: |","| Python Hat | True | 23.99 |","| SQL Hat | True | 23.99 |","| Codecademy Tee | False | 19.99 |","| Codecademy Hoodie | False | 42.99 |"]}},{"text":"Next, let\'s look at a diagram of our business process flow. This illustrates the key steps from product development to sales.","image":{"type":"mermaid","title":"Business Process Flow","code":{"kind":"text","text":"graph LR\\n A[Market Research] --> B[Product Planning]\\n B --> C[Development]\\n C --> D[Testing]\\n D --> E[Manufacturing]\\n E --> F[Marketing]\\n F --> G[Sales]\\n G --> H[Customer Support]\\n H --> A"}}},{"text":"This page shows the sales and profits of this company from January 2024 to June 2024.","image":{"type":"chart","title":"Sales and Profits (from Jan to June)","chartData":{"type":"bar","data":{"labels":["January","February","March","April","May","June"],"datasets":[{"label":"Revenue ($1000s)","data":[120,135,180,155,170,190],"backgroundColor":"rgba(54, 162, 235, 0.5)","borderColor":"rgba(54, 162, 235, 1)","borderWidth":1},{"label":"Profit ($1000s)","data":[45,52,68,53,61,73],"backgroundColor":"rgba(75, 192, 192, 0.5)","borderColor":"rgba(75, 192, 192, 1)","borderWidth":1}]},"options":{"responsive":true,"animation":false}}}},{"text":"This is the image of a high school girl in Harajuku.","image":{"type":"image","source":{"kind":"url","url":"https://satoshi.blogs.com/mag2/May2025/ghibli0.png"}}}]}\n' +
29
+ "```",
30
+ comic_strips: "Generate a script for a presentation of the given topic. Another AI will generate comic strips for each beat based on the text description of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
31
+ "```JSON\n" +
32
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>A multi panel comic strips. 1990s American workplace humor. Clean, minimalist line art with muted colors. One character is a nerdy office worker with glasses</style>"}}\n` +
33
+ "```",
34
+ drslump_comic: "Generate a script for a presentation of the given topic. Another AI will generate images for each beat based on the image prompt of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
35
+ "```JSON\n" +
36
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>Dragon Ball/Dr. Slump aesthetic.</style>","images":{"girl":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/slump_presenter.png"}}}}}\n` +
37
+ "```",
38
+ ghibli_comic: "Generate a script for a presentation of the given topic. Another AI will generate comic strips for each beat based on the text description of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
39
+ "```JSON\n" +
40
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>Ghibli style</style>","images":{"presenter":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/ghibli_presenter.png"}}}}}\n` +
41
+ "```",
42
+ ghibli_image_only: "Generate a script for a presentation of the given topic. Another AI will generate an image for each beat based on the text description of that beat. Use the JSON below as a template.\n" +
43
+ "```JSON\n" +
44
+ '{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","beats":[{"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>Ghibli style</style>","images":{"presenter":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/ghibli_presenter.png"}}}}}\n' +
45
+ "```",
46
+ ghibli_shorts: "Generate a Japanese script for a Youtube shorts of the given topic. Another AI will generate comic strips for each beat based on the text description of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
47
+ "```JSON\n" +
48
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1024,"height":1536},"speechParams":{"speakers":{"Presenter":{"provider":"nijivoice","voiceId":"3708ad43-cace-486c-a4ca-8fe41186e20c","speechOptions":{"speed":1.5}}}},"imageParams":{"style":"<style>Ghibli style</style>","images":{"presenter":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/ghibli_presenter.jpg"}}}}}\n` +
49
+ "```",
50
+ ghost_comic: "Generate a script for a presentation of the given topic. Another AI will generate images for each beat based on the image prompt of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
51
+ "```JSON\n" +
52
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>Ghost in the shell aesthetic.</style>","images":{"presenter":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/ghost_presenter.png"}},"optimus":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/optimus.png"}}}}}\n` +
53
+ "```",
54
+ html: "Generate a script for a business presentation of the given topic. Another LLM will generate actual slides from the prompt and data for each beat. Adding optional data would help it to generate more compelling slide. Mention the reference in one of beats, if it exists. The valid type of reference is 'article', 'paper', 'image', 'video', 'audio'. Use the JSON below as a template.\n" +
55
+ "```JSON\n" +
56
+ '{"$mulmocast":{"version":"1.1","credit":"closing"},"references":[{"url":"https://www.somegreatwebsite.com/article/123","title":"Title of the article we are referencing","type":"[TYPE OF ARTICLE: article, paper, image, video, audio]"}],"title":"[TITLE: Brief, engaging title for the topic]","htmlImageParams":{"provider":"anthropic","model":"claude-3-7-sonnet-20250219"},"lang":"en","beats":[{"text":"[NARRATION: Narration for the beat.]","htmlPrompt":{"prompt":"[PROMPT to create appropriate HTML page for the beat.]"}},{"text":"[NARRATION: Narration for the beat.]","htmlPrompt":{"prompt":"[PROMPT to create appropriate HTML page for the beat with the data.]","data":{"description":"DATA TO BE PRESENTED IN THIS BEAT (in any format)]","net_income":{"Q2 FY2024":320,"Q3 FY2024":333,"Q4 FY2024":350},"unit":"USD (Million)"}}}]}\n' +
57
+ "```",
58
+ onepiece_comic: "Generate a script for a presentation of the given topic. Another AI will generate images for each beat based on the image prompt of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
59
+ "```JSON\n" +
60
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>One Piece aesthetic.</style>","images":{"presenter":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/onepiece_presenter.png"}}}}}\n` +
61
+ "```",
62
+ podcast_standard: "Please generate a podcast script based on the topic provided by the user.\n" +
63
+ "\n" +
64
+ "The output should follow the JSON schema specified below. Please provide your response as valid JSON within ```json code blocks for clarity.\n" +
65
+ "\n" +
66
+ "```JSON\n" +
67
+ '{"type":"object","properties":{"$mulmocast":{"type":"object","properties":{"version":{"type":"string","const":"1.1"},"credit":{"type":"string","const":"closing"}},"required":["version"],"additionalProperties":false},"canvasSize":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"}},"required":["width","height"],"additionalProperties":false,"default":{"width":1280,"height":720}},"speechParams":{"type":"object","properties":{"speakers":{"type":"object","additionalProperties":{"type":"object","properties":{"displayName":{"type":"object","additionalProperties":{"type":"string"}},"voiceId":{"type":"string"},"isDefault":{"type":"boolean"},"speechOptions":{"type":"object","properties":{"speed":{"type":"number"},"instruction":{"type":"string"}},"additionalProperties":false},"provider":{"type":"string","enum":["nijivoice","openai","google","elevenlabs"],"default":"openai"},"model":{"type":"string","description":"TTS model to use for this speaker"}},"required":["voiceId"],"additionalProperties":false}}},"required":["speakers"],"additionalProperties":false,"default":{"speakers":{"Presenter":{"voiceId":"shimmer","displayName":{"en":"Presenter"}}}}},"imageParams":{"type":"object","properties":{"provider":{"type":"string","enum":["openai","google"],"default":"openai"},"model":{"type":"string"},"style":{"type":"string"},"moderation":{"type":"string"},"images":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"base64"},"data":{"type":"string"}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"path"},"path":{"type":"string"}},"required":["kind","path"],"additionalProperties":false}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"imagePrompt"},"prompt":{"type":"string"}},"required":["type","prompt"],"additionalProperties":false}]}}},"additionalProperties":false,"default":{"provider":"openai","images":{}}},"movieParams":{"type":"object","properties":{"provider":{"type":"string","enum":["replicate","google"],"default":"replicate"},"model":{"type":"string"},"transition":{"type":"object","properties":{"type":{"type":"string","enum":["fade","slideout_left"]},"duration":{"type":"number","minimum":0,"maximum":2,"default":0.3}},"required":["type"],"additionalProperties":false},"fillOption":{"type":"object","properties":{"style":{"type":"string","enum":["aspectFit","aspectFill"],"default":"aspectFit"}},"additionalProperties":false,"description":"How to handle aspect ratio differences between image and canvas"}},"additionalProperties":false,"default":{"provider":"replicate"}},"soundEffectParams":{"type":"object","properties":{"provider":{"type":"string","enum":["replicate"],"default":"replicate"},"model":{"type":"string"}},"additionalProperties":false,"default":{"provider":"replicate"}},"lipSyncParams":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"}},"additionalProperties":false},"htmlImageParams":{"type":"object","properties":{"model":{"type":"string"},"provider":{"type":"string","enum":["openai","anthropic"],"default":"openai"}},"additionalProperties":false},"textSlideParams":{"type":"object","properties":{"cssStyles":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["cssStyles"],"additionalProperties":false},"captionParams":{"type":"object","properties":{"lang":{"type":"string"},"styles":{"type":"array","items":{"type":"string"},"default":[]}},"additionalProperties":false},"audioParams":{"type":"object","properties":{"padding":{"type":"number","default":0.3,"description":"Padding between beats"},"introPadding":{"type":"number","default":1,"description":"Padding at the beginning of the audio"},"closingPadding":{"type":"number","default":0.8,"description":"Padding before the last beat"},"outroPadding":{"type":"number","default":1,"description":"Padding at the end of the audio"},"bgm":{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source"},"bgmVolume":{"type":"number","default":0.2,"description":"Volume of the background music"},"audioVolume":{"type":"number","default":1,"description":"Volume of the audio"},"suppressSpeech":{"type":"boolean","default":false,"description":"Suppress speech generation"}},"additionalProperties":false,"default":{"introPadding":1,"padding":0.3,"closingPadding":0.8,"outroPadding":1,"bgmVolume":0.2,"audioVolume":1}},"title":{"type":"string"},"description":{"type":"string"},"references":{"type":"array","items":{"type":"object","properties":{"url":{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source/anyOf/0/properties/url"},"title":{"type":"string"},"description":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["article","paper","image","video","audio"]},{"type":"string"}],"default":"article"}},"required":["url"],"additionalProperties":false}},"lang":{"$ref":"#/properties/captionParams/properties/lang"},"beats":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string"},"text":{"type":"string","default":"","description":"Text to be spoken. If empty, the audio is not generated."},"id":{"type":"string","description":"Unique identifier for the beat."},"description":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"markdown"},"markdown":{"$ref":"#/properties/textSlideParams/properties/cssStyles"}},"required":["type","markdown"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web"},"url":{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source/anyOf/0/properties/url"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pdf"},"source":{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source"}},"required":["type","source"],"additionalProperties":false},{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0"},{"type":"object","properties":{"type":{"type":"string","const":"svg"},"source":{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"movie"},"source":{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"textSlide"},"slide":{"type":"object","properties":{"title":{"type":"string"},"subtitle":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}}},"required":["title"],"additionalProperties":false}},"required":["type","slide"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"chart"},"title":{"type":"string"},"chartData":{"type":"object","additionalProperties":{}}},"required":["type","title","chartData"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"mermaid"},"title":{"type":"string","description":"The title of the diagram"},"code":{"anyOf":[{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source/anyOf/0"},{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source/anyOf/1"},{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source/anyOf/2"},{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source/anyOf/3"}],"description":"The code of the mermaid diagram"},"appendix":{"type":"array","items":{"type":"string"},"description":"The appendix of the mermaid diagram; typically, style information."}},"required":["type","title","code"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"html_tailwind"},"html":{"$ref":"#/properties/textSlideParams/properties/cssStyles"}},"required":["type","html"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"beat"},"id":{"type":"string","description":"Specifies the beat to reference."}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"voice_over"},"startAt":{"type":"number","description":"The time to start the voice over the video in seconds."}},"required":["type"],"additionalProperties":false}]},"audio":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"audio"},"source":{"$ref":"#/properties/imageParams/properties/images/additionalProperties/anyOf/0/properties/source"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"midi"},"source":{"type":"string"}},"required":["type","source"],"additionalProperties":false}]},"duration":{"type":"number","description":"Duration of the beat. Used only when the text is empty"},"imageParams":{"$ref":"#/properties/imageParams"},"audioParams":{"type":"object","properties":{"padding":{"type":"number","description":"Padding between beats"},"movieVolume":{"type":"number","default":1,"description":"Audio volume of the imported or generated movie"}},"additionalProperties":false},"movieParams":{"type":"object","properties":{"provider":{"$ref":"#/properties/movieParams/properties/provider"},"model":{"type":"string"},"fillOption":{"$ref":"#/properties/movieParams/properties/fillOption","description":"How to handle aspect ratio differences between image and canvas"},"speed":{"type":"number","description":"Speed of the video. 1.0 is normal speed. 0.5 is half speed. 2.0 is double speed."}},"additionalProperties":false},"soundEffectParams":{"$ref":"#/properties/soundEffectParams"},"lipSyncParams":{"$ref":"#/properties/lipSyncParams"},"htmlImageParams":{"type":"object","properties":{"model":{"$ref":"#/properties/htmlImageParams/properties/model"}},"additionalProperties":false},"speechOptions":{"$ref":"#/properties/speechParams/properties/speakers/additionalProperties/properties/speechOptions"},"textSlideParams":{"$ref":"#/properties/textSlideParams"},"captionParams":{"$ref":"#/properties/captionParams"},"imageNames":{"type":"array","items":{"type":"string"}},"imagePrompt":{"type":"string"},"moviePrompt":{"type":"string"},"soundEffectPrompt":{"type":"string"},"htmlPrompt":{"type":"object","properties":{"systemPrompt":{"type":"string","default":""},"prompt":{"type":"string","default":""},"data":{},"images":{"type":"object","additionalProperties":{}}},"additionalProperties":false},"enableLipSync":{"type":"boolean","description":"Enable lip sync generation for this beat"}},"additionalProperties":false},"minItems":1},"imagePath":{"type":"string"},"__test_invalid__":{"type":"boolean"}},"required":["$mulmocast","beats"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}\n' +
68
+ "```",
69
+ portrait_movie: "Generate a script for a presentation of the given topic. Another AI will generate images for each beat based on the image prompt of that beat. Movie prompts must be written in English. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
70
+ "```JSON\n" +
71
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"movieParams":{"provider":"google"},"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"}],"canvasSize":{"width":1024,"height":1536},"imageParams":{"style":"<style>Photo realistic, cinematic.</style>","images":{"presenter":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/female_presenter.png"}}}}}\n` +
72
+ "```",
73
+ realistic_movie: "Generate a script for a presentation of the given topic. Another AI will generate images for each beat based on the image prompt of that beat. Movie prompts must be written in English. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
74
+ "```JSON\n" +
75
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"movieParams":{"provider":"google"},"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>Photo realistic, cinematic.</style>","images":{"presenter":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/female_presenter.png"}}}}}\n` +
76
+ "```",
77
+ sensei_and_taro: "この件について、内容全てを高校生にも分かるように、太郎くん(Student)と先生(Teacher)の会話、という形の台本をArtifactとして作って。ただし要点はしっかりと押さえて。以下に別のトピックに関するサンプルを貼り付けます。このJSONフォーマットに従って。\n" +
78
+ "```JSON\n" +
79
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"韓国の戒厳令とその日本への影響","description":"韓国で最近発令された戒厳令とその可能性のある影響について、また日本の憲法に関する考慮事項との類似点を含めた洞察に満ちた議論。","lang":"ja","beats":[{"speaker":"Announcer","text":"今日は、韓国で起きた戒厳令について、太郎くんが先生に聞きます。","imagePrompt":"A classroom setting with a curious Japanese student (Taro) and a kind teacher. Calm atmosphere, early morning light coming through the window."},{"speaker":"Student","text":"先生、今日は韓国で起きた戒厳令のことを教えてもらえますか?","imagePrompt":"The student (Taro) sitting at his desk with a serious expression, raising his hand to ask a question. Teacher is slightly surprised but attentive."},{"speaker":"Teacher","text":"もちろんだよ、太郎くん。韓国で最近、大統領が「戒厳令」っていうのを突然宣言したんだ。","imagePrompt":"TV screen showing a breaking news headline in Korean: 'President Declares Martial Law'. Students watching with concern."},{"speaker":"Student","text":"戒厳令ってなんですか?","imagePrompt":"A close-up of the student's puzzled face, with a speech bubble saying '戒厳令って?'"},{"speaker":"Teacher","text":"簡単に言うと、国がすごく危ない状態にあるとき、軍隊を使って人々の自由を制限するためのものなんだ。","imagePrompt":"Illustration of soldiers standing in the street, people being stopped and questioned, with a red 'X' on a protest sign. Moody and serious tone."},{"speaker":"Student","text":"それって怖いですね。なんでそんなことをしたんですか?","imagePrompt":"Student looking anxious, thinking deeply. Background shows a shadowy image of a politician giving orders to the military."},{"speaker":"Teacher","text":"大統領は「国会がうまく機能していないから」と言っていたけど…","imagePrompt":"A tense scene of military personnel entering a national assembly building in Korea, lawmakers looking shocked and resisting."},{"speaker":"Student","text":"ええっ!?国会議員を捕まえようとするなんて、すごく危ないことじゃないですか。","imagePrompt":"The student reacts with shock, comic-style expression with wide eyes and open mouth. Background fades into a dramatic courtroom or parliament chaos."},{"speaker":"Teacher","text":"その通りだよ。もし軍隊が国会を占拠していたら…","imagePrompt":"Dark visual of a locked parliament building with soldiers blocking the entrance, ominous sky in the background."},{"speaker":"Student","text":"韓国ではどうなったんですか?","imagePrompt":"Student leans forward, curious and worried. Background shows a hopeful scene of people holding protest signs with candles at night."},{"speaker":"Teacher","text":"幸い、野党の議員や市民たちが急いで集まって抗議して…","imagePrompt":"Peaceful protest scene in Seoul, citizens holding candles and banners, united. Hopeful tone."},{"speaker":"Student","text":"それは大変なことですね…。日本ではそんなこと起きないんですか?","imagePrompt":"Student looking toward the Japanese flag outside the school window, pensive mood."},{"speaker":"Teacher","text":"実はね、今、日本でも似たような話があるんだよ。","imagePrompt":"Teacher pointing to a newspaper headline: '緊急事態条項の議論進む'. Classroom chalkboard shows a map of Korea and Japan."},{"speaker":"Student","text":"緊急事態宣言って、韓国の戒厳令と同じようなものなんですか?","imagePrompt":"Split screen image: left side shows a soldier in Korea, right side shows a suited Japanese politician giving a press conference."},{"speaker":"Teacher","text":"似ている部分があるね。たとえば、総理大臣が…","imagePrompt":"Diagram-style visual showing the flow of emergency powers from PM to local governments. Simple, clean infographic style."},{"speaker":"Student","text":"それって便利そうですけど、なんだか心配です。","imagePrompt":"Student's concerned expression, behind him a blurry image of a street with emergency sirens glowing in red."},{"speaker":"Teacher","text":"そうだね。もちろん、緊急時には素早い対応が必要だけど…","imagePrompt":"Illustration of a balance scale: one side is 'freedom', the other 'security'. The scale is slightly tilting."},{"speaker":"Student","text":"韓国みたいに、軍隊が政治に口を出してくることもあり得るんですか?","imagePrompt":"Student imagining a military tank next to the Japanese parliament, shown as a thought bubble."},{"speaker":"Teacher","text":"完全にあり得ないとは言えないからこそ、注意が必要なんだ。","imagePrompt":"Japanese citizens reading newspapers and watching news with concerned faces, civic awareness growing."},{"speaker":"Student","text":"ありがとうございます。とても良い勉強になりました。","imagePrompt":"The student bows slightly to the teacher with a grateful expression. The classroom is peaceful again."},{"speaker":"Announcer","text":"ご視聴、ありがとうございました。次回の放送もお楽しみに。","imagePrompt":"Ending screen with soft background music, showing the show's logo and a thank-you message in Japanese."}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>Ghibli style. Student (Taro) is a young teenager with a dark short hair with glasses. Teacher is a middle-aged man with grey hair and moustache.</style>"},"speechParams":{"speakers":{"Announcer":{"provider":"nijivoice","displayName":{"ja":"アナウンサー"},"voiceId":"3708ad43-cace-486c-a4ca-8fe41186e20c"},"Student":{"provider":"nijivoice","displayName":{"ja":"太郎"},"voiceId":"a7619e48-bf6a-4f9f-843f-40485651257f"},"Teacher":{"provider":"nijivoice","displayName":{"ja":"先生"},"voiceId":"bc06c63f-fef6-43b6-92f7-67f919bd5dae"}}}}\n` +
80
+ "```",
81
+ shorts: "Generate a script for a Youtube shorts of the given topic. The first beat should be a hook, which describes the topic. Another AI will generate images for each beat based on the image prompt of that beat. Movie prompts must be written in English.\n" +
82
+ "```JSON\n" +
83
+ `{"$mulmocast":{"version":"1.1"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"movieParams":{"provider":"google"},"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"}],"canvasSize":{"width":720,"height":1280},"imageParams":{"style":"<style>Photo realistic, cinematic.</style>"}}\n` +
84
+ "```",
85
+ text_and_image: "Generate a script for a presentation of the given topic. Another AI will generate comic strips for each beat based on the imagePrompt of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
86
+ "```JSON\n" +
87
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}]}\n` +
88
+ "```",
89
+ text_only: "Generate a script for a presentation of the given topic. Another AI will generate comic strips for each beat based on the text description of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
90
+ "```JSON\n" +
91
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]"}]}\n` +
92
+ "```",
93
+ trailer: "Generate a script for a movie trailer of the given story. Another AI will generate images for each beat based on the image prompt of that beat. Movie prompts must be written in English.\n" +
94
+ "```JSON\n" +
95
+ '{"$mulmocast":{"version":"1.1"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"movieParams":{"provider":"google"},"beats":[{"duration":5,"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"duration":5,"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"duration":5,"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"duration":5,"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"duration":5,"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"},{"duration":5,"imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]","moviePrompt":"[MOVIE_PROMPT: A movie prompt for that image.]"}],"canvasSize":{"width":1280,"height":720},"imageParams":{"style":"<style>Photo realistic, cinematic.</style>"},"audioParams":{"padding":0,"introPadding":0,"closingPadding":0,"outroPadding":2.5,"bgm":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/bgms/trailer_dramatic.mp3"}}}\n' +
96
+ "```",
97
+ };
@@ -1,12 +1,11 @@
1
1
  import "dotenv/config";
2
- import { MulmoCanvasDimension, MulmoBeat, Text2SpeechProvider, Text2ImageAgentInfo, Text2HtmlAgentInfo, BeatMediaType, MulmoPresentationStyle, SpeakerData, Text2ImageProvider } from "../types/index.js";
2
+ import { MulmoCanvasDimension, MulmoBeat, Text2SpeechProvider, Text2ImageAgentInfo, Text2HtmlAgentInfo, BeatMediaType, MulmoPresentationStyle, SpeakerData, Text2ImageProvider, MulmoStudioContext } from "../types/index.js";
3
3
  export declare const MulmoPresentationStyleMethods: {
4
4
  getCanvasSize(presentationStyle: MulmoPresentationStyle): MulmoCanvasDimension;
5
5
  getAllSpeechProviders(presentationStyle: MulmoPresentationStyle): Set<Text2SpeechProvider>;
6
6
  getTextSlideStyle(presentationStyle: MulmoPresentationStyle, beat: MulmoBeat): string;
7
7
  getDefaultSpeaker(presentationStyle: MulmoPresentationStyle): string;
8
- getSpeaker(presentationStyle: MulmoPresentationStyle, beat: MulmoBeat): SpeakerData;
9
- getTTSModel(presentationStyle: MulmoPresentationStyle, beat: MulmoBeat): string | undefined;
8
+ getSpeaker(context: MulmoStudioContext, beat: MulmoBeat): SpeakerData;
10
9
  getText2ImageProvider(provider: Text2ImageProvider | undefined): Text2ImageProvider;
11
10
  getImageAgentInfo(presentationStyle: MulmoPresentationStyle, beat?: MulmoBeat): Text2ImageAgentInfo;
12
11
  getMovieAgentInfo(presentationStyle: MulmoPresentationStyle, beat?: MulmoBeat): {
@@ -46,18 +46,24 @@ export const MulmoPresentationStyleMethods = {
46
46
  }
47
47
  return keys[0];
48
48
  },
49
- getSpeaker(presentationStyle, beat) {
50
- userAssert(!!presentationStyle?.speechParams?.speakers, "presentationStyle.speechParams.speakers is not set!!");
51
- const speakerId = beat?.speaker ?? MulmoPresentationStyleMethods.getDefaultSpeaker(presentationStyle);
52
- userAssert(!!speakerId, "beat.speaker and default speaker is not set");
53
- const speaker = presentationStyle.speechParams.speakers[speakerId];
49
+ getSpeaker(context, beat) {
50
+ userAssert(!!context.presentationStyle?.speechParams?.speakers, "presentationStyle.speechParams.speakers is not set!!");
51
+ const speakerId = beat?.speaker ?? MulmoPresentationStyleMethods.getDefaultSpeaker(context.presentationStyle);
52
+ const speaker = context.presentationStyle.speechParams.speakers[speakerId];
54
53
  userAssert(!!speaker, `speaker is not set: speaker "${speakerId}"`);
54
+ // Check if the speaker has a language-specific version
55
+ const lang = context.lang ?? context.studio.script.lang;
56
+ if (speaker.lang && lang && speaker.lang[lang]) {
57
+ return speaker.lang[lang];
58
+ }
55
59
  return speaker;
56
60
  },
57
- getTTSModel(presentationStyle, beat) {
58
- const speaker = MulmoPresentationStyleMethods.getSpeaker(presentationStyle, beat);
59
- return speaker.model;
61
+ /* NOTE: This method is not used.
62
+ getTTSModel(context: MulmoStudioContext, beat: MulmoBeat): string | undefined {
63
+ const speaker = MulmoPresentationStyleMethods.getSpeaker(context, beat);
64
+ return speaker.model;
60
65
  },
66
+ */
61
67
  getText2ImageProvider(provider) {
62
68
  return text2ImageProviderSchema.parse(provider);
63
69
  },
@@ -1,11 +1,13 @@
1
1
  export type OpenAIImageSize = "1792x1024" | "1024x1792" | "1024x1024" | "1536x1024" | "1024x1536";
2
2
  export type OpenAIImageModeration = "low" | "auto";
3
+ export type OpenAIImageQuality = "low" | "medium" | "high" | "auto";
3
4
  export type OpenAIImageOptions = {
4
5
  model: string;
5
6
  prompt: string;
6
7
  n: number;
7
8
  size: OpenAIImageSize;
8
9
  moderation?: OpenAIImageModeration;
10
+ quality?: OpenAIImageQuality;
9
11
  };
10
12
  export type AgentBufferResult = {
11
13
  buffer: Buffer;
@@ -35,6 +37,7 @@ export type ImageAgentParams = {
35
37
  };
36
38
  export type OpenAIImageAgentParams = ImageAgentParams & {
37
39
  moderation: OpenAIImageModeration | null | undefined;
40
+ quality?: OpenAIImageQuality;
38
41
  };
39
42
  export type OpenAIImageAgentConfig = {
40
43
  baseURL?: string;