Skip to content

Conversation

@github-actions
Copy link

Mirrored from upstream

Field Value
Upstream openai / openai-agents-python PR 1537
Author @dudududukim
Created 2025-08-20
Last Updated 2025-08-28
Mirrored At 2025-08-28T11:07:14.089Z
Commit 3c99948
Status Ready for review

Original Description (sanitized)

Summary

This PR updates event handling in OpenAISTTTranscriptionSession to support both legacy "input_audio_transcription_completed" and the currently observed "conversation.item.input_audio_transcription.completed" events when streaming transcription over the WebSocket endpoint (wss://api.openai.com/v1/realtime?intent=transcription).

The test suite (tests/voice/test_openai_stt.py) is also updated to cover both event types, ensuring that the transcription output is properly yielded from either event in real scenarios.

Motivation

In my environment, events retrieved from
event = await asyncio.wait_for(self._event_queue.get(), timeout=EVENT_INACTIVITY_TIMEOUT) correspond to those emitted by the OpenAI WebSocket session.

The observed event for completed transcription is currently "conversation.item.input_audio_transcription.completed", not the legacy event name.

These changes allow realtime STT workflows to work as expected, without manual hotfixes.

Testing

before/after

Top: Using the legacy event name;
Bottom: After adding support for conversation.item.input_audio_transcription.completed.

Tests pass successfully in my local environment

dudududukim/OpenAI_agent_practice

The updated test confirms correct behavior for both event types.

@jayeshp19
Copy link
Owner

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 👍

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

@github-actions
Copy link
Author

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants