# GENESIS VOICE BRIDGE PROTOCOL (V2.0)
> **Status**: GOLDEN / PRODUCTION
> **Date**: 2026-02-01
> **Artifact**: `core/templates/gemini_live_golden.py`

## 1. Core Logic (The "Wins")

### A. Smart HFP Pairing (Wireless Reliability)
**Problem**: Bluetooth Headsets appear as two devices (Stereo A2DP & Hands-Free HFP). Windows defaults Input to HFP but Output to A2DP. When Mic opens, A2DP is bandwidth-throttled, muting audio.
**Solution**:
1. Detect Active Input (User Default).
2. Scan Outputs for matching name + "Hands-Free" profile.
3. Explicitly bind PyAudio Output to that index.
```python
# Logic in gemini_live_golden.py
target_name = default_input['name'].split('(')[0]
if "Hands-Free" in output_info['name']: ...
```

### B. Low-Latency Barge-In (Interruption)
**Problem**: Cloud VAD is too slow. Agent keeps talking over user.
**Solution (Local VAD)**:
1. `_input_callback` calculates RMS (Volume) of every chunk.
2. If `RMS > 500` (User Speaking) -> Set `self.stop_playback = True`.
3. `_receive_responses` instantly stops writing to speakers if flag is True.
4. Flag resets when Model sends a new Turn.

### C. Conductor Sync (Unified Brain)
**Problem**: Voice Agent is "Headless" and unaware of Text Agent's intent.
**Solution (.tisktask/context.json)**:
1. Text Agent writes Context/Process ID to JSON.
2. Voice Agent spawns a background thread (`_monitor_conductor_context`) to watch file mtime.
3. Updates `SYSTEM_INSTRUCTION` or prints "Conductor Sync" log in real-time.

## 2. Deployment Instructions
To start a session:
```bash
python core/voice/gemini_live_session.py
```
*Note: Always use `taskkill /F /IM python.exe` before restarting to ensure single-channel exclusivity.*

## 3. Visual Capability
- **Tool**: `navigate_browser(url)`
- **Implementation**: Uses `webbrowser.open()` (Native/Visible) instead of Selenium/Headless.
- **Protocol**: "Show, Don't Just Tell". Open the URL first, then explain.
