From e0b3733b5be838a1215af5b612f024dbea315d4c Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Mon, 11 Nov 2024 11:36:59 +0100 Subject: [PATCH] `@remotion/install-whisper-cpp`: Fix DTW timestamp of large-v3-turbo --- packages/docs/docs/install-whisper-cpp/transcribe.mdx | 2 ++ packages/install-whisper-cpp/src/transcribe.ts | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/docs/docs/install-whisper-cpp/transcribe.mdx b/packages/docs/docs/install-whisper-cpp/transcribe.mdx index 0f34027c0c..e5300b3109 100644 --- a/packages/docs/docs/install-whisper-cpp/transcribe.mdx +++ b/packages/docs/docs/install-whisper-cpp/transcribe.mdx @@ -71,6 +71,8 @@ Possible values: `tiny`, `tiny.en`, `base`, `base.en`, `small`, `small.en`, `med Make sure the model you want to use exists in your `whisper.cpp/models` folder. You can ensure a specific model is available locally by utilizing the [downloadWhisperModel()](/docs/install-whisper-cpp/download-whisper-model) API. +Note: `large-v3-turbo` is only working properly from Whisper.cpp versions built from November 2024 or later and Remotion v4.0.229 or greater. + ### `modelFolder?` _default: whisperPath/models_ diff --git a/packages/install-whisper-cpp/src/transcribe.ts b/packages/install-whisper-cpp/src/transcribe.ts index cbe9d5b5a7..a4a23d8ddf 100644 --- a/packages/install-whisper-cpp/src/transcribe.ts +++ b/packages/install-whisper-cpp/src/transcribe.ts @@ -94,7 +94,11 @@ export type TranscribeOnProgress = (progress: number) => void; // https://github.com/ggerganov/whisper.cpp/blob/fe36c909715e6751277ddb020e7892c7670b61d4/examples/main/main.cpp#L989-L999 // https://github.com/remotion-dev/remotion/issues/4168 export const modelToDtw = (model: WhisperModel): string => { - if (model === 'large-v3' || model === 'large-v3-turbo') { + if (model === 'large-v3-turbo') { + return 'large.v3.turbo'; + } + + if (model === 'large-v3') { return 'large.v3'; }