Skip to content

Fix: flaky Whisper realtime transcription event handling#2535

Merged
Geramy merged 1 commit into
mainfrom
fl0rianr/Fix_flaky_Whisper_test
Jul 3, 2026
Merged

Fix: flaky Whisper realtime transcription event handling#2535
Geramy merged 1 commit into
mainfrom
fl0rianr/Fix_flaky_Whisper_test

Conversation

@fl0rianr

@fl0rianr fl0rianr commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes a flaky Whisper realtime WebSocket transcription test where the server
emitted conversation.item.input_audio_transcription.delta and completed
events, but the test only asserted text from completed.transcript.

The test now accumulates transcript text from delta events and falls back to the
completed transcript when present. Event field access is also made robust for
OpenAI SDK event objects and dict-like events.

  • Preserves existing HTTP transcription, NPU, connection lifecycle, and manual
    commit test behavior

Accumulate realtime transcription deltas instead of relying only on the
completed event transcript field. Some backends/SDK event shapes can deliver
text via delta events while completed marks the final state with an empty
transcript, causing a false negative despite successful transcription.

Also make realtime event field access robust for SDK objects and dict-like
events.
@github-actions github-actions Bot added bug Something isn't working engine::whispercpp whisper.cpp backend; audio transcription audio labels Jul 2, 2026
@fl0rianr fl0rianr requested a review from jeremyfowers July 2, 2026 18:46
@jeremyfowers jeremyfowers requested a review from Geramy July 3, 2026 14:06
@jeremyfowers

Copy link
Copy Markdown
Member

@Geramy can you review? It would improve the stability of macOS CI testing quite a bit.

@Geramy Geramy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is correct.

@Geramy Geramy added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit 17cd4ff Jul 3, 2026
85 checks passed
@Geramy Geramy deleted the fl0rianr/Fix_flaky_Whisper_test branch July 3, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audio bug Something isn't working engine::whispercpp whisper.cpp backend; audio transcription

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants