diff --git a/docs/plans/001-7-parakeet.md b/docs/plans/001-7-parakeet.md index 107f055..e648695 100644 --- a/docs/plans/001-7-parakeet.md +++ b/docs/plans/001-7-parakeet.md @@ -90,10 +90,10 @@ app's `TranscriptChunk` shape, so TranscriptView, export, progress, and live wor - Entry: displayName "Parakeet v3 (English)", `multilingual: false`, `family: "parakeet"`, defaults wasm `"q8"`, webgpu `{ encoder_model: "fp16", decoder_model_merged: "q8" }`, webnn `"q8"`. -- [ ] Tests: `modelFamily` default; Parakeet entry family/multilingual/no fasterWhisperModel; +- [x] Tests: `modelFamily` default; Parakeet entry family/multilingual/no fasterWhisperModel; wasm download bytes = 652,183,999 + 18,202,004 + 102,132; webgpu = fp16 encoder + int8 decoder + aux; peak = 2 × encoder bytes; existing fasterWhisperModel test restricted to Whisper family. -- [ ] Fail → implement → pass → typecheck → commit. +- [x] Fail → implement → pass → typecheck → commit. ### Task 2: Pure Parakeet logic (`src/lib/parakeet.ts`) @@ -114,11 +114,11 @@ app's `TranscriptChunk` shape, so TranscriptView, export, progress, and live wor (`https://huggingface.co//resolve//`). - `transcribeWindows(audio: Float32Array, recognize: (window: Float32Array, offsetSeconds: number) => Promise, callbacks?: { onWindow?: (chunks: TranscriptChunk[], processedSeconds: number, totalSeconds: number) => void }): Promise<{ text: string; chunks: TranscriptChunk[] }>`. -- [ ] Tests: window bounds (≤ 30 s, contiguous, cover all; short audio = one window; 90 min); +- [x] Tests: window bounds (≤ 30 s, contiguous, cover all; short audio = one window; 90 min); quiet-gap cut at 27 s; `wordsToChunks` sentence/gap/max splits and timestamps; vocab parse + decode (`▁` → space, blank skipped, no space before punctuation); file names/URL; `transcribeWindows` offsets/progress/partials and silence-only. -- [ ] Fail → implement → pass → commit. +- [x] Fail → implement → pass → commit. ### Task 3: Cache-API model file downloader (`src/worker/modelFiles.ts`) @@ -127,9 +127,9 @@ app's `TranscriptChunk` shape, so TranscriptView, export, progress, and live wor `progress` (loaded/total/progress), `put` only after the full body, then `done`; non-OK ⇒ throws `Could not download (HTTP )`. -- [ ] Tests with fake cache/fetch: hit, miss+store+progress, HTTP error doesn't store, no Cache +- [x] Tests with fake cache/fetch: hit, miss+store+progress, HTTP error doesn't store, no Cache Storage ⇒ still fetches. -- [ ] Fail → implement → pass → commit. +- [x] Fail → implement → pass → commit. ### Task 4: Device policy + mobile filter @@ -141,7 +141,7 @@ app's `TranscriptChunk` shape, so TranscriptView, export, progress, and live wor (auto never picks WebGPU, WebNN unsupported). `isModelAllowedOnDevice(model, hint): boolean` / `modelsForDevice(models, hint)` — false for `family === "parakeet"` when `isLikelyMobile`. -- [ ] Tests → fail → implement → pass → commit. +- [x] Tests → fail → implement → pass → commit. ### Task 5: Worker engine path @@ -155,13 +155,13 @@ sessions on the attempt device (Task 4, D-025 restart reused) → `ready`. `tran Parakeet ignores language/task, posts `transcribe-progress`/`partial` per window when streaming, `result` always (live works through the same message). -- [ ] Real-model test `tests/parakeet-real-model.test.ts` (opt-in `PARAKEET_REAL=1`, reads files from +- [x] Real-model test `tests/parakeet-real-model.test.ts` (opt-in `PARAKEET_REAL=1`, reads files from `node_modules/@huggingface/transformers/.cache//`, runs `createParakeetEngine` on onnxruntime-web WASM): whole-file and live WER per clip ≤ the turbo bars (0.25; en_alien 0.35), chunks span the clip. Run under the lock. -- [ ] Build check: `dist/inference.worker.js` contains the 1.26.0-dev ort version string and **not** +- [x] Build check: `dist/inference.worker.js` contains the 1.26.0-dev ort version string and **not** `1.24.1` (no second runtime bundled); result recorded in D-WS7a. -- [ ] Commit. +- [x] Commit. ### Task 6: UI @@ -172,13 +172,16 @@ Parakeet ignores language/task, posts `transcribe-progress`/`partial` per window "English only · much faster on long recordings · no translation" (final copy via impeccable). - App: if the selected model isn't allowed on this device, fall back to `DEFAULT_MODEL_ID`; guard load paths; the WASM "slower than real time" live hint only for Whisper family. -- [ ] Typecheck, build, headless Chrome screenshots (desktop + phone UA, light/dark) on port 3170. -- [ ] Commit. +- [x] Typecheck, build. (Screenshots taken in /tmp before the pause; re-verify after resume.) +- [ ] Headless Chrome screenshots (desktop + phone UA, light/dark) on port 3170, re-taken on the + final build; headless-Chrome end-to-end file run (progress, transcript, .txt/.srt export). +- [x] Commit. ### Task 7: Measurement + docs -- [ ] `scripts/bench-parakeet.ts`: per clip WER + wall-clock for Parakeet (ort-node, ort-web WASM) +- [x] `scripts/bench-parakeet.ts`: per clip WER + wall-clock for Parakeet (ort-node, ort-web WASM) and Turbo (ort-node, worker options) — run under the lock. -- [ ] D-WS7a (runtime + engine path + numbers), Architecture.md (worker families), WorkBreakdown, +- [x] D-WS7a (runtime + engine path + numbers), Architecture.md (worker families), WorkBreakdown, README/AGENTS command for the opt-in test, CC-BY attribution note. +- [x] Docs committed (9cd92b4). - [ ] Fast suite, typecheck, build; commit; `git rm` this plan; commit.