base
diapason.speech.realtime.base
¶
Abstract realtime voice session.
RealtimeVoiceSession
¶
Bases: ABC
Provider-agnostic duplex voice session.
close()
abstractmethod
async
¶
Tear down the provider connection.
connect()
abstractmethod
async
¶
Open the provider connection and finish setup.
events()
abstractmethod
¶
Async iterator of normalized session events.
interrupt()
abstractmethod
async
¶
Cancel current model speech (barge-in).
send_audio(pcm16)
abstractmethod
async
¶
Send a chunk of mono PCM16 at input_sample_rate.
send_text(text)
abstractmethod
async
¶
Optional text turn (debug / typed barge).
SessionEvent
dataclass
¶
Normalized event emitted by a provider session toward the UI.