mulmocast 0.0.13 → 0.0.14

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.
@@ -1,4 +1,5 @@
1
1
  import "dotenv/config";
2
2
  import type { CallbackFunction } from "graphai";
3
3
  import { MulmoStudioContext } from "../types/index.js";
4
+ export declare const audioFilePath: (context: MulmoStudioContext) => string;
4
5
  export declare const audio: (context: MulmoStudioContext, callbacks?: CallbackFunction[]) => Promise<void>;
@@ -166,12 +166,17 @@ const agentFilters = [
166
166
  nodeIds: ["tts"],
167
167
  },
168
168
  ];
169
+ export const audioFilePath = (context) => {
170
+ const { studio, fileDirs } = context;
171
+ const { outDirPath } = fileDirs;
172
+ return getAudioArtifactFilePath(outDirPath, studio.filename);
173
+ };
169
174
  export const audio = async (context, callbacks) => {
170
175
  try {
171
176
  MulmoStudioContextMethods.setSessionState(context, "audio", true);
172
177
  const { studio, fileDirs, lang } = context;
173
178
  const { outDirPath, audioDirPath } = fileDirs;
174
- const audioArtifactFilePath = getAudioArtifactFilePath(outDirPath, studio.filename);
179
+ const audioArtifactFilePath = audioFilePath(context);
175
180
  const audioSegmentDirPath = getAudioSegmentDirPath(audioDirPath, studio.filename);
176
181
  const audioCombinedFilePath = getAudioCombinedFilePath(audioDirPath, studio.filename, lang);
177
182
  const outputStudioFilePath = getOutputStudioFilePath(outDirPath, studio.filename);
@@ -7,4 +7,5 @@ export declare const getAudioPart: (inputIndex: number, duration: number, delay:
7
7
  audioId: string;
8
8
  audioPart: string;
9
9
  };
10
+ export declare const movieFilePath: (context: MulmoStudioContext) => string;
10
11
  export declare const movie: (context: MulmoStudioContext) => Promise<void>;
@@ -163,13 +163,17 @@ const createVideo = async (audioArtifactFilePath, outputVideoPath, studio, capti
163
163
  GraphAILogger.info((studio.script.references ?? []).map((reference) => `${reference.title} (${reference.url})`).join("\n"));
164
164
  return true;
165
165
  };
166
+ export const movieFilePath = (context) => {
167
+ const { studio, fileDirs, caption } = context;
168
+ return getOutputVideoFilePath(fileDirs.outDirPath, studio.filename, context.lang, caption);
169
+ };
166
170
  export const movie = async (context) => {
167
171
  MulmoStudioContextMethods.setSessionState(context, "video", true);
168
172
  try {
169
173
  const { studio, fileDirs, caption } = context;
170
174
  const { outDirPath } = fileDirs;
171
175
  const audioArtifactFilePath = getAudioArtifactFilePath(outDirPath, studio.filename);
172
- const outputVideoPath = getOutputVideoFilePath(outDirPath, studio.filename, context.lang, caption);
176
+ const outputVideoPath = movieFilePath(context);
173
177
  if (await createVideo(audioArtifactFilePath, outputVideoPath, studio, caption)) {
174
178
  writingMessage(outputVideoPath);
175
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmocast",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",