百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gemini-2-live-api-demo

> 编程语言
开源

Gemini 2.0 flash-exp 的 Vanilla JS Web 界面 具有文本、音频、摄像头、屏幕输入和音频响应以及函数调用的多模式 API

387 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

Gemini 2.0 flash-exp 的 Vanilla JS Web 界面 具有文本、音频、摄像头、屏幕输入和音频响应以及函数调用的多模式 API

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

Live Demo

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.server or npx http-server or Live Server extension for VS Code (to host a server for index.html)

Quick Start

  1. Get your API key from Google AI Studio

  2. Clone the repository

    bash
    git clone https://github.com/ViaAnthroposBenevolentia/gemini-2-live-api-demo.git
  3. Start the development server (adjust port if needed):

    bash
    cd gemini-2-live-api-demo
    python -m http.server 8000 # or npx http-server 8000 or Open with Live Server extension for VS Code
  4. Access the application at http://localhost:8000

  5. Open the settings at the top right, paste your API key, and click "Save"

  6. 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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptfunction-callinggemini-apigemini-flashgoogle-api

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言