Registration
VoiceSession interface
| Method | Description |
|---|---|
sendAudio(chunk: Uint8Array) | Send a raw PCM audio chunk (16-bit, 16kHz, mono) |
onTranscript(cb) | Register callback for transcription results |
onAudio(cb) | Register callback to receive synthesized audio |
close() | Tear down the session and release resources |
Audio format
Input and output: 16-bit PCM, 16 kHz sample rate, mono. Convert other formats before passing tosendAudio.
Error handling
Throw fromconnect() to signal that the provider cannot accept a session. The gateway falls back to text-only mode.