H-6763: Add OpenAI Realtime voice input to Brunch - #9356
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
cf09c5c to
7c04220
Compare
3152049 to
5b2cf27
Compare
7c04220 to
f27bfec
Compare
5b2cf27 to
3e9d09b
Compare
f27bfec to
20c3818
Compare
PR SummaryMedium Risk Overview Server: New Client: WebRTC session lifecycle, a half-duplex Dev/Vercel wiring, env/docs, and ADR note on using default server VAD during Realtime init are updated. Reviewed by Cursor Bugbot for commit 824f0a9. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 20c3818. Configure here.
Initialize transcription-only WebRTC sessions through an app-owned, fail-closed server boundary. Admit only stable finalized transcript items through the existing Petrinaut composer and Brunch transport, with half-duplex lifecycle, stale-event rejection, correction handling, preview gating, and accessible controls. Amp-Thread-ID: https://ampcode.com/threads/T-01a03fb3-fd3d-737f-b4c6-1fc9282950bf Co-authored-by: Amp <amp@ampcode.com>
Keep the voice controller live across React Strict Mode effect replays. Send OpenAI's unified call fields as strings, preserve the SDP terminator, accept its text SDP response, and use provider-default VAD so the microphone reaches the listening state.
Co-authored-by: Cursor <cursoragent@cursor.com>
20c3818 to
824f0a9
Compare


🌟 What is the purpose of this PR?
Add disabled-by-default OpenAI Realtime voice input to Brunch inside the Petrinaut website. OpenAI transcribes microphone audio; each completed transcript is submitted through Petrinaut's generic composer API and the existing AI SDK/Brunch transport.
Brunch remains authoritative for tools, pending asks, evidence, completion, and projection. OpenAI is used only for transcription in this PR.
🔗 Related links
🚫 Blocked by
🔍 What does this change?
/v1/realtime/calls.gpt-live-transcribewith English process-modeling vocabulary and semantic VAD at low eagerness.brunch_askremains correlated and receives the answer through its tool call.Stack record: direct base
3152049cabe28aed98c4e80560366f16fcaae0e4; PR head7c042206e919b80ef27ce46649bfe5202005b27c.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
No existing documentation screenshot covers the new voice control.
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?
Validation run
Results: 214 Petrinaut tests, 49 website tests, 12 transport tests, and 35 Brunch tests passed. Lint, typecheck, build, formatting, and architecture-doc checks passed. Transport emitted 4 inherited
no-await-in-loopwarnings and Brunch emitted 12 inherited warnings.The direct-base no-ElevenLabs audit and
git diff --checkpassed. No package manifest or lockfile changed.Credential-dependent checks not run: live WebRTC negotiation, representative-audio semantic VAD, one finalized item reaching remote Brunch/pending ask, live reconnect rejection, desktop Chrome/Edge/Safari accessibility, and deployed production unavailability.
❓ How to test this?
yarn workspace @apps/petrinaut-website test:unitplus its lint, typecheck, and build commands above.PETRINAUT_OPENAI_VOICE_ENABLED=true, a dedicated server-sideOPENAI_VOICE_API_KEY, and a real Brunch endpoint, start voice input and speak one answer.📹 Demo
Not included: a meaningful demo requires provider credentials, microphone permission, and the remote Brunch environment described above.