Architecture/docs-site/
v2Gemini/SORA

Architecture

End-to-end audio path, sidecar flow, SORA helper layer, and lifecycle of the Gemini Live Discord voice bridge.

System map

Discord voice user
  ↓
Discord Voice UDP
  ↓ Opus decode / discord-ext-voice-recv
48 kHz PCM stereo
  ↓ downsample
16 kHz PCM mono
  ↓ WebSocket
Gemini Live model
  ↓ 24 kHz PCM mono
48 kHz PCM stereo
  ↓ Discord AudioSource
Discord Voice

Manual screenshot / feeder → local sidecar 127.0.0.1:18943 → Gemini Live
SORA helpers → preflight · grill · goal synth · redact → Hermes tools

Audio path

Discord Voice (Opus)
    ↓ discord-ext-voice-recv decode
48 kHz PCM stereo (16-bit)
    ↓ VoiceListener / downsample
16 kHz PCM mono
    ↓ Gemini Live WebSocket input
Gemini Live API
    ↓ Gemini Live WebSocket output
24 kHz PCM mono (PCM16)
    ↓ LiveAudioSource / upsample
48 kHz PCM stereo
    ↓ Discord AudioSource
Discord Voice (Opus encode)

The important correction: input to Gemini is 16 kHz mono PCM; output from Gemini is 24 kHz mono PCM; Discord playback is 48 kHz stereo.

Sidecar path

The sidecar is local-first and is meant for the plugin, the frame feeder, and local diagnostics, not public internet traffic.

RoutePurpose
GET /healthBridge health, metrics, connection state.
POST /framePush a JPEG/PNG/WebP frame into Gemini Live.
GET /say?text=...Inject text into the live Gemini session.
GET /notes?limit=50Read recent notes/transcript events.
GET/POST /notifyTrigger notification breakout.
GET /stop / GET /leaveStop the active bridge.

SORA helper layer

Transcript / live call notes
        ↓
sora_redact          → strips tokens/webhooks/JWTs before reuse
        ↓
sora_live_grill      → forces objective, constraints, owner, risk, next command, verification test
        ↓
sora_goal_synth      → emits Discord-safe /goal and /subgoal blocks
        ↓
weaker model / autonomous agent / Discord operator handoff

SORA bridge elements are helper tools, not Vapi, Dograh, or MCP support.

Integration boundaries

SystemBoundary
Gemini LivePrimary transport in this repository.
SORAHelper layer imported into Gemini bridge; not a replacement transport.
VapiSibling transport if installed elsewhere; not bundled here.
MCPResearch/adapter target; no first-class MCP server/client in this repo yet.
DograhExternal comparison/integration target; not bundled here.