Work / Real-time voice avatar engine / 2026

openvideo

A browser engine where you talk to a 3D avatar that answers with lip sync, emotion cues and lets you interrupt it mid-sentence.

Role
Solo. Protocol, server, web client
Status
In development
Stack
TypeScript, WebSockets, Deepgram Nova-3 and Aura-2, OpenRouter, Vitest
Link
Private for now

The boundary

Stays inside

  • Provider keys for STT, LLM and TTS
  • Persona and system prompt
  • Turn metrics

Allowed to cross

  • 16 kHz PCM from the mic
  • Final transcripts
  • Audio segments with word timings

The browser holds no credentials. It sends sound and gets sound back.

Context

Voice agents feel slow because each stage waits for the last, and they talk over you because nothing listens while they speak.

Idea

Stream every stage. LLM text is cut at soft punctuation into segments of up to 220 characters, each sent to TTS as it arrives. Two spoken words from the user abort the reply and rewrite it as interrupted.

Craft

  1. A shared protocol package defines JSON headers paired with binary PCM frames, paced in real time.
  2. Cue tags like [e:emotion g:gesture] are parsed out of the model text and timed to the audio.
  3. Metrics log the gaps that matter: final transcript to first token, first segment and first audio.
  4. Falls back to a pulsing orb when no avatar model is present.

Threat model

AssetThreatControl
Provider API keysExposure in client codeServer side only, behind the WebSocket
System promptOverride from the clientPersona is server owned
SpendRunaway generationBarge-in aborts the stream; context compaction

Outcome

A working monorepo with server, web client, protocol and test harness, including Deepgram TTS integration under tests.