saharmor/gemini-multimodal-playground
소개
Build realtime voice and video agents with Google's new Gemini 2.0 (API is free for now)
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalGemini Multimodal Playground ✨
A Python application for having voice, video, and screen sharing conversations with Google's new Gemini 2.0 model. Features real-time voice, video, and screen-sharing input with audio responses. Available in two versions: a full-stack web application and a standalone Python script.
Full-Stack Version
Live Camera Stream
https://github.com/user-attachments/assets/a81abaa5-2e70-42a9-857c-5ffbff22f821
Live Screen Sharing
https://github.com/user-attachments/assets/925e3936-c2b8-4442-adf7-8dacd47f9f92
Getting Your Gemini API Key
- Go to Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy the generated API key and paste it into the appropriate .env file

Prerequisites
- Python 3.12 or higher
- Node.js 18 or higher
- A Google Cloud account
- A Gemini API key
Backend Setup
- Clone this repository
- Create a virtual environment and activate it:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install the required packages:
pip install -r requirements.txt
- Create a
.envfile in the root directory with your API key:
GEMINI_API_KEY=your_api_key_here
- Start the backend server:
python backend/main.py
Frontend Setup
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open http://localhost:3000 in your browser
Standalone Version
https://github.com/user-attachments/assets/82228033-fcfb-4730-9723-3ed09e1979a2
Prerequisites
Same as above, but only Python-related requirements are needed and Tkinter:
- On Ubuntu/Debian:
sudo apt-get install python3-tk - On Fedora:
sudo dnf install python3-tkinter - On macOS & Windows: Already included with Python
Installation
Clone this repository or download the standalone folder
Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the required packages:
pip install -r requirements.txt
- Create a
.envfile in the standalone directory with your API key:
GEMINI_API_KEY=your_api_key_here
Running the Standalone Application
- Make sure your virtual environment is activated
- Run the script:
python standalone.py
Configuration Options
Both versions provide several configuration options:
- System Prompt: The initial instructions given to Gemini about its role and behavior
- Input Mode: Choose your preferred input method:
- Video (webcam)
- Screen sharing
- Voice: Choose from different voice options for Gemini's responses:
- Puck
- Charon
- Kore
- Fenrir
- Aoede
- Enable Google Search: Allows Gemini to search the internet for current information
- Allow Interruptions: Enables interrupting Gemini while it's speaking
Troubleshooting
- Audio feedback loop issue - Gemini may interrupt itself when it detects its own voice output through your microphone. This occurs because the application processes all incoming audio, including Gemini's responses. To prevent this feedback loop, either:
- Disable the "Allow Interruptions" option in settings
- Use headphones/earphones to prevent your microphone from picking up Gemini's audio output
관련 프로젝트 살펴보기
불러오는 중…