Through GenAI Processors' GenaiModel
cap (a poem) LiveProcessor
The module enables three-step integration:
- Environment Configuration: Settings
GOOGLE_API_KEY
cap (a poem)GOOGLE_PROJECT_ID
environment variable - preconfigured interface call: Using a built-in processor such as
live_model.LiveProcessor
Direct interface to Gemini Live API - streaming interaction: By
terminal_input()
Realize real-time conversations, or combine video/audio processors to build multimodal agents
Real-time voice agent example:live_agent = video.VideoIn() + LiveProcessor() + audio_io.PyAudioOut()
async for part in live_agent(text.terminal_input()):
play_audio(part)
This answer comes from the articleGenAI Processors: lightweight Python library supports efficient parallel processing of multimodal contentThe