Skip to content

H-6763: Integrate voice mode into the AI assistant - #9467

Open
kostandinang wants to merge 6 commits into
kostandin/h-6763-gpt-realtime-2from
kostandin/h-6763-inline-voice-mode
Open

H-6763: Integrate voice mode into the AI assistant#9467
kostandinang wants to merge 6 commits into
kostandin/h-6763-gpt-realtime-2from
kostandin/h-6763-inline-voice-mode

Conversation

@kostandinang

Copy link
Copy Markdown

🌟 What is the purpose of this PR?

Unify text and voice inside the existing Petrinaut AI assistant transcript. Voice mode now uses the GPT Realtime migration from the parent PR while preserving the same conversation, Brunch context, and canonical message flow.

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Retires the separate Chat and Interview tabs and replaces the interview presentation contract with provider-neutral Voice mode controls.
  • Shows a waveform action when the composer is empty and the normal send action when text is present.
  • Renders the active voice session inline in the transcript with live speech, connection/listening/speaking states, a compact divider, and overflow controls.
  • Persists voice provenance on ordinary messages and interactive tool output without changing the canonical message path.
  • Pauses voice when the panel closes, resumes safely, and supports ordered typed handoff with draft and metadata rollback on failure.
  • Adds accessible throttled live announcements, keyboard-operable controls, and reduced-motion fallbacks.
  • Updates the user guide, integration documentation, changelog, and changeset for the unified experience.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • Voice remains a non-production preview and is disabled by server policy in production.
  • Physical-microphone behavior still needs validation in a preview deployment.

🐾 Next steps

  • Validate microphone quality, barge-in, panel pause/resume, and typed handoff with a physical device in preview.

🛡 What tests cover this?

  • yarn workspace @hashintel/petrinaut test:unit — 246 tests pass.
  • yarn workspace @apps/petrinaut-website test:unit — 103 tests pass.
  • Focused coverage includes dynamic composer actions, voice provenance, inline state and disclosure, pause/resume, typed handoff recovery, transcript continuity, accessibility announcements, and reduced motion.

❓ How to test this?

  1. Configure OPENAI_API_KEY, OPENAI_VOICE_API_KEY, PETRINAUT_OPENAI_VOICE_ENABLED=true, and VITE_BRUNCH_CHAT_ENDPOINT in apps/petrinaut-website/.env.local.
  2. Run turbo run dev and open http://localhost:5173.
  3. Open AI with an empty composer and select the waveform action; confirm the voice session appears inline in the current transcript.
  4. Speak and confirm provisional transcription, listening/speaking feedback, canonical Brunch messages, and voice provenance appear without duplicate messages.
  5. Close and reopen the AI panel; confirm voice pauses and can resume.
  6. Enter text while Voice mode is active; confirm the composer switches to Send and hands off to text cleanly.

📹 Demo

No static screenshot is attached because the primary behavior is animated and stateful; preview validation should capture a short interaction video.

Made with Cursor

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 31, 2026 11:09pm
petrinaut Ready Ready Preview Aug 31, 2026 11:09pm
petrinaut-docs Ready Ready Preview Aug 31, 2026 11:09pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Aug 31, 2026 11:09pm

Request Review

@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 Aug 31, 2026

Copy link
Copy Markdown
Author

kostandinang and others added 6 commits September 1, 2026 01:00
Keep text and voice in one conversation with inline controls, provenance, lifecycle recovery, and accessible live feedback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve failed speech for recovery and ensure every text-mode transition safely ends the active voice session before submission.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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 768e1f8. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/apps 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

Development

Successfully merging this pull request may close these issues.

1 participant