Skip to content

Pause transcription when a recording is paused#1640

Merged
shomix merged 5 commits into
mainfrom
shomix-p-pause-transcription-when-pausing
Jun 29, 2026
Merged

Pause transcription when a recording is paused#1640
shomix merged 5 commits into
mainfrom
shomix-p-pause-transcription-when-pausing

Conversation

@shomix

@shomix shomix commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Previously, pausing a recording only paused the video - the live transcription engine kept running, so the app kept using the mic and CPU while "paused".

This wires transcription pause/resume into all recording paths so it stops with the recording and restarts on resume. Adds pause()/resume() to the transcription capture (whisper and web-speech), handles the case where the user pauses while the engine is still starting up, and adds debug logs around each transition.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

builder-io-integration[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@builder-io-integration

Copy link
Copy Markdown
Contributor

⚠️ Review Agent ran into a problem and couldn't finish reviewing the latest commit.

We've been automatically notified and are looking into it. Push a new commit to re-trigger the review, or contact support@builder.io if this keeps happening.

Error ID: d5b114ceea2e451ca6bf3a81730da877

builder-io-integration[bot]

This comment was marked as outdated.

builder-io-integration[bot]

This comment was marked as outdated.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builder reviewed your changes and found 2 potential issues 🟡

Review Details

This incremental update addresses the two previously open concerns I reviewed: native transcription resume is now moved back behind a successful native_fullscreen_recording_resume, and the Whisper pause/resume error path no longer snaps desiredPaused back to the old engine state. I verified both of those changes and resolved the stale PR comments before posting this review.

Risk assessment: standard (medium) because this is recorder/transcription lifecycle logic in user-facing capture flows. The overall approach is still sound: the PR now pauses transcription with recording, preserves trailing Whisper finals when stopping from paused state, and keeps the desired pause state queued across in-flight transitions. The remaining issues are around edge-case ordering in the fallback/browser path and around mixing late Whisper finals from the old session with resumed speech from the new session.

Key findings:

  • 🟡 MEDIUM Stopping immediately after a Web Speech pause can drop the last finalized words.
  • 🟡 MEDIUM Whisper can interleave late pre-pause finals after post-resume speech on a quick pause→resume.

🧪 Browser testing: Will run after this review (PR touches UI code)

Comment thread templates/clips/desktop/src/lib/transcription-capture.ts
Comment thread templates/clips/desktop/src/lib/transcription-capture.ts
.then(() => {
pausedAt = at;
emitState();
console.log("[clips-recorder] native pause: pausing transcription");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this log intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. Helps with debugging when stuff break

@shomix shomix merged commit 1ca27d8 into main Jun 29, 2026
121 of 122 checks passed
@shomix shomix deleted the shomix-p-pause-transcription-when-pausing branch June 29, 2026 13:54
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.

2 participants