Skip to content

fix(voice): send language and prompt in streamed STT - #4533

Closed
sylvesterkaczmarek wants to merge 10 commits into
openai:mainfrom
sylvesterkaczmarek:fix/stt-stream-language-prompt
Closed

fix(voice): send language and prompt in streamed STT#4533
sylvesterkaczmarek wants to merge 10 commits into
openai:mainfrom
sylvesterkaczmarek:fix/stt-stream-language-prompt

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Honor STTModelSettings.language and STTModelSettings.prompt in streamed OpenAI transcription sessions.

The non-streaming STT path already forwards both settings to audio.transcriptions.create(), but the streamed path previously sent only the transcription model. Callers could therefore configure language or prompt and still have those values silently omitted from the Realtime transcription session.

Fix

  • include prompt when explicitly configured
  • use plural languages: [value] for gpt-live-transcribe
  • retain singular language for gpt-transcribe and existing streamed transcription models such as gpt-4o-transcribe
  • omit language/prompt keys when unset, preserving the existing default session payload
  • leave temperature unchanged because it is not part of the current Realtime transcription-session configuration

Test plan

Focused coverage verifies that:

  • gpt-4o-transcribe receives singular language and configured prompt
  • gpt-transcribe receives singular language and configured prompt
  • gpt-live-transcribe receives plural languages: [value]
  • unset values are omitted and the transcription payload remains model-only

Risk

Low. Existing callers that do not set language or prompt produce the same payload as before. The behavior changes only for settings that callers explicitly requested but that the streamed path previously ignored.

Issue number

None. Found while auditing parity between static and streamed STT settings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5121a8b839

ℹ️ 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
  • 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 address that feedback".

Comment thread src/agents/voice/models/openai_stt.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Note

You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

Note

You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard.

@seratch seratch 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.

Thanks for the contribution. Forwarding language and prompt in streamed STT is the correct direction, but the current model split is incomplete. Both gpt-transcribe and gpt-live-transcribe use the plural languages field; existing transcription models continue to use singular language.

Please apply the plural mapping to both current models and add regression coverage for gpt-transcribe, while retaining the existing singular-field and unset-value tests.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f485f1553

ℹ️ 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
  • 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 address that feedback".

Comment thread src/agents/voice/models/openai_stt.py Outdated
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Addressed. Both gpt-transcribe and gpt-live-transcribe now map STTModelSettings.language to plural languages: [value], while existing transcription models retain singular language. Added focused gpt-transcribe regression coverage while retaining the existing singular-field and unset-value tests. Ready for re-review.

@seratch

seratch commented Aug 21, 2026

Copy link
Copy Markdown
Member

@sylvesterkaczmarek Can you complete these open PRs before sending further PRs? Thanks for your contributions!

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

@sylvesterkaczmarek Can you complete these open PRs before sending further PRs? Thanks for your contributions!

Understood. I'll focus on completing the current open PRs before sending anything new.

I also rechecked the language mapping against the current Realtime guidance and corrected gpt-transcribe back to singular language; only gpt-live-transcribe uses plural languages. The regression coverage and PR description are updated.

@seratch

seratch commented Aug 21, 2026

Copy link
Copy Markdown
Member

Thanks for working on this. #4574 will resolve the issue.

@seratch seratch closed this Aug 21, 2026
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.

2 participants