Skip to content

Feature: Live Voice Mode in /chat UI (Grok Voice Loop) #12911

Description

@haverAI

Summary

Replace the existing Mic button in the webchat UI (/chat) with a Live toggle that enables a real-time voice conversation loop between the user and the agent, powered by xAI's streaming voice API (Grok voice).

Current Behavior

  • The webchat has a Mic button (presumably for push-to-talk or speech-to-text input)
  • Agent responses are text-only in the chat interface
  • Voice calls require a separate phone call via Twilio

Proposed Behavior

When the user toggles Live mode ON:

  1. Agent completes work (text-based, normal tool use)
  2. Agent invokes Grok voice to give a spoken summary of what was done — audio plays directly in the chat UI
  3. User speaks back via browser microphone — speech is transcribed to text
  4. Transcribed text is sent as the next user message to the agent
  5. Loop continues — seamless voice conversation without leaving the chat

When Live mode is OFF, the chat behaves normally (text input/output).

Technical Considerations

  • Browser mic access via getUserMedia() / Web Audio API
  • Speech-to-text: Could use Deepgram (already configured), OpenAI Whisper, or browser Web Speech API
  • Text-to-speech / voice output: xAI streaming voice agent API (already configured in voice-call plugin streaming config) or ElevenLabs TTS (already configured in messages.tts)
  • UI: The Lit-based webchat already has ui/src/ui/voice.ts and ui/src/ui/views/voice.ts — may be able to extend existing voice infrastructure
  • WebSocket streaming: May need a new WS endpoint or extend the existing chat WS to carry audio frames
  • Fallback: If voice unavailable (no mic permission, etc.), gracefully fall back to text mode

UX Details

  • Rename "Mic" button to "Live" in the chat toolbar
  • Visual indicator when Live mode is active (pulsing icon, waveform, etc.)
  • Agent audio should auto-play in the chat (with user gesture to unlock audio context)
  • User's spoken words could optionally appear as text in the chat log for reference
  • Mute/unmute toggle while in Live mode

Why This Matters

This creates a truly conversational AI assistant experience — the agent works autonomously, then briefs you by voice, and you respond naturally by speaking. No switching between apps, no phone calls. It's the "hey Siri but it actually does complex work" experience.

Related Config

The voice infrastructure is already in place:

  • Voice-call plugin with xAI voice agent streaming
  • ElevenLabs TTS for text-to-speech
  • Deepgram STT configured for media understanding

This is about bringing that voice capability INTO the webchat UI rather than requiring a separate phone call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestimpact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions