From 1ab1cd1014f82fae30798fa152c81dbebcd1ed9a Mon Sep 17 00:00:00 2001 From: Adrian Czerwiec Date: Sat, 28 Mar 2026 18:05:51 +0100 Subject: [PATCH] add better readme --- gemini-demo/README.md | 55 ++++++++-------------------------- gemini-demo/web/vite.config.ts | 2 ++ 2 files changed, 14 insertions(+), 43 deletions(-) diff --git a/gemini-demo/README.md b/gemini-demo/README.md index dfe6ef8..65f7bd3 100644 --- a/gemini-demo/README.md +++ b/gemini-demo/README.md @@ -1,57 +1,26 @@ -# Gemini Demo +# Gemini Live x Fishjam Cloud Demo -A minimal example of a video call with a Gemini Live AI agent using Fishjam Cloud. +A video call where you can invite a Gemini Live AI agent into the room. The agent hears everyone, sees your camera, responds with voice, and can search the web for real-time answers. Participants can customize the agent's behavior with a system prompt. -## What it does +## Running locally -- Create a room and join a video call -- Spawn a Gemini Live voice agent with a custom system prompt -- The agent joins the call, listens to participants, and responds with voice -- Supports Google Search for real-time information +1. Copy `.env.example` to `.env` and fill in your Fishjam and Gemini credentials: -## Setup - -1. Copy `.env.example` to `.env` and fill in your credentials: - -``` +```bash cp .env.example .env ``` 2. Install dependencies: -``` -cd backend && npm install -cd ../web && npm install +```bash +yarn install ``` -3. Start the backend: +3. Start the backend and frontend in separate terminals: -``` -cd backend && npm run start -``` - -4. Start the frontend (in another terminal): - -``` -cd web && npm run start +```bash +cd backend && yarn start +cd web && yarn start ``` -5. Open http://localhost:5173 - -## Architecture - -``` -backend/src/main.ts - Fastify + tRPC server, Fishjam SDK, Gemini Live API -web/src/App.tsx - React frontend with Fishjam React Client -web/src/trpc.ts - tRPC client setup -``` - -### Audio flow - -``` -Peer audio (16kHz) → Fishjam Agent → Gemini Live API - ↓ - Fishjam Agent Track ← Gemini response (24kHz) - ↓ - All peers hear the agent -``` +4. Open http://localhost:5173 diff --git a/gemini-demo/web/vite.config.ts b/gemini-demo/web/vite.config.ts index 46a2eb8..cc73e59 100644 --- a/gemini-demo/web/vite.config.ts +++ b/gemini-demo/web/vite.config.ts @@ -1,8 +1,10 @@ +import path from "path"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [react()], + envDir: path.resolve(__dirname, ".."), server: { proxy: { "/api": {