Skip to content

fix(desktop): persist OpenAI text-only transcripts#5211

Open
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/openai-batch-text-transcripts
Open

fix(desktop): persist OpenAI text-only transcripts#5211
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/openai-batch-text-transcripts

Conversation

@ComputelessComputer
Copy link
Copy Markdown
Collaborator

@ComputelessComputer ComputelessComputer commented May 14, 2026

Synthesize approximate transcript words for batch responses without word timings so OpenAI GPT transcription results are saved and summaries can run.


Note

Medium Risk
Changes batch transcription persistence behavior by generating synthetic WordLike timing data when providers return transcript text without word-level timings, which could affect downstream alignment/speaker-hint indexing. Scope is localized to batch result handling and covered by a new unit test.

Overview
Batch result handling now supports text-only alternatives: when a BatchResponse includes a transcript but no words, it synthesizes WordLike entries with approximate 400ms durations and persists them instead of dropping the result.

Adds a regression test ensuring handleBatchResponse persists these synthesized words and still clears batch/batchPreview state after persistence.

Reviewed by Cursor Bugbot for commit f1252b5. Bugbot is set up for automated code reviews on this repo. Configure here.

Synthesize approximate transcript words for batch responses without word timings so OpenAI GPT transcription results are saved and summaries can run.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 14, 2026

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit f1252b5
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a05f73396974d0008fd3f73

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f1252b5. Configure here.

if (!alternative.words || !alternative.words.length) {
allWords.push(
...synthesizeWordsFromTranscript(alternative.transcript, channelIndex),
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing wordOffset update for synthesized words path

Medium Severity

When synthesizeWordsFromTranscript produces words for a text-only channel, those words are pushed into allWords but wordOffset is not incremented before returning. If a subsequent channel in the same response has real word timings with speaker hints, the hints' wordIndex values will be computed with a stale wordOffset, causing them to reference incorrect positions in the merged allWords array.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f1252b5. Configure here.

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