from ai_infra.llm import RealtimeVoiceHigh-level facade for real-time voice conversations. Automatically selects the best available provider based on environment configuration, or allows explicit provider selection. Provider Selection Order: 1. Explicit provider passed to constructor 2. REALTIME_VOICE_PROVIDER environment variable 3. First configured provider (OpenAI -> Gemini)
config: The realtime configuration for voice sessions. provider: The underlying realtime provider instance.
>>> # Auto-select provider >>> voice = RealtimeVoice() >>> >>> # Explicit provider >>> voice = RealtimeVoice(provider="openai") >>> >>> # Custom config >>> config = RealtimeConfig(model="gpt-4o-realtime-preview") >>> voice = RealtimeVoice(config=config)