Check Parakeet chunks export to .srt and timestamped text, and record the headless Chrome run

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-29 23:52:05 +01:00
co-authored by Claude Opus 5.5
parent 7ff23628e3
commit fdc9b500c0
2 changed files with 14 additions and 0 deletions
+5
View File
@@ -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.
+9
View File
@@ -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"]);