Skip to content

FE-1749: Add Brunch voice selection, previews, and device routing - #9768

Open
kostandinang wants to merge 17 commits into
ka/fe-1749-petrinaut-voice-audio-settingsfrom
ka/extended-voice-audio-settings
Open

kostandinang wants to merge 17 commits into
ka/fe-1749-petrinaut-voice-audio-settingsfrom
ka/extended-voice-audio-settings

Conversation

@kostandinang

@kostandinang kostandinang commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Note

Depends on #9774, which contains the generic Petrinaut voice-audio controls. This PR contains the Brunch and website implementation.

🌟 What is the purpose of this PR?

Implement extended Brunch/Petrinaut Voice settings without crowding the conversation. Keep microphone mute separate from app-output mute and volume, and provide provider-specific voice selection, static previews, browser-device routing, and persistence through Petrinaut's Audio options.

🔍 What does this change?

  • Persist provider-specific voice choices and validate them at both session-creation endpoints.
  • Preview selected voices from versioned static assets without provider requests or microphone audio.
  • Route microphones with getUserMedia/replaceTrack and speakers with setSinkId/selectAudioOutput where supported.
  • Recover disconnected devices to system defaults while preserving mute and volume state.
  • Forward Realtime speaking speed for the next response without interrupting current playback.
  • Keep existing Brunch conversation and transcription behavior unchanged.

🔗 Related links

🚫 Blocked by

⚠️ Known issues

  • Physical-device routing, permission rejection, unplug/reconnect, and spoken-conversation behavior remain unverified on real hardware.
  • Output-device selection depends on browser support and permission. Numeric speaking speed is Realtime-only.
  • Local tests use NODE_OPTIONS=--no-experimental-webstorage because Node 26's built-in storage otherwise overrides jsdom storage.

🛡 What tests cover this?

  • 227 focused website tests covering provider forwarding, voice persistence and previews, device routing and recovery, permissions, concurrency, and both Voice providers.
  • @apps/petrinaut-website TypeScript checks.
  • The original combined PR passed the full CI suite before this reviewer-oriented split.

❓ How to test this?

NODE_OPTIONS=--no-experimental-webstorage yarn workspace @apps/petrinaut-website test:unit \
  src/main/app/voice-interview/live-conversation-control.test.tsx \
  src/main/app/voice-interview/live-conversation.test.ts \
  src/main/app/voice-interview/openai-realtime-session.test.ts \
  src/main/app/voice-interview/voice-audio-settings.test.ts \
  src/main/app/voice-interview/voice-audio-settings/preview.test.ts \
  src/main/app/voice-interview/voice-interview-control.test.tsx \
  src/server/voice/openai-live-session.test.ts \
  src/server/voice/openai-realtime-call.test.ts
yarn workspace @apps/petrinaut-website lint:tsc

For manual validation, configure Brunch Voice, start a Live session, and open Audio options. Mute the microphone before selecting a voice preview; verify output mute/volume, device selection and fallback, status visibility, and next-session voice application. Repeat with the Realtime provider and verify that speed changes affect the next response.

Pre-Merge Checklist 🚀

📹 Demo

live-demo.mp4

Live mode mixer controls demo

live-mixer-controls-demo.mp4

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Sep 18, 2026 6:29pm UTC
petrinaut Ready Ready Preview Sep 18, 2026 6:29pm UTC
petrinaut-docs Ready Ready Preview Sep 18, 2026 6:29pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 18, 2026 6:29pm UTC

Request Review

@CLAassistant

CLAassistant commented Sep 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps area/apps > hash.design Affects the `hash.design` design site (app) labels Sep 17, 2026
@kostandinang kostandinang changed the title Add extended Brunch voice audio settings FE-1749: Add extended Brunch voice audio settings Sep 17, 2026
@kostandinang kostandinang self-assigned this Sep 18, 2026
kostandinang and others added 2 commits September 18, 2026 18:23
Co-authored-by: Kostandin Angjellari <ka@hash.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8cabbd0. Configure here.

this.#releaseMeterResources();
}
}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Meter dies after microphone switch

Medium Severity

replaceMicrophone calls #syncMicrophoneTrack before destroying the meter, then rebuilds the AudioContext without starting sampling again. After a device switch while the mic is live, #startMeter never runs, so microphoneLevel stays at 0 and the dock waveform freezes until a later turn-state change.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8cabbd0. Configure here.

kostandinang and others added 2 commits September 18, 2026 18:38
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
kostandinang and others added 2 commits September 18, 2026 18:52
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kostandinang
kostandinang added this pull request to stack #9773 September 18, 2026 18:08
kostandinang and others added 2 commits September 18, 2026 19:19
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the Brunch implementation stacked on the Petrinaut controls while preserving the existing pull request history.
@kostandinang
kostandinang removed the request for review from kube September 18, 2026 18:20
@kostandinang
kostandinang removed this pull request from stack #9773 September 18, 2026 18:21
@kostandinang kostandinang changed the title FE-1749: Add extended Brunch voice audio settings FE-1749: Add Brunch voice selection, previews, and device routing Sep 18, 2026
@kostandinang
kostandinang changed the base branch from main to ka/fe-1749-petrinaut-voice-audio-settings September 18, 2026 18:21
@github-actions github-actions Bot removed area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps > hash.design Affects the `hash.design` design site (app) labels Sep 18, 2026
@kostandinang
kostandinang added this pull request to stack #9775 September 18, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants