fix(voice): send language and prompt in streamed STT - #4533
fix(voice): send language and prompt in streamed STT#4533sylvesterkaczmarek wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
💡 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".
|
Note You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard. |
1 similar comment
|
Note You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard. |
seratch
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
💡 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".
| assert self._websocket is not None, "Websocket not initialized" | ||
| transcription_config: dict[str, Any] = {"model": self._model} | ||
| if self._settings.language is not None: | ||
| if self._model in {"gpt-transcribe", "gpt-live-transcribe"}: |
There was a problem hiding this comment.
Keep gpt-transcribe on the singular language field
When callers select gpt-transcribe and set STTModelSettings.language, this condition now serializes the value as languages, but docs/realtime/guide.md:115 reserves plural languages for gpt-live-transcribe, while line 140 identifies gpt-transcribe's plural field as completion output rather than expected-language input. The session update therefore does not send the requested singular input language and may be rejected; keep gpt-transcribe on language and reserve this list conversion for gpt-live-transcribe. Fresh evidence since the prior thread is the follow-up widening of this condition to include gpt-transcribe.
AGENTS.md reference: AGENTS.md:L167-L167
Useful? React with 👍 / 👎.
|
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. |
|
@sylvesterkaczmarek Can you complete these open PRs before sending further PRs? Thanks for your contributions! |
Summary
Honor
STTModelSettings.languageandSTTModelSettings.promptin 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 configurelanguageorpromptand still have those values silently omitted from the Realtime transcription session.Fix
promptwhen explicitly configuredlanguages: [value]forgpt-transcribeandgpt-live-transcribelanguagefor existing streamed transcription models such asgpt-4o-transcribetemperatureunchanged because it is not part of the current Realtime transcription-session configurationTest plan
Focused coverage verifies that:
gpt-4o-transcribereceives singularlanguageand configuredpromptgpt-transcribereceives plurallanguages: [value]gpt-live-transcribereceives plurallanguages: [value]Risk
Low. Existing callers that do not set
languageorpromptproduce 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.