Skip to content

@ottervoice/core

createVoiceSession(config) and createOtterVoiceSession(config) accept the same unified audio-turn configuration. The latter is only a more explicit alias.

Field Notes
mode half_duplex · full_duplex · push_to_talk · streaming_transcript
runtime Platform adapter
providers.audioLlm Required; a native speech model or server-composed voice stack
providers.asr Optional caption ASR when the audio-turn provider does not transcribe input
language Preferred ASR language
asrPartial Emit asr_partial (default true)
turnDetection VAD while listening
interruptionDetection Stricter VAD during playback
policy Auto-listen, barge-in, false-interrupt recovery
audioLlmSystemPrompt / audioLlmMaxTokens Trusted Node/server sessions only; browser standard mode injects them at the gateway
audioLlmStartTiming after_audio for parallel low latency; default after_asr_final

Core talks to one audio-turn provider. That provider may be one native speech model or a server-composed ASR → LLM → TTS stack. With transcribesInput: true, Core commits the provider’s input transcript as asr_final; otherwise configure a separate caption ASR.

Full fields: API reference. Source: types.ts.

Low-level LLMProvider and TTSProvider contracts remain available for trusted backends implementing a composite AudioLLMProvider; they are no longer VoiceSessionConfig.providers slots. Browser/app integrations should use server-managed providers and keep business and cost policy at their gateway.

Field Default (resolved) Meaning
strategy hybrid volume · manual · hybrid
minSpeechMs 500 Voiced time before speech starts
silenceTimeoutMs 1200 Silence before end-of-turn (try 350–600 for latency)
maxTurnMs 120000 Hard turn cap
volumeThreshold 0.02 RMS threshold
Field Meaning
autoStartListening Enter listening after start
allowInterruption Allow barge-in
interruptionTailIgnoreMs Ignore speaker tail after a tentative pause (default 200)
falseInterruptionSilenceMs / TimeoutMs False-interruption recovery window
interruptionCooldownMs Cooldown after resuming playback
postPlaybackVadRearmMs Wait for a quiet baseline after playback (default 300)
await session.start();
await session.finish();
await session.dispose();

Events: events guide. Error codes and usage live on VoiceSessionEventMap.