🎥 Make videos programmatically with React
new printoutput flag
Jonny Burger7a62c6d71b41
diff --git a/packages/docs/docs/install-whisper-cpp/transcribe.mdx b/packages/docs/docs/install-whisper-cpp/transcribe.mdxindex 61d58be22f..8ea718b39a 100644--- a/packages/docs/docs/install-whisper-cpp/transcribe.mdx+++ b/packages/docs/docs/install-whisper-cpp/transcribe.mdx@@ -86,6 +86,10 @@ Make sure to not use a \*.en model, as they will not be able to translate a foreWe recommend using at least the `medium` model to get satisfactory results when translating.:::+### `printOutput?`<AvailableFrom v="4.0.132" />++Whether to print the output of the transcription process to the console. Defaults to `true`.+## Return value### `TranscriptionJson`diff --git a/packages/install-whisper-cpp/src/transcribe.ts b/packages/install-whisper-cpp/src/transcribe.tsindex 39fe94acb2..10b164d23f 100644--- a/packages/install-whisper-cpp/src/transcribe.ts+++ b/packages/install-whisper-cpp/src/transcribe.ts@@ -96,6 +96,7 @@ const transcribeToTempJSON = async ({modelFolder,translate,tokenLevelTimestamps,+ printOutput,}: {fileToTranscribe: string;whisperPath: string;@@ -104,6 +105,7 @@ const transcribeToTempJSON = async ({modelFolder: string | null;translate: boolean;tokenLevelTimestamps: boolean;+ printOutput: boolean;}): Promise<{outputPath: string;}> => {@@ -181,6 +183,7 @@ export const transcribe = async <HasTokenLevelTimestamps extends boolean>({modelFolder,translateToEnglish = false,tokenLevelTimestamps,+ printOutput = true,}: {inputPath: string;whisperPath: string;@@ -188,6 +191,7 @@ export const transcribe = async <HasTokenLevelTimestamps extends boolean>({tokenLevelTimestamps: HasTokenLevelTimestamps;modelFolder?: string;translateToEnglish?: boolean;+ printOutput?: boolean;}): Promise<TranscriptionJson<HasTokenLevelTimestamps>> => {if (!existsSync(whisperPath)) {throw new Error(@@ -215,6 +219,7 @@ export const transcribe = async <HasTokenLevelTimestamps extends boolean>({modelFolder: modelFolder ?? null,translate: translateToEnglish,tokenLevelTimestamps,+ printOutput,});const json = (await readJson(