Go to file
Filip's AI Agent 16bf681dc6 Removed banner.
2026-07-15 22:31:48 +02:00
public Unknown improvements. 2026-07-15 22:20:07 +02:00
src Removed banner. 2026-07-15 22:31:48 +02:00
.gitignore First working implementation. 2026-07-15 20:43:01 +02:00
eslint.config.js First working implementation. 2026-07-15 20:43:01 +02:00
index.html First working implementation. 2026-07-15 20:43:01 +02:00
package-lock.json First working implementation. 2026-07-15 20:43:01 +02:00
package.json First working implementation. 2026-07-15 20:43:01 +02:00
README.md First working implementation. 2026-07-15 20:43:01 +02:00
tsconfig.app.json First working implementation. 2026-07-15 20:43:01 +02:00
tsconfig.json First working implementation. 2026-07-15 20:43:01 +02:00
tsconfig.node.json First working implementation. 2026-07-15 20:43:01 +02:00
vite.config.ts First working implementation. 2026-07-15 20:43:01 +02:00

Relay

A fully client-side, real-time audio translator built on Gemini Live. Relay captures audio from a user-selected tab, window, or screen and streams 16 kHz PCM directly from the browser to gemini-3.5-live-translate-preview. Translated 24 kHz PCM audio and transcripts are rendered in the browser.

Run locally

npm install
npm run dev

Open the localhost URL, enter a Gemini API key, choose a target language, and click Share audio & translate. In the browser picker, select a source and explicitly enable audio sharing.

Browser requirements

  • A secure context (https:// or localhost)
  • navigator.mediaDevices.getDisplayMedia() with audio capture support
  • AudioWorklet and Web Audio
  • Chrome or Edge is recommended for tab/system audio sharing
  • Output-device selection appears only when HTMLMediaElement.setSinkId() is supported

Use headphones or a separate output device to prevent translated speech from being captured again. Relay also requests selfBrowserSurface: "exclude" where the browser supports it.

Privacy and key handling

There is no application backend. The WebSocket connects directly to Googles Gemini Live endpoint, and the Gemini API key is stored in localStorage under relay-gemini-api-key. This bring-your-own-key design means any script or browser extension with access to this origin may be able to read the key; deploy the SPA only from a trusted origin.

Checks

npm run build
npm run lint