🎥 Make videos programmatically with React
semantic version check & docs update
Patric Salvisberg731b9f779caf
diff --git a/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdx b/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdxindex cf21736f41..e98ab75aa1 100644--- a/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdx+++ b/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdx@@ -17,7 +17,7 @@ import { installWhisperCpp } from "@remotion/install-whisper-cpp";const { alreadyExisted } = await installWhisperCpp({to: path.join(process.cwd(), "whisper.cpp"),- version: "48a145",+ version: "48a145", //Whisper.cpp commit hash});```@@ -39,6 +39,10 @@ The folder to install Whisper.cpp into.### `version`The version of Whisper.cpp to install. Don't include the `v` prefix.+This can be either a hash of a Whisper.cpp commit or a semantic version of an official release.+:::info+On Windows, currently only official releases of Whisper.cpp are supported (E.g., 1.5.4).+:::### `printOutput?`diff --git a/packages/install-whisper-cpp/src/install-whisper-cpp.ts b/packages/install-whisper-cpp/src/install-whisper-cpp.tsindex cef240ef79..8ff8119ac2 100644--- a/packages/install-whisper-cpp/src/install-whisper-cpp.ts+++ b/packages/install-whisper-cpp/src/install-whisper-cpp.ts@@ -16,6 +16,13 @@ const installForWindows = async ({to: string;printOutput: boolean;}) => {+ const isSemVer = /^[\d]{1}\.[\d]{1,2}\.+/;++ if (!isSemVer) {+ throw new Error(`Non-semantic version provided. Only releases of Whisper.cpp are supportet (E.g., 1.5.4). Provided version:+ ${version}. See https://www.remotion.dev/docs/install-whisper-cpp/install-whisper-cpp#version for more information.`);+ }+const url = `https://github.com/ggerganov/whisper.cpp/releases/download/v${version}/whisper-bin-x64.zip`;const filePath = path.join(process.cwd(), 'whisper-bin-x64.zip');