ViaAnthroposBenevolentia/gemini-2-live-api-demo
关于
Vanilla JS web interface for Gemini 2.0 flash-exp Multimodal API with text, audio, camera, screen inputs and audio responses and function calling
设计与媒体可以做什么
- Real-time chat with Gemini 2.0 Flash Multimodal Live API
- Real-time audio responses from the model
- Real-time audio input from the user, allowing interruptions
- Real-time video streaming from the user's webcam
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Gemini 2.0 Flash Multimodal Live API Client
A lightweight vanilla JavaScript implementation of the Gemini 2.0 Flash Multimodal Live API client. This project provides real-time interaction with Gemini's API through text, audio, video, and screen sharing capabilities.
This is a simplified version of Google's original React implementation, created in response to this issue.
Live Demo on GitHub Pages
Key Features
- Real-time chat with Gemini 2.0 Flash Multimodal Live API
- Real-time audio responses from the model
- Real-time audio input from the user, allowing interruptions
- Real-time video streaming from the user's webcam
- Real-time screen sharing from the user's screen
- Function calling
- Transcription of the model's audio (if Deepgram API key provided)
- Built with vanilla JavaScript (no dependencies)
- Mobile-friendly
Prerequisites
- Modern web browser with WebRTC, WebSocket, and Web Audio API support
- Google AI Studio API key
python -m http.serverornpx http-serveror Live Server extension for VS Code (to host a server for index.html)
Quick Start
Get your API key from Google AI Studio
Clone the repository
git clone https://github.com/ViaAnthroposBenevolentia/gemini-2-live-api-demo.gitStart the development server (adjust port if needed):
cd gemini-2-live-api-demo python -m http.server 8000 # or npx http-server 8000 or Open with Live Server extension for VS CodeAccess the application at
http://localhost:8000Open the settings at the top right, paste your API key, and click "Save"
Get free API key from Deepgram and paste in the settings to get real-time transcript (Optional).
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
License
This project is licensed under the MIT License.
探索相关项目
加载中…