Repository navigation
feat(openai): support saved GPT-Live voices - #175940
ptahdunbar wants to merge 10 commits into
Conversation
Support prompt-created voice references in GPT-Live sessions.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR translates existing speakerVoiceId settings into saved OpenAI voice references for public GPT-Live sessions. Example: Set talk.realtime.model to gpt-live-1 and talk.realtime.speakerVoiceId to voice_Demo123.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it supplies a distinct missing capability, fixes both previous findings, and passes current-head CI; no new actionable code defect was found. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherTalk and channel callers supply voice settings to the OpenAI plugin, which selects the upstream session configuration and returns a browser reservation or server-owned audio bridge. flowchart LR
A[Talk or channel settings] --> B[Shared provider resolution]
B --> C[OpenAI voice normalization]
C --> D[Session voice validation]
D --> E[WebRTC broker or WebSocket bridge]
E --> F[OpenAI Live API]
E --> G[Browser reservation]
Technical reviewBest possible solution: Support saved voices through the existing OpenAI provider owner while preserving named-voice defaults and validating references at session creation. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically replaces saved voice IDs with named defaults; no target code or live provider call was executed during this read-only review. Is this the best way to solve the issue? Provider-local translation uses the correct existing owner, and the revised implementation covers the string overrides supplied by Talk and Discord without adding core or SDK machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b5ac9a9b10c5. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +90, Tests +173, Docs +8. Total +271 across 13 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 18, 2026, 8:29 PM ET / October 19, 2026, 00:29 UTC (Revision 2). |
Talk and Discord flatten speakerVoiceId into the shared string voice override before the OpenAI provider sees it, so saved GPT-Live voice IDs reached the named-voice allowlist and silently fell back to marin. Recognize OpenAI's `voice_` IDs inside that string, keep their case, and translate them to the saved voice reference at the provider boundary. Whitespace-only named voices normalize to unset again instead of failing as malformed saved references. Saved voices on models other than gpt-live-1, including request-level overrides, fail before session creation.
…t-live-voice-object # Conflicts: # extensions/openai/realtime-quicksilver-session-lifecycle.test.ts # extensions/openai/realtime-voice-provider-routing.test.ts
Config normalization feeds Talk catalogs and readiness checks, so a mistyped speakerVoiceId must not reject those reads. Keep saved voice IDs as references during config normalization and validate them when a bridge or browser session is created. Detect the `voice_` prefix case-insensitively so a mistyped prefix fails closed instead of being lowercased into a different ID, and stop exporting the now-internal OpenAIGptLiveVoice type.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…x/issue-175909-gpt-live-voice-object # Conflicts: # extensions/openai/realtime-talk-defaults.test.ts # extensions/openai/realtime-voice-provider-factory.ts
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
Closing due to inactivity. |
Closes #175909
What Problem This Solves
OpenClaw cannot select an existing prompt-created GPT-Live voice. OpenAI requires saved voices as
{ "id": "voice_..." }, but Talk and Discord flattenspeakerVoiceIdinto the same plain stringvoicefield as named voices, so a saved ID reached the named-voice allowlist and silently fell back tomarin.User Impact
Operators can select a saved voice with
gpt-live-1throughtalk.realtime.speakerVoiceId,channels.discord.voice.realtime.speakerVoiceId, orspeakerVoiceIdin an OpenAI realtime provider block. Named voices keep their existing behavior and defaults. Saved voices on other models, and malformed IDs, fail session setup with a message that does not echo the configured value. Browser WebRTC reservations omit the ID.Why This Change Was Made
The OpenAI provider owns its voice identifiers, so the translation stays inside the plugin and needs no core or SDK change:
readOpenAIQuicksilverVoiceSettingrecognizes OpenAI'svoice_prefix (case-insensitively) in the shared string and keeps the ID's case. Config reads never throw, so Talk catalogs and readiness checks are unaffected by a typo.normalizeOpenAIQuicksilverVoiceInputvalidates the ID when a bridge or browser session is created;assertOpenAIGptLiveCustomVoiceModelrejects saved voices for models other thangpt-live-1, including request-level overrides.Behavior notes compared with main: a blank
speakerVoicenow falls through tospeakerVoiceId/voiceinstead of masking them, andspeakerVoiceIdin a provider block is read the same way Talk already reads it. Docs:docs/providers/openai/voice-and-speech.md.Evidence
Local, Node 24.21.0, repo Vitest wrapper (pinned Bun test runtime), on
c5cc8a53(merged with mainb1b3f500):node scripts/run-vitest.mjsover the 7 touched OpenAI realtime test files: 105/105 passed.voiceand the provider block reach the broker as{ id }; Discord's override shape through the realresolveConfiguredRealtimeVoiceProviderAsyncreachessession.startasaudio.output.voice = { id }; GA and Codex models reject saved voices before session creation or socket open; malformed and mistyped-prefix IDs fail with the exact non-echoing message; blankspeakerVoicestays unset.marin, missing{ id }, and a thrown custom-voice error respectively).tsgofor extensions and extension tests: passed.oxlinton the 12 changed files: passed.oxfmt --check: passed.node scripts/check-changed.mjs: all guards passed except two whole-tree checks that also fail on main: the max-lines suppression ratchet (threeui/files identical to main) and the Knip dead-export scan (99 entries in 32 files identical to main). The one entry from this PR (OpenAIGptLiveVoice) is fixed.realtime-quicksilver-peer-worker.test.ts: 3/3 local passes. The CI failure on3a66dc68(zero RTP packets in 10s) did not reproduce, the same test passed onae85e78d, and this PR does not touch that media code.Not proven: no live provider call was made. An end-to-end OpenClaw audio session with a real saved voice remains unverified; the earlier direct-provider check bypassed OpenClaw's configuration flow.
Known limitation: core's Talk gateway-relay presentation echoes the configured
speakerVoiceIdstring to the operator's client, as it already does for every provider's voice ID. Hiding it there needs a core change outside this plugin.References and documentation
session.audio.output.voice.id; prompt-generated voices work with GPT-Live only.