root

Nexus Voice VS Code Extension

Nexus Voice VS Code Extension

Overview

VS Code extension that provides audio playback for AI voice responses. Runs as a background service with auto-open UI.

Current Version: 1.7.1 Location: /home/nexus/.config/systemd/user/.cache/voice-extension/

Architecture

Background WebSocket Connection

  • WebSocket lives in extension background process (Node.js)
  • Stays connected regardless of UI visibility
  • Audio plays even when browsing files or in Explorer view
  • Reconnects automatically on disconnect

Audio Queue System

  • Messages queue for sequential playback
  • Minimal gaps between audio clips
  • Queue keeps advancing even when muted
  • Handles multiple paragraphs from single voice call

Auto-Open Behavior

  • Sidebar auto-opens on EVERY voice message
  • Buffers messages before webview is ready
  • Sends buffered messages once webview initializes

UI Components

  • Title: "Nexus Voice"
  • Version display
  • Mute button (🔊/🔇)

Status Display

  • Connected: "✓ Connected - Ready"
  • Disconnected: "✗ Disconnected"
  • Muted: "🔇 Muted - audio still playing"

Message Display

  • Shows last 5 voice messages
  • Displays queue position [Q1/3], [Q2/3], etc.
  • Messages visible even when muted

Mute Functionality (v1.7.1)

Behavior: - Mute sets volume = 0, does NOT pause audio - Audio continues playing silently in background - Queue keeps advancing through all messages - Unmute sets volume = 1.0 - You hear wherever the stream currently is (like muting a TV)

Why This Design: - User can mute during a meeting but stay synced - No need to "catch up" on missed audio - Messages still visible for reading - Seamless unmute experience

Server URL Detection

Auto-detects based on VS Code remote host: - vs.corlera.comhttps://voice.corlera.com - andrew.mheata.comhttps://andrew.mheata.com/voice - bri.mheata.comhttps://bri.mheata.com/voice - vs.mheata.comhttps://vs.mheata.com/voice - Manual override via claudeVoice.serverUrl setting - Fallback: http://localhost:8765

Configuration Options

{
  "claudeVoice.serverUrl": "",      // Manual override
  "claudeVoice.tailscaleIP": "",    // Legacy
  "claudeVoice.port": "8765"        // Legacy
}

File Structure

voice-extension/
├── extension.js          # Main extension code
├── package.json          # Extension manifest
├── node_modules/         # Dependencies (socket.io-client)
└── nexus-voice-*.vsix    # Built extension packages

Building & Installing

# Build VSIX
cd /home/nexus/.config/systemd/user/.cache/voice-extension
npx vsce package

# Install
code --install-extension nexus-voice-1.7.1.vsix

Version History

Version Changes
1.7.1 Fixed mute - now sets volume to 0 instead of pausing
1.7.0 Added mute/unmute button
1.6.0 Audio queue for sequential playback
1.5.0 First-message buffering fix
1.4.x Background WebSocket architecture

Integration with Voice MCP Server

  1. AI calls voice.voice({paragraphs: [...]})
  2. MCP server generates audio via ElevenLabs (parallel)
  3. MCP server POSTs to WebSocket bridge (port 8765)
  4. Bridge emits to VS Code extension via Socket.IO
  5. Extension queues audio and plays sequentially
  6. User sees messages and hears audio (unless muted)
ID: 754d3e7c
Path: Nexus Voice VS Code Extension
Updated: 2026-01-13T12:51:22