Skip to main content

Module realtime

Module realtime 

Source
Expand description

The speech-to-speech model abstraction. GeminiLive is the first impl.

See DESIGN.md “Trait contracts” + “Gemini Live protocol”. Audio in is 16 kHz PCM; audio out (in RealtimeEvent::AudioOut) is 24 kHz PCM for Gemini Live.

Re-exports§

pub use gemini_live::gemini_schema_subset;
pub use gemini_live::GeminiLive;
pub use service_adapter::ServiceRealtimeAdapter;

Modules§

gemini_live
Native Rust Gemini Live client (RealtimeLlm impl).
service_adapter
Bridge: RealtimeLlmService → RealtimeLlm + RealtimeKickoff.

Enums§

PollEvent
Result of a non-blocking RealtimeLlm::poll_event poll.

Traits§

RealtimeBackend
A boxable realtime backend: anything that is both a RealtimeLlm and a RealtimeKickoff. The blanket impl makes every such type qualify, and the Box<dyn RealtimeBackend> impls below let a consuming app’s build_realtime return ONE boxed type across providers (e.g. GeminiLive directly, or a connector wrapped in ServiceRealtimeAdapter) and still hand it to build_s2s_task — which is generic over RealtimeLlm + RealtimeKickoff. This is what keeps provider selection in the app a set of one-liners with no per-provider glue (the realtime analogue of the cascaded Box<dyn LlmService> factory).
RealtimeKickoff
The bot-first “kickoff” capability.
RealtimeLlm
A bidirectional, streaming speech-to-speech model session.