Skip to content

feat(voice-to-text): add Fast (Whistle) engine and live dictation - #409

Merged
slaveofcode merged 2 commits into
developfrom
claude/gwt-codebase-overview-d93093
Oct 9, 2026
Merged

slaveofcode merged 2 commits into
developfrom
claude/gwt-codebase-overview-d93093

Conversation

@slaveofcode

@slaveofcode slaveofcode commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

What does this PR do?

Adds a second speech engine to Voice to Text — Cactus Whistle (Apache-2.0), a 17 MB on-device model — plus live dictation.

  • New default "Fast · 7 languages" (English, German, French, Spanish, Italian, Dutch, Polish). Replaces the two English-only Whisper models; Whisper Multilingual and Multilingual · Better stay for Indonesian and every other language.
  • Auto-switch: choosing a language Fast doesn't cover switches to Whisper with a note; Indonesian pages default to Bahasa + Whisper. Polish added to the list.
  • Long files are split into ≤30 s windows at the quietest point; Whistle's word timestamps become subtitle cues (TXT/SRT/VTT export unchanged).
  • Live dictation (Fast only): mic → AudioWorklet → worker in ~1 s steps with back-pressure; confirmed words solid, pending tail faded; the recording is kept for replay / re-transcription.
  • Hosting & integrity: needle.js vendored as an ES module (scripts/vendor-needle.mjs, Apache-2.0 LICENSE included). needle.wasm and whistle.cact load through the existing /hf/ proxy, pinned to exact Hugging Face commits, SHA-256 verified, and kept in Cache Storage. No R2 upload or Worker change.

Measured (headless Chromium, 11 s English clip): Whistle 0.4 s load / 1.5 s transcribe vs Whisper base 12.7 s / 4.7 s; download ~18 MB vs ~232 MB. Real-model check on the dev server: exact transcript for file and live modes.

Checklist

  • npm test -- --run passes (243 files / 2420 tests)
  • npm run build succeeds
  • npm run lint is clean (0 errors)
  • New tool? — n/a (improvement to voice-to-text); new E2E e2e/tools/voice-to-text.spec.ts (dev-only ?e2e stub engine + synthetic mic)
  • No owner-specific deploy assets changed (wrangler bucket names, secrets, domain)
  • Everything still runs fully client-side (no data leaves the browser — only model files are fetched)

Promote to production: 3D viewer framing fix
- New default "Fast · 7 languages" model: Cactus Whistle (Apache-2.0), a 17 MB
  on-device speech model in a single-threaded WASM engine. Replaces the two
  English-only Whisper models; Whisper Multilingual / Better stay for
  Indonesian and every other language
- Picking a language Fast doesn't cover switches to Whisper automatically;
  Indonesian pages default to Bahasa + Whisper; Polish added
- Long files are split into 30 s windows at the quietest point; word
  timestamps become subtitle cues for TXT/SRT/VTT export
- Live dictation: mic -> AudioWorklet -> worker, ~1 s steps with
  back-pressure; committed words + pending tail, recording kept for replay
- needle.js vendored as an ES module (scripts/vendor-needle.mjs); needle.wasm
  and whistle.cact fetched via the /hf proxy pinned to exact commits,
  SHA-256 verified and kept in Cache Storage
- Unit tests for the pure lib and the engine wrapper (fake module); E2E with
  a dev-only ?e2e stub engine and a synthetic microphone; EN/ID SEO updated
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
goodwebtools 7d34a38 Oct 09 2026, 12:38 PM

@slaveofcode
slaveofcode merged commit b0ac457 into develop Oct 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant