🎥 Make videos programmatically with React
add docs
Jonny Burger9d75bbb72f36
diff --git a/packages/docs/docs/install-whisper-cpp/transcribe.mdx b/packages/docs/docs/install-whisper-cpp/transcribe.mdxindex bcc34dd83b..1ae2d89ce8 100644--- a/packages/docs/docs/install-whisper-cpp/transcribe.mdx+++ b/packages/docs/docs/install-whisper-cpp/transcribe.mdx@@ -119,6 +119,19 @@ Possible values: `Afrikaans`, `Albanian`, `Amharic`, `Arabic`, `Armenian`, `AssaA signal from an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to cancel the transcription process.+### `onProgress?`<AvailableFrom v="4.0.156" />++Listen for progress updates from the transcription process.+The progress is a number between `0` and `1`.++```tsx twoslash+import type { TranscribeOnProgress } from "@remotion/install-whisper-cpp";++const onProgress: TranscribeOnProgress = (progress) => {+ console.log(`Transcription progress: ${progress * 100}%`);+};+```+## Return value### `TranscriptionJson`diff --git a/packages/install-whisper-cpp/src/index.ts b/packages/install-whisper-cpp/src/index.tsindex 676c8a3c20..42b992d74f 100644--- a/packages/install-whisper-cpp/src/index.ts+++ b/packages/install-whisper-cpp/src/index.ts@@ -3,4 +3,8 @@ export type {OnProgress} from './download';export {WhisperModel, downloadWhisperModel} from './download-whisper-model';export {installWhisperCpp} from './install-whisper-cpp';export type {Language} from './languages';-export {TranscriptionJson, transcribe} from './transcribe';+export {+ TranscribeOnProgress,+ TranscriptionJson,+ transcribe,+} from './transcribe';diff --git a/packages/install-whisper-cpp/src/transcribe.ts b/packages/install-whisper-cpp/src/transcribe.tsindex 2401579356..328042fe43 100644--- a/packages/install-whisper-cpp/src/transcribe.ts+++ b/packages/install-whisper-cpp/src/transcribe.ts@@ -89,7 +89,7 @@ const readJson = async (jsonPath: string) => {return JSON.parse(data);};-type TranscribeOnProgress = (progress: number) => void;+export type TranscribeOnProgress = (progress: number) => void;const transcribeToTemporaryFile = async ({fileToTranscribe,