From fdc9b500c09bac978816e3c97bbaa4db538b13f3 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Thu, 29 Oct 2026 23:52:05 +0100 Subject: [PATCH] Check Parakeet chunks export to .srt and timestamped text, and record the headless Chrome run Co-Authored-By: Claude Opus 5.5 --- docs/WorkBreakdown.md | 5 +++++ tests/parakeet.test.ts | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/docs/WorkBreakdown.md b/docs/WorkBreakdown.md index faca69a..519e328 100644 --- a/docs/WorkBreakdown.md +++ b/docs/WorkBreakdown.md @@ -349,6 +349,11 @@ cached. - [x] File and live mode; WASM int8 baseline; explicit WebGPU = fp16 encoder (opt-in only). - [x] Hidden on phones/tablets; English-only note instead of language/task controls. - [x] Real-model WER/wall-clock vs Large v3 Turbo (CPU), opt-in `PARAKEET_REAL=1` test. +- [x] Headless Chrome (no GPU, fresh profile, prod build, COOP/COEP on): picking Parakeet and + dropping `en_aiproblem.m4a` downloaded the weights, cached them ("available offline"), + ran on WASM (12 threads) and showed the transcript, 2 timestamp segments and the + .txt/.srt/.txt+ts/Copy exports — 15 s end to end including the ~670 MB download. Picker + screenshots: desktop light/dark show the row + English-only note; a phone UA hides it. - [ ] Owner's browser check: real Chrome WASM load/transcribe (speed, memory), explicit WebGPU on a real GPU (works? faster than WASM? fallback restart), Firefox/Safari WASM. diff --git a/tests/parakeet.test.ts b/tests/parakeet.test.ts index 62a42b5..7711c83 100644 --- a/tests/parakeet.test.ts +++ b/tests/parakeet.test.ts @@ -10,6 +10,7 @@ import { wordsToChunks, type ParakeetWord, } from "../src/lib/parakeet"; +import { transcriptToSrt, transcriptToTimestampedTxt } from "../src/lib/export"; // Pure Parakeet engine logic (D-WS7a) — no model, no runtime. @@ -91,6 +92,14 @@ describe("wordsToChunks", () => { ]); }); + test("chunks export to .srt and timestamped .txt like Whisper's", () => { + const chunks = wordsToChunks([word("Hello", 0.5, 0.8), word("there.", 0.9, 1.2), word("Bye.", 61.5, 62.25)]); + expect(transcriptToSrt(chunks)).toBe( + "1\n00:00:00,500 --> 00:00:01,200\nHello there.\n\n2\n00:01:01,500 --> 00:01:02,250\nBye.\n", + ); + expect(transcriptToTimestampedTxt(chunks)).toContain("Bye."); + }); + test("closing quotes after the full stop still end the sentence", () => { const chunks = wordsToChunks([word('"Yes."', 0, 0.4), word("Then", 0.5, 0.7)]); expect(chunks.map((chunk) => chunk.text)).toEqual([' "Yes."', " Then"]);