mulmocast 1.2.39 → 1.2.40
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.
|
@@ -41,7 +41,7 @@ export const MulmoPresentationStyleMethods = {
|
|
|
41
41
|
return [...defaultTextSlideStyles, ...[styles], ...[extraStyles]].flat().join("\n");
|
|
42
42
|
},
|
|
43
43
|
getDefaultSpeaker(presentationStyle) {
|
|
44
|
-
const speakers = presentationStyle
|
|
44
|
+
const speakers = presentationStyle?.speechParams?.speakers ?? {};
|
|
45
45
|
const keys = Object.keys(speakers).sort();
|
|
46
46
|
userAssert(keys.length !== 0, "presentationStyle.speechParams.speakers is not set!!");
|
|
47
47
|
const defaultSpeaker = keys.find((key) => speakers[key].isDefault);
|
|
@@ -57,7 +57,7 @@ export const MulmoPresentationStyleMethods = {
|
|
|
57
57
|
userAssert(!!speaker, `speaker is not set: speaker "${speakerId}"`);
|
|
58
58
|
// Check if the speaker has a language-specific version.
|
|
59
59
|
// Normally, lang is determined by the context, but lang may be specified when using the API.
|
|
60
|
-
const lang = targetLang ?? context.lang ?? context
|
|
60
|
+
const lang = targetLang ?? context.lang ?? context?.studio?.script?.lang;
|
|
61
61
|
if (speaker.lang && lang && speaker.lang[lang]) {
|
|
62
62
|
return speaker.lang[lang];
|
|
63
63
|
}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* (No Node.js built-ins like fs, path, dotenv, etc.)
|
|
4
4
|
* Works in both Node.js and modern browsers.
|
|
5
5
|
*/
|
|
6
|
-
import { BeatSessionType, MulmoStudioContext, SessionProgressCallback, SessionType, MulmoBeat } from "../types/index.js";
|
|
6
|
+
import { BeatSessionType, MulmoStudioContext, SessionProgressCallback, SessionType, MulmoBeat, SpeechOptions } from "../types/index.js";
|
|
7
|
+
import { provider2TTSAgent } from "../utils/provider2agent.js";
|
|
7
8
|
export declare const addSessionProgressCallback: (cb: SessionProgressCallback) => void;
|
|
8
9
|
export declare const removeSessionProgressCallback: (cb: SessionProgressCallback) => void;
|
|
9
10
|
export declare const MulmoStudioContextMethods: {
|
|
@@ -18,12 +19,9 @@ export declare const MulmoStudioContextMethods: {
|
|
|
18
19
|
needTranslate(context: MulmoStudioContext, includeCaption?: boolean): boolean | "" | undefined;
|
|
19
20
|
getIntroPadding(context: MulmoStudioContext): number;
|
|
20
21
|
getAudioParam(context: MulmoStudioContext, beat: MulmoBeat, lang?: string): {
|
|
22
|
+
provider: keyof typeof provider2TTSAgent;
|
|
21
23
|
voiceId: string;
|
|
22
|
-
|
|
23
|
-
speechOptions:
|
|
24
|
-
speed?: number | undefined;
|
|
25
|
-
instruction?: string | undefined;
|
|
26
|
-
};
|
|
27
|
-
model: string | undefined;
|
|
24
|
+
model?: string;
|
|
25
|
+
speechOptions: SpeechOptions;
|
|
28
26
|
};
|
|
29
27
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (No Node.js built-ins like fs, path, dotenv, etc.)
|
|
4
4
|
* Works in both Node.js and modern browsers.
|
|
5
5
|
*/
|
|
6
|
-
import { text2SpeechProviderSchema } from "../types/index.js";
|
|
6
|
+
import { text2SpeechProviderSchema, } from "../types/index.js";
|
|
7
7
|
import { beatId } from "../utils/utils.js";
|
|
8
8
|
import { GraphAILogger } from "graphai";
|
|
9
9
|
import { MulmoPresentationStyleMethods } from "./mulmo_presentation_style.js";
|
package/lib/types/schema.d.ts
CHANGED
|
@@ -2696,6 +2696,7 @@ export declare const mulmoMovieParamsSchema: z.ZodObject<{
|
|
|
2696
2696
|
duration?: number | undefined;
|
|
2697
2697
|
} | undefined;
|
|
2698
2698
|
}>;
|
|
2699
|
+
export declare const defaultSpeaker = "Presenter";
|
|
2699
2700
|
export declare const mulmoPresentationStyleSchema: z.ZodObject<{
|
|
2700
2701
|
$mulmocast: z.ZodObject<{
|
|
2701
2702
|
version: z.ZodLiteral<"1.1">;
|
package/lib/types/schema.js
CHANGED
|
@@ -324,7 +324,7 @@ export const mulmoMovieParamsSchema = z
|
|
|
324
324
|
fillOption: mulmoFillOptionSchema.optional(), // for movie.ts
|
|
325
325
|
})
|
|
326
326
|
.strict();
|
|
327
|
-
const defaultSpeaker = "Presenter";
|
|
327
|
+
export const defaultSpeaker = "Presenter";
|
|
328
328
|
export const mulmoPresentationStyleSchema = z.object({
|
|
329
329
|
$mulmocast: mulmoCastCreditSchema,
|
|
330
330
|
canvasSize: mulmoCanvasDimensionSchema, // has default value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.40",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.node.js",
|
|
@@ -115,6 +115,6 @@
|
|
|
115
115
|
"typescript-eslint": "^8.44.1"
|
|
116
116
|
},
|
|
117
117
|
"engines": {
|
|
118
|
-
"node": ">=
|
|
118
|
+
"node": ">=20.0.0"
|
|
119
119
|
}
|
|
120
120
|
}
|