{"id":26742334,"url":"https://github.com/greathayat/google-gemini-live","last_synced_at":"2026-04-17T01:31:52.397Z","repository":{"id":284845149,"uuid":"956244729","full_name":"GreatHayat/google-gemini-live","owner":"GreatHayat","description":"A repository to learn the implementation of Google Gemini Live API for text and audio Chat.","archived":false,"fork":false,"pushed_at":"2025-03-28T00:20:00.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T01:24:28.066Z","etag":null,"topics":["fastapi","gemini","gemini-api","gemini-live","gemini-realtime","google-ai","google-ai-studio","google-gemini","python","reactjs","websockets"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GreatHayat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-27T23:50:45.000Z","updated_at":"2025-03-28T00:22:11.000Z","dependencies_parsed_at":"2025-03-28T01:35:30.809Z","dependency_job_id":null,"html_url":"https://github.com/GreatHayat/google-gemini-live","commit_stats":null,"previous_names":["greathayat/google-gemini-live"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Fgoogle-gemini-live","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Fgoogle-gemini-live/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Fgoogle-gemini-live/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Fgoogle-gemini-live/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GreatHayat","download_url":"https://codeload.github.com/GreatHayat/google-gemini-live/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978283,"owners_count":20703678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","gemini","gemini-api","gemini-live","gemini-realtime","google-ai","google-ai-studio","google-gemini","python","reactjs","websockets"],"created_at":"2025-03-28T06:17:32.736Z","updated_at":"2026-04-17T01:31:52.360Z","avatar_url":"https://github.com/GreatHayat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 Real-Time Gemini Live API Chat Application\n\nThis repository contains a **FastAPI backend** and a **ReactJS frontend** that enables **real-time chat** with Gemini AI, supporting both **text-based** and **text-to-audio** interactions.\n \n---\n \u003cimg width=\"1440\" alt=\"Screenshot 2025-03-28 at 5 17 52 AM\" src=\"https://github.com/user-attachments/assets/7a034b4b-a86d-4a03-a611-a3b582535be9\" /\u003e\n\n \n## 🚀 Features\n\n✅ **Real-time Text Chat (`/`)** – Chat with Gemini AI via text.  \n✅ **Real-time Text-to-Audio Chat (`/audio-chat`)** – Receive AI-generated audio responses.  \n✅ **Streaming Audio Chunks** – Immediate audio playback as chunks arrive.  \n✅ **FastAPI Backend** – Handles WebSocket communication and integrates with Gemini API.  \n✅ **ReactJS Frontend** – A user-friendly interface for seamless AI interaction.  \n\n---\n\n## 📌 Prerequisites\n\n- **Python 3.7+**\n- **Node.js \u0026 npm (for React)**\n- **A valid Gemini API Key**\n\n---\n\n## 🛠 Setup Instructions\n\n### 🔹 Backend (FastAPI)\n\n1️⃣ **Clone the repository**  \n```bash\ngit clone \u003crepository_url\u003e\ncd \u003crepository_directory\u003e/backend\n```\n\n2️⃣ **Create and activate a virtual environment**  \n```bash\npython3 -m venv venv  \nsource venv/bin/activate  # macOS/Linux  \nvenv\\Scripts\\activate  # Windows  \n```\n\n3️⃣ **Install dependencies**  \n```bash\npip install -r requirements.txt\n```\n\n4️⃣ **Set the Gemini API Key**  \n```bash\nexport GEMINI_API_KEY=\"your_api_key\"  # macOS/Linux  \nset GEMINI_API_KEY=\"your_api_key\"  # Windows  \n```\n\n5️⃣ **Run the FastAPI server**  \n```bash\nuvicorn main:app --reload --port 5001\n```\n📍 Backend will be available at **http://127.0.0.1:5001**.\n\n---\n\n### 🔹 Frontend (ReactJS)\n\n1️⃣ **Navigate to the frontend directory**  \n```bash\ncd ../frontend\n```\n\n2️⃣ **Install dependencies**  \n```bash\nnpm install\n```\n\n3️⃣ **Run the React application**  \n```bash\nnpm run dev\n```\n📍 Frontend will be available at **http://localhost:5173**.\n\n---\n\n## 🎯 How to Use\n\n### **1️⃣ Start the backend \u0026 frontend**\nMake sure both are running before testing.\n\n### **2️⃣ Open the app in your browser**\nVisit `http://localhost:5173`.\n\n### **3️⃣ Choose a chat mode**\n- **Text Chat (`/`)** – Type a message and send it.\n- **Audio Chat (`/audio-chat`)** – Enter a message and receive AI-generated speech.\n\n---\n\n## 🔑 Environment Variables\n\n- **`GEMINI_API_KEY`** – Required to access the Gemini API.\n\n---\n\n## ⚠️ Important Notes\n\n- Ensure your Gemini API key is **active** and has the correct **permissions**.\n- Adjust WebSocket URLs in the React app if running the backend on a different host/port.\n- Audio streaming relies on **AudioContext API** (ensure browser compatibility).\n- In production, consider implementing **security \u0026 authentication**.\n\n---\n\n## 💡 Contributing\n\nWant to improve this project? **Pull requests are welcome!** 🚀  \nFor issues or suggestions, feel free to open a discussion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreathayat%2Fgoogle-gemini-live","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreathayat%2Fgoogle-gemini-live","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreathayat%2Fgoogle-gemini-live/lists"}