Skip to content

feat(voice-to-text): on-device speech-to-text (Whisper) - #61

Merged
slaveofcode merged 2 commits into
developfrom
feat/voice-to-text
Jul 31, 2026
Merged

feat(voice-to-text): on-device speech-to-text (Whisper)#61
slaveofcode merged 2 commits into
developfrom
feat/voice-to-text

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

New Voice to Text tool (/tools/voice-to-text, Media) — transcribe speech fully on-device.

Privacy: audio never leaves the browser; only Whisper model weights are fetched from CDN on first use (same trade-off as the OCR tool).

  • Input: record from the mic or upload an audio/video file.
  • Models: English Fast (whisper-tiny.en) · English Accurate (base.en) · Multilingual (base). Model-download progress bar; WebGPU→WASM.
  • Output: editable plain text · inline timestamped view · SRT/VTT subtitles (from Whisper segment timestamps). Copy + download .txt/.srt/.vtt.

Engine: transformers.js v4 on onnxruntime-web (dynamically imported; 549KB chunk excluded from PWA precache via globIgnores).

Pure tested logic (stt.lib.ts), SDK boundary (stt.engine.ts), audio decode (stt-audio.lib.ts), useAudioRecorder hook (tested). Spec+plan under docs/superpowers/.

514 tests pass · lint 0 errors · build green (/tools/voice-to-text built, no precache bloat).

⚠️ Note: the in-browser Whisper run (model fetch + WebGPU) is verified by build + manual smoke, not headless CI.

🤖 Generated with Claude Code

Kresna and others added 2 commits August 1, 2026 05:33
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Transcribe speech to text fully on-device via Whisper (transformers.js /
onnxruntime-web, WebGPU->WASM). Record from the mic or upload an audio/video
file; audio never leaves the browser (only model weights are fetched from CDN
on first use, like the OCR tool).

- Models: English Fast (whisper-tiny.en), English Accurate (base.en),
  Multilingual (base). Model-download progress bar.
- Output: editable plain text, inline timestamped view, and SRT/VTT subtitle
  export from Whisper segment timestamps. Copy + download .txt/.srt/.vtt.

Pure tested logic in stt.lib.ts (mixToMono, segmentsToText, time formatters,
segmentsToSrt/Vtt). SDK boundary stt.engine.ts (only file touching
transformers.js). Audio decode in stt-audio.lib.ts (decodeToMono16k).
useAudioRecorder hook (MediaRecorder, typed errors, track cleanup) with tests.
transformers chunk added to workbox globIgnores.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 2026

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 9d956bc Jul 31 2026, 10:48 PM

@slaveofcode
slaveofcode merged commit a736733 into develop Jul 31, 2026
1 of 2 checks passed
@slaveofcode
slaveofcode deleted the feat/voice-to-text branch July 31, 2026 22:46
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