bodhi-realtime-agent / AudioInputObserver
Type Alias: AudioInputObserver
AudioInputObserver = (
pcm,meta) =>void
Defined in: src/types/session-seams.ts:32
Receives each inbound client audio frame (PCM16) as it enters the session, before any routing or gating, from the local client WebSocket, the direct RTC audio plane, and VoiceSession.feedAudioFromClient. Register with VoiceSession.observeAudioInput.
pcm is the frame the session routes; treat it as read-only. A throw is reported through hooks.onError and does not stop the frame.
Parameters
pcm
Buffer
meta
sampleRate
number
Sample rate the session reads the frame at (clientAudioInputRate).
source
"websocket" | "rtc"
'rtc' for the direct RTC audio plane, 'websocket' otherwise.
Returns
void