Architecture
OtterVoice is a voice-session orchestration SDK, not a model gateway. Core owns state, turns, barge-in, and usage; platform audio and models are injected.
Application UI ↕ events / commands@ottervoice/core VoiceSession · state machine · VAD · barge-in · usage ↕ RuntimeAdapter ↕ Provider interfacesruntime-web | rn | node ASR · LLM · TTS · Audio LLMBoundaries
Section titled “Boundaries”| Layer | Owns | Does not own |
|---|---|---|
| UI | Events, captions, start / finish |
Provider URLs, secrets, wire protocols |
| Core | State machine, turns, interruption, usage, errors | DOM / Expo / Node APIs |
| Runtime | Mic, playback, optional network/storage | Prompts, model choice |
| Provider | Vendor protocols | Session lifecycle |
Pipelines
Section titled “Pipelines”asr_llm_tts(default): ASR text → streaming LLM → TTS.audio_llm: ASR supplies captions while turn audio enters an Audio LLM; useaudioLlmStartTimingto run both in parallel or wait forasr_final. Text and PCM stream back.
Create the session once at the composition root. Swap runtime or providers without rewriting UI.