Skip to content

🎥 Make videos programmatically with React

cleanup

Jonny Burger5249b234d6e0
diff --git a/packages/whisper-wasm/src/print-handler.ts b/packages/whisper-wasm/src/print-handler.ts
index 8214ce43be..ef8f3af77f 100644
--- a/packages/whisper-wasm/src/print-handler.ts
+++ b/packages/whisper-wasm/src/print-handler.ts
@@ -12,8 +12,6 @@ const RESULT_TOKEN = 'remotion_final:';
const PROGRESS_TOKEN = 'remotion_progress:';
export const printHandler = (text: string) => {
- console.log({text});
-
const chunkMatch = text.match(
/^\[(\d{2}:\d{2}:\d{2}\.\d{3})\s*-->\s*(\d{2}:\d{2}:\d{2}\.\d{3})\]\s*(.+)$/,
);
@@ -36,13 +34,8 @@ export const printHandler = (text: string) => {
}
if (text.startsWith(RESULT_TOKEN)) {
- try {
- console.log({t: text.slice(RESULT_TOKEN.length)});
- const json = JSON.parse(text.slice(RESULT_TOKEN.length));
-
- modelState.resolver?.(json);
- } catch (e) {
- console.error(e);
- }
+ const json = JSON.parse(text.slice(RESULT_TOKEN.length));
+
+ modelState.resolver?.(json);
}
};
diff --git a/packages/whisper-wasm/src/transcribe.ts b/packages/whisper-wasm/src/transcribe.ts
index 258ac15c32..8bb870fef4 100644
--- a/packages/whisper-wasm/src/transcribe.ts
+++ b/packages/whisper-wasm/src/transcribe.ts
@@ -1,5 +1,4 @@
/* eslint-disable new-cap */
-/* eslint-disable no-console */
import type {MainModule} from '../main';
import {checkForHeaders} from './check-for-headers';
@@ -47,7 +46,6 @@ const audioDecoder = async (audioBuffer: AudioBuffer) => {
const renderedBuffer = await offlineContext.startRendering();
const audio = renderedBuffer.getChannelData(0);
- console.log(`Audio loaded, size: ${audio.length}`);
return audio;
};