Skip to content

fix(voice-to-text): cache model + pause preview during transcribe - #76

Merged
slaveofcode merged 1 commit into
developfrom
fix/voice-cache-and-audio
Aug 1, 2026
Merged

fix(voice-to-text): cache model + pause preview during transcribe#76
slaveofcode merged 1 commit into
developfrom
fix/voice-cache-and-audio

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Two issues from testing:

  • Model re-inits every click → cache the built Whisper transcriber by model id; download progress only shows on first load.
  • Audio keeps playing on stop → ONNX inference blocks the main thread, freezing native audio controls. Pause the preview programmatically when Transcribe (or a new recording) starts.

545 tests · lint clean · build green.

🤖 Generated with Claude Code

Two issues from testing:
- Every Transcribe click re-initialized the Whisper pipeline (re-reading weights,
  re-running the load progress, blocking the thread). Cache the built transcriber
  by model id and reuse it; the download progress now only shows on first load.
- The audio preview kept playing when pressing stop because ONNX inference blocks
  the main thread and freezes the native controls. Pause the preview
  programmatically when transcribe (or a new recording) starts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@slaveofcode
slaveofcode merged commit 0e1c95c into develop Aug 1, 2026
1 of 2 checks passed
@slaveofcode
slaveofcode deleted the fix/voice-cache-and-audio branch August 1, 2026 06:44
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