Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(stt): type the caption status mock for the progress fields

Etienne Lescot0779a726a047
diff --git a/src/lib/captioning/transcribe.test.ts b/src/lib/captioning/transcribe.test.ts
index d8f461d81..82e630b9a 100644
--- a/src/lib/captioning/transcribe.test.ts
+++ b/src/lib/captioning/transcribe.test.ts
@@ -23,7 +23,13 @@ import { transcribeMono16kToSegments } from "./transcribe";
* worker that the previous Web-Worker pipeline owned, so they run in any env.
*/
-type Listener = (event: { phase: "model" | "transcribe" }) => void;
+// Mirrors `SttRendererStatus` — the mock must accept the progress fields, since
+// carrying them across the IPC hop is exactly what this file asserts.
+type Listener = (event: {
+ phase: "model" | "transcribe";
+ completedSec?: number;
+ totalSec?: number;
+}) => void;
type RendererSttApi = {
transcribe: (request: { samples: Float32Array; language?: string }) => Promise<{