mulmocast 2.1.16 β†’ 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.
@@ -2,9 +2,16 @@ import { GraphAILogger } from "graphai";
2
2
  import * as textToSpeech from "@google-cloud/text-to-speech";
3
3
  import { agentGenerationError, audioAction, audioFileTarget } from "../utils/error_cause.js";
4
4
  const client = new textToSpeech.TextToSpeechClient();
5
+ const getPrompt = (text, instructions) => {
6
+ if (instructions) {
7
+ return `### DIRECTOR'S NOTES\n${instructions}\n\n#### TRANSCRIPT\n${text}`;
8
+ }
9
+ return text;
10
+ };
5
11
  export const ttsGoogleAgent = async ({ namedInputs, params }) => {
6
12
  const { text } = namedInputs;
7
- const { voice, suppressError, speed } = params;
13
+ const { voice, suppressError, speed, model, instructions } = params;
14
+ const useGeminiPrompt = Boolean(model && instructions);
8
15
  // Construct the voice request
9
16
  const voiceParams = {
10
17
  languageCode: "en-US", // TODO: Make this configurable
@@ -13,9 +20,15 @@ export const ttsGoogleAgent = async ({ namedInputs, params }) => {
13
20
  if (voice) {
14
21
  voiceParams.name = voice;
15
22
  }
23
+ if (model) {
24
+ voiceParams.modelName = model;
25
+ }
16
26
  // Construct the request
17
27
  const request = {
18
- input: { text },
28
+ input: {
29
+ text,
30
+ ...(useGeminiPrompt ? { prompt: getPrompt(text, instructions) } : {}),
31
+ },
19
32
  voice: voiceParams,
20
33
  audioConfig: {
21
34
  audioEncoding: "MP3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmocast",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.node.js",
@@ -74,7 +74,7 @@
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.34.0",
77
+ "@google/genai": "^1.37.0",
78
78
  "@graphai/anthropic_agent": "^2.0.12",
79
79
  "@graphai/browserless_agent": "^2.0.1",
80
80
  "@graphai/gemini_agent": "^2.0.2",
@@ -84,8 +84,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.3",
88
- "@inquirer/select": "^5.0.3",
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",
@@ -98,7 +98,7 @@
98
98
  "marked": "^17.0.1",
99
99
  "mulmocast-vision": "^1.0.8",
100
100
  "ora": "^9.0.0",
101
- "puppeteer": "^24.34.0",
101
+ "puppeteer": "^24.35.0",
102
102
  "replicate": "^1.4.0",
103
103
  "yaml": "^2.8.2",
104
104
  "yargs": "^18.0.0",
@@ -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.4",
115
+ "eslint-plugin-prettier": "^5.5.5",
116
116
  "eslint-plugin-sonarjs": "^3.0.5",
117
- "prettier": "^3.7.4",
117
+ "prettier": "^3.8.0",
118
118
  "tsx": "^4.21.0",
119
119
  "typescript": "^5.9.3",
120
- "typescript-eslint": "^8.52.0"
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
+ }
@@ -0,0 +1,278 @@
1
+ {
2
+ "$mulmocast": {
3
+ "version": "1.1"
4
+ },
5
+ "lang": "en",
6
+ "title": "Media Test",
7
+ "references": [
8
+ {
9
+ "url": "https://www.mulmocast.com",
10
+ "title": "Mulmocast",
11
+ "type": "article"
12
+ }
13
+ ],
14
+ "speechParams": {
15
+ "speakers": {
16
+ "Presenter": {
17
+ "voiceId": "shimmer",
18
+ "displayName": {
19
+ "en": "Presenter"
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "beats": [
25
+ {
26
+ "id": "first",
27
+ "speaker": "Presenter",
28
+ "text": "This is a local image.",
29
+ "image": {
30
+ "type": "image",
31
+ "source": {
32
+ "kind": "path",
33
+ "path": "../../assets/images/mulmocast_credit.png"
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "id": "hidden",
39
+ "hidden": true,
40
+ "speaker": "Presenter",
41
+ "text": "This is a hidden beat.",
42
+ "image": {
43
+ "type": "textSlide",
44
+ "slide": {
45
+ "title": "Hidden Beat",
46
+ "bullets": ["This is a hidden beat."]
47
+ }
48
+ }
49
+ },
50
+ {
51
+ "speaker": "Presenter",
52
+ "text": "This is a image reference beat.",
53
+ "duration": 0.5,
54
+ "image": {
55
+ "type": "beat",
56
+ "id": "first"
57
+ }
58
+ },
59
+ {
60
+ "speaker": "Presenter",
61
+ "text": "",
62
+ "duration": 0.5,
63
+ "id": "1A57B3F5-B6CB-4948-96BB-6F018DCCBBD4",
64
+ "image": {
65
+ "type": "textSlide",
66
+ "slide": {
67
+ "title": "No Audio",
68
+ "bullets": ["0.5 seconds"]
69
+ }
70
+ }
71
+ },
72
+ {
73
+ "speaker": "Presenter",
74
+ "text": "This is a remote image.",
75
+ "image": {
76
+ "type": "image",
77
+ "source": {
78
+ "kind": "url",
79
+ "url": "https://raw.githubusercontent.com/receptron/mulmocast-cli/refs/heads/main/assets/images/mulmocast_credit.png"
80
+ }
81
+ }
82
+ },
83
+ {
84
+ "id": "textSlide",
85
+ "speaker": "Presenter",
86
+ "text": "",
87
+ "duration": 2,
88
+ "image": {
89
+ "type": "textSlide",
90
+ "slide": {
91
+ "title": "No Audio",
92
+ "bullets": ["2 seconds"]
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "speaker": "Presenter",
98
+ "id": "pingpongmov",
99
+ "text": "This is a local movie with audio.",
100
+ "image": {
101
+ "type": "movie",
102
+ "source": {
103
+ "kind": "url",
104
+ "url": "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/test/pingpong.mov"
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "speaker": "Presenter",
110
+ "text": "",
111
+ "image": {
112
+ "type": "textSlide",
113
+ "slide": {
114
+ "title": "Local Audio Test",
115
+ "bullets": ["Something"]
116
+ }
117
+ },
118
+ "audio": {
119
+ "type": "audio",
120
+ "source": {
121
+ "kind": "path",
122
+ "path": "../../assets/audio/local_voice.mp3"
123
+ }
124
+ }
125
+ },
126
+ {
127
+ "speaker": "Presenter",
128
+ "text": "This is a bulleted list in text slide format.",
129
+ "image": {
130
+ "type": "textSlide",
131
+ "slide": {
132
+ "title": "Human Evolution",
133
+ "bullets": [
134
+ "Early Primates",
135
+ "Hominids and Hominins",
136
+ "Australopithecus",
137
+ "Genus Homo Emerges",
138
+ "Homo erectus and Migration",
139
+ "Neanderthals and Other Archaic Humans",
140
+ "Homo sapiens"
141
+ ]
142
+ }
143
+ }
144
+ },
145
+ {
146
+ "speaker": "Presenter",
147
+ "text": "This is a table in markdown format.",
148
+ "image": {
149
+ "type": "markdown",
150
+ "markdown": [
151
+ "# Markdown Table Example",
152
+ "### Table",
153
+ "| Item | In Stock | Price |",
154
+ "| :---------------- | :------: | ----: |",
155
+ "| Python Hat | True | 23.99 |",
156
+ "| SQL Hat | True | 23.99 |",
157
+ "| Codecademy Tee | False | 19.99 |",
158
+ "| Codecademy Hoodie | False | 42.99 |",
159
+ "### Paragraph",
160
+ "This is a paragraph."
161
+ ]
162
+ }
163
+ },
164
+ {
165
+ "speaker": "Presenter",
166
+ "text": "This is a chart in chart format.",
167
+ "image": {
168
+ "type": "chart",
169
+ "title": "Sales and Profits (from Jan to June)",
170
+ "chartData": {
171
+ "type": "bar",
172
+ "data": {
173
+ "labels": ["January", "February", "March", "April", "May", "June"],
174
+ "datasets": [
175
+ {
176
+ "label": "Revenue ($1000s)",
177
+ "data": [120, 135, 180, 155, 170, 190],
178
+ "backgroundColor": "rgba(54, 162, 235, 0.5)",
179
+ "borderColor": "rgba(54, 162, 235, 1)",
180
+ "borderWidth": 1
181
+ },
182
+ {
183
+ "label": "Profit ($1000s)",
184
+ "data": [45, 52, 68, 53, 61, 73],
185
+ "backgroundColor": "rgba(75, 192, 192, 0.5)",
186
+ "borderColor": "rgba(75, 192, 192, 1)",
187
+ "borderWidth": 1
188
+ }
189
+ ]
190
+ },
191
+ "options": {
192
+ "responsive": true,
193
+ "animation": false
194
+ }
195
+ }
196
+ }
197
+ },
198
+ {
199
+ "speaker": "Presenter",
200
+ "text": "This is a diagram in mermaid format.",
201
+ "image": {
202
+ "type": "mermaid",
203
+ "title": "Business Process Flow",
204
+ "code": {
205
+ "kind": "text",
206
+ "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"
207
+ }
208
+ }
209
+ },
210
+ {
211
+ "speaker": "Presenter",
212
+ "text": "This is a tailwind html format.",
213
+ "image": {
214
+ "type": "html_tailwind",
215
+ "html": [
216
+ "<main class=\"flex-grow\">",
217
+ " <!-- Hero Section -->",
218
+ " <section class=\"bg-blue-600 text-white py-20\">",
219
+ " <div class=\"container mx-auto px-6 text-center\">",
220
+ " <h1 class=\"text-4xl md:text-5xl font-bold mb-4\">Welcome to Mulmocast</h1>",
221
+ " <p class=\"text-lg md:text-xl mb-8\">A modern web experience powered by Tailwind CSS</p>",
222
+ " <a href=\"#features\" class=\"bg-white text-blue-600 px-6 py-3 rounded-lg font-semibold shadow hover:bg-gray-100 transition\">",
223
+ " Learn More",
224
+ " </a>",
225
+ " </div>",
226
+ " </section>",
227
+ "",
228
+ " <!-- Features Section -->",
229
+ " <section id=\"features\" class=\"py-16 bg-gray-100\">",
230
+ " <div class=\"container mx-auto px-6\">",
231
+ " <div class=\"grid grid-cols-1 md:grid-cols-3 gap-8 text-center\">",
232
+ " <div>",
233
+ " <div class=\"text-blue-600 text-4xl mb-2\">⚑</div>",
234
+ " <h3 class=\"text-xl font-semibold mb-2\">Fast</h3>",
235
+ " <p class=\"text-gray-600\">Built with performance in mind using modern tools.</p>",
236
+ " </div>",
237
+ " <div>",
238
+ " <div class=\"text-blue-600 text-4xl mb-2\">🎨</div>",
239
+ " <h3 class=\"text-xl font-semibold mb-2\">Beautiful</h3>",
240
+ " <p class=\"text-gray-600\">Styled with Tailwind CSS for clean, responsive design.</p>",
241
+ " </div>",
242
+ " <div>",
243
+ " <div class=\"text-blue-600 text-4xl mb-2\">πŸš€</div>",
244
+ " <h3 class=\"text-xl font-semibold mb-2\">Launch Ready</h3>",
245
+ " <p class=\"text-gray-600\">Easy to deploy and extend for your next big idea.</p>",
246
+ " </div>",
247
+ " </div>",
248
+ " </div>",
249
+ " </section>",
250
+ "</main>",
251
+ "",
252
+ "<!-- Footer -->",
253
+ "<footer class=\"bg-white text-gray-500 text-center py-6 border-t\">",
254
+ " 2025 Mulmocast.",
255
+ "</footer>"
256
+ ]
257
+ }
258
+ },
259
+ {
260
+ "speaker": "Presenter",
261
+ "text": "This is a text slide reference beat.",
262
+ "duration": 0.5,
263
+ "image": {
264
+ "type": "beat",
265
+ "id": "textSlide"
266
+ }
267
+ },
268
+ {
269
+ "speaker": "Presenter",
270
+ "text": "This is a movie reference beat.",
271
+ "duration": 0.5,
272
+ "image": {
273
+ "type": "beat",
274
+ "id": "pingpongmov"
275
+ }
276
+ }
277
+ ]
278
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$mulmocast": {
3
+ "version": "1.1"
4
+ },
5
+ "lang": "ja",
6
+ "title": "All TTS Providers Test",
7
+ "speechParams": {
8
+ "speakers": {
9
+ "Google": {
10
+ "provider": "google",
11
+ "voiceId": "ja-JP-Standard-A"
12
+ },
13
+ "GCPGemini": {
14
+ "provider": "google",
15
+ "model": "gemini-2.5-pro-tts",
16
+ "voiceId": "Kore"
17
+ }
18
+ }
19
+ },
20
+ "beats": [
21
+ {
22
+ "speaker": "Google",
23
+ "text": "γ“γ‚“γ«γ‘γ―γ€γƒ†γ‚Ήγƒˆγ§γ™γ€‚γ‚°γƒΌγ‚°γƒΌ",
24
+ "image": {
25
+ "type": "textSlide",
26
+ "slide": {
27
+ "title": "Google TTS"
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "speaker": "GCPGemini",
33
+ "text": "Hello. This is tts test. I'm GCP Gemini",
34
+ "image": {
35
+ "type": "textSlide",
36
+ "slide": {
37
+ "title": "GCP Gemini"
38
+ }
39
+ }
40
+ },
41
+ {
42
+ "speaker": "GCPGemini",
43
+ "text": "Hello. This is tts test. I'm GCP Gemini",
44
+ "speechOptions": {
45
+ "instruction": "Slowly."
46
+ },
47
+ "image": {
48
+ "type": "textSlide",
49
+ "slide": {
50
+ "title": "GCP Gemini with Instructions (Slowly)"
51
+ }
52
+ }
53
+ }
54
+ ]
55
+ }