🎥 Make videos programmatically with React
`@remotion/install-whisper-cpp`: Various Whisper.cpp fixes
Jonny Burger7a09ccf87c74
diff --git a/packages/install-whisper-cpp/src/download-whisper-model.ts b/packages/install-whisper-cpp/src/download-whisper-model.tsindex 7243d78538..b41461ef02 100644--- a/packages/install-whisper-cpp/src/download-whisper-model.ts+++ b/packages/install-whisper-cpp/src/download-whisper-model.ts@@ -30,13 +30,13 @@ const modelSizes: {[key in WhisperModel]: number} = {'small.en': 487614201,'tiny.en': 77704715,base: 147951465,- medium: 1533774781,+ medium: 1533763059,};export type WhisperModel = (typeof models)[number];export const getModelPath = (folder: string, model: WhisperModel) => {- return path.join(folder, `ggml-${model}.bin`);+ return path.join(path.resolve(process.cwd(), folder), `ggml-${model}.bin`);};export const downloadWhisperModel = async ({diff --git a/packages/install-whisper-cpp/src/install-whisper-cpp.ts b/packages/install-whisper-cpp/src/install-whisper-cpp.tsindex d5656219c6..a4f46698a9 100644--- a/packages/install-whisper-cpp/src/install-whisper-cpp.ts+++ b/packages/install-whisper-cpp/src/install-whisper-cpp.ts@@ -136,8 +136,8 @@ const installWhisperForUnix = async ({export const getWhisperExecutablePath = (whisperPath: string) => {return os.platform() === 'win32'- ? path.join(whisperPath, 'main.exe')- : path.join(whisperPath, './main');+ ? path.join(path.resolve(process.cwd(), whisperPath), 'main.exe')+ : path.join(path.resolve(process.cwd(), whisperPath), './main');};export const installWhisperCpp = async ({diff --git a/packages/install-whisper-cpp/src/transcribe.ts b/packages/install-whisper-cpp/src/transcribe.tsindex a4a23d8ddf..6fe1e473c1 100644--- a/packages/install-whisper-cpp/src/transcribe.ts+++ b/packages/install-whisper-cpp/src/transcribe.ts@@ -176,7 +176,7 @@ const transcribeToTemporaryFile = async ({const outputPath = await new Promise<string>((resolve, reject) => {const task = spawn(executable, args, {- cwd: whisperPath,+ cwd: path.resolve(process.cwd(), whisperPath),signal: signal ?? undefined,});const predictedPath = `${tmpJSONPath}.json`;