This demo is using Multimodal Live API feature of Gemini 2.0 and Gradio WebRTC
create a new environment and follow this command
pip install -r requirements.txt
python main.py
uv run main.py
Thank you @freddyaboulton who create a demo of pure python here https://github.com/GoogleCloudPlatform/generative-ai/pull/1551/files
See documentation of google-genai library here https://github.com/googleapis/python-genai