Skip to content

Fix duplicate transcript lines for local Whisper STT - #226

Open
surgaev wants to merge 1 commit into
pickle-com:mainfrom
surgaev:fix/whisper-duplicate-transcript-lines
Open

Fix duplicate transcript lines for local Whisper STT#226
surgaev wants to merge 1 commit into
pickle-com:mainfrom
surgaev:fix/whisper-duplicate-transcript-lines

Conversation

@surgaev

@surgaev surgaev commented Aug 9, 2026

Copy link
Copy Markdown

What

For the whisper provider branch of handleMyMessage/handleTheirMessage in sttService.js, every transcription was being sent to the renderer twice: once immediately via sendToRenderer('stt-update', ...), and again ~2 seconds later when the debounce timer (debounceMyCompletion/debounceTheirCompletion) fires and calls flushMyCompletion/flushTheirCompletion, which also sends 'stt-update'.

Every line spoken while using local Whisper STT shows up twice in the Listen panel.

Why

The immediate sendToRenderer call duplicates what the debounce/flush path already does. Other STT providers in this file (Gemini, Deepgram) don't have this extra immediate send — only the whisper branch does.

Fix

Removed the redundant immediate sendToRenderer calls in both the Me and Them whisper handlers, leaving the debounce path as the single source of truth — consistent with how the other providers already behave in this file.

Testing

Verified locally with the Whisper (local) STT provider active: each spoken utterance now appears exactly once in the Listen transcript instead of twice.

For the whisper provider branch of handleMyMessage/handleTheirMessage,
every transcription was sent to the renderer twice: once immediately
via sendToRenderer('stt-update', ...), and again ~2s later when
debounceMyCompletion/debounceTheirCompletion's timer fires and calls
flushMyCompletion/flushTheirCompletion (which also sends 'stt-update').

Since the debounce path already renders the final text, the immediate
send is redundant and causes every Whisper transcription to appear
twice in the Listen UI. Removing it leaves the debounce path as the
single source of truth for the whisper provider, matching the pattern
already used for the other STT providers in this file.
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