Repository navigation
Studio: keep an audio model's reply text beside its player (extracted from #6527) - #11074
donaldfilimon wants to merge 4 commits into
Conversation
The non-streaming audio path renders only <audio-player> and drops result.choices[0].message.content on the floor. The model returns both -- the clip and the text it spoke -- and the text is the half that is searchable, copyable, readable on a muted device, and available to a screen reader. Show the player above it, which is how a message with an attachment already reads elsewhere in the thread. A reply with no text renders exactly as before. Extracted from PR #6527, where it was one hunk inside a much larger branch; it is independent of the voice conversation mode and of every other part of it. Co-authored-by: Bardia Koopah <[email protected]> Co-authored-by: LeoBorcherding <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01TSaSnTn9AUf4wPbCaTTykW
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4a88a5b8d
ℹ️ 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".
The adapter now keeps the reply text beside the player tag, but the Markdown renderer short-circuited on the tag and returned only the AudioPlayer, so the transcript was stored and never shown. The tag is split out before the text reaches the Markdown pipeline (a React-free helper, so it is unit-testable) and the player renders above the remaining text; a clip-only reply renders exactly as before. The conversation export already replaced the tag in place and kept the surrounding text, so it needed nothing. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aeadd322f9
ℹ️ 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".
…ks, whole choices[0].message.content was a diagnostic label, '[Generated audio from: "<text[:100]>"]', which the chat now renders under the player and keeps in history. It is the spoken text itself now. The adapter drops the old label if an older backend still sends it, so it is never shown as something the assistant said. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…nd's label The previous commit changed /audio/generate to answer with the spoken text but landed without its test or the adapter's guard. This adds both: the route test asserts a 200-character prompt comes back whole, and spokenReplyText drops the old '[Generated audio from: ...]' label if an older backend still sends it, so diagnostic text is never rendered as the assistant's words. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Summary
One hunk extracted from #6527 by @BardiaKoopah and @LeoBorcherding, rebased onto current
mainas offered in this comment. It is independent of the voice conversation mode in #10373 and of the benchmark in #10374, so it is its own PR.The non-streaming audio path in
chat-adapter.tsrenders only<audio-player>and dropsresult.choices[0].message.content. An audio model answers with both the clip and the text it spoke, and the text is the half that is searchable, copyable, readable on a muted device, and available to a screen reader. This renders the player above that text, the way a message with an attachment already reads elsewhere in the thread. A reply with no text renders exactly as before.Eight lines, one file. The credit is theirs; this PR exists so the hunk can land without the rest of #6527.
Test plan
npm run typecheckclean on the rebased branch (d4a88a5, one commit on71d85d5bb)npm test: 7713 passed, 0 failed🤖 Generated with Claude Code