Repository navigation
Conversation
Collaborator
|
Thanks! Very thoughtful of you to notice this. |
Closed captions arrive as growing segment texts keyed by deviceId:captionId. Ignoring caption updates only while the recording is paused is not enough to keep paused speech out of the transcript: the first update after resume carries the whole accumulated segment text, including the words spoken during the pause, and gets recorded with the resume timestamp. Freeze any segment that sends an update during a pause and keep dropping it after resume; segments that start after the resume pass normally. Applies to all platforms using WebBotAdapter caption handling. Reproduced on Google Meet with meeting_closed_captions transcription: speech during a pause showed up verbatim in the transcript after resume.
nabossha
force-pushed
the
fix/paused-captions-leak
branch
from
October 8, 2026 22:17
e7eabfd to
fb3272e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Pausing a recording is supposed to keep the paused portion of the meeting out of all
artifacts. That works for the media pipeline and per-participant audio, but closed-caption
transcription leaks the paused speech: captions arrive as growing segment texts keyed by
deviceId:captionId, andWebBotAdapter.handle_caption_updateonly drops updates whilerecording_pausedis set. The first caption update after resume carries the whole accumulatedsegment — including everything said during the pause — and is recorded as an utterance with
the resume timestamp.
Reproduction (Google Meet,
meeting_closed_captions)joined_recording, speaker talking.POST /bots/{id}/pause_recording, say something ("this is secret"), thenPOST /bots/{id}/resume_recording.GET /bots/{id}/transcript→ "this is secret" appears verbatim, timestamped at themoment of resume.
(The async transcription path built from per-participant audio chunks is clean — those frames
are dropped while paused — which makes the caption leak easy to miss.)
Fix
New
PausedCaptionFilter(no dependencies): any caption segment that sends an update duringa pause is frozen for good — its updates keep being dropped after resume, so the buffered
paused speech never reaches the caption manager. Segments that start after the resume pass
normally. Wired into
WebBotAdapter.handle_caption_update, so it covers every platform thatuses the shared caption path.
The words spoken before the pause in a spanning segment are unaffected: they were already
upserted before the pause hit.
Known limitation: a segment that emits no update at all during a very short pause (<~1 s)
cannot be detected. In practice caption updates arrive continuously while someone speaks.
Tests
bots/tests/test_paused_caption_filter.py— plainunittest, 4 cases: spanning segmentstays dropped after resume, new segment after resume passes, per-device keying, no-op
without pause.
test_google_meet_bot_2.pystill passes: it usesdistinct caption ids per phase, which is exactly the case that keeps working.
version.jsonbumped 1.64.1 → 1.64.2 (fix).Update (rebased onto v1.82.6)
Rebased onto
3cbeb69f. No functional change: the fix is identical, only the importcontext in
web_bot_adapter.pymoved with the rebase. The version bump now lives in its owncommit and targets 1.82.7 (patch over 1.82.6 for this
fix:PR). Ruff is clean; the filtertests plus the google_meet and teams suites pass in Docker.