Work

Open source

Open Translate Meet

People who do not share a language meet in one room, and each of them hears and reads the conversation in their own.

Role
Design and development
Version
0.2.0, first public release
Stack
PHP, LiveKit, Gemini Live
Licence
Apache-2.0

Open Translate Meet is a video meeting application you run on your own server. When people in a room do not share a language, each hears the conversation in their own and reads it as captions.

The problem

A meeting between people who do not share a language usually runs through one person who translates in summaries. The conversation slows down, and part of what was said never reaches the other side. I wrote Open Translate Meet as a meeting room where everyone speaks their own language and still follows the others, and which a team can install on its own server.

How it works

LiveKit carries the audio and video. An application written in plain PHP decides who may enter a room and keeps the state that has to be retained. There is no application database, state lives in a file store. The browser side is vanilla JavaScript with no build step.

PartWhere it runsWhat it does
BrowserThe participant's deviceMicrophone, voice detection, the Live session, publishing the translated audio
PHP applicationYour own serverRoom admission, state in the file store, single-use tokens
LiveKitLiveKit Cloud or your own serverOriginal audio, video and the translated audio tracks
Gemini LiveGoogle's cloudSpeech translation, transcription of the original and translated audio

Audio

Each participant picks a speaking language and a listening language. If someone in the room listens in another language, the speaker's browser sends the microphone audio to Gemini Live, once per target language.

Translation

Translation runs in Google's cloud, not on the meeting server. The speaker's browser publishes the translated audio into the room as an extra LiveKit audio track, and a listener subscribes only to the track for their own language.

Captions

Captions come from the same Gemini Live session. The session transcribes both the original and the translated audio. Each caption carries the original sentence together with its translation, so it is produced on the speaker's side.

This is the path of a single sentence from the speaker to a listener:

  1. MicrophoneThe speaker's browser captures the audio. The original voice goes to the room through LiveKit.
  2. TokenIf someone in the room listens in another language, the browser gets a single-use token for that language from the server.
  3. Gemini LiveThe browser opens the Live session and sends the microphone audio. Translated audio comes back, with text for both voices.
  4. LiveKitThe speaker's browser publishes the translated audio as an extra audio track for that language.
  5. ListenerSubscribes only to the track for their own language. The caption carries the original sentence and its translation.

By default a speaker is translated into at most three languages at once. A listener whose language is not covered keeps hearing the original voice. The same happens when translation falters: if the translated track pauses, is muted, disconnects, or the provider returns an error, the original voice comes back immediately.

On the receiving side, captions pass a rate limit per sender and exact repeats are dropped. Captions and chat messages are bound to the authenticated media sender, so nobody can send a caption in another participant's name.

Self-hosting and the API key

When you install the application on your own server, you decide on the branding, the credentials, the meeting policies and how long data is kept. AI features and persistent transcripts are off by default. Meetings work in full without a translation provider.

FeatureDefaultWhat turning it on takes
Speech translationOffA provider, an explicitly set model and an API key
Chat translationOffA text provider, a model and an API key
Persistent transcriptOffThe installation setting, the host enabling it in the room, each speaker's consent
AI summaryOffA text provider and a second, separate consent from the speaker
BookingOffThe installation setting

Translation needs a Gemini API key, and the browser has to open the Live session itself. I did not want the key to reach the client, so the server asks Google for a single-use, short-lived token and gives the browser only that. This is the call in api/gemini.php:

[$code, $j] = http_json('POST', 'https://generativelanguage.googleapis.com/v1beta/auth_tokens',
  ['uses' => 1, 'expireTime' => gmdate('Y-m-d\TH:i:s\Z', $expires), 'newSessionExpireTime' => gmdate('Y-m-d\TH:i:s\Z', time() + 60),
    'liveConnectConstraints' => ['model' => $model, 'config' => $constraints]], ['x-goog-api-key: ' . $key]);

The token works once. It is locked to the model the operator chose, to audio output and to a single target language. The server issues a token only if someone in the room is actually listening in that language. The length of the session it opens and the number of tokens issued are capped as well:

LimitDefaultSetting
Token uses1Fixed in code
Session it opens10 minutesLIVE_SESSION_SECONDS
Tokens per person36 an hourLIVE_TOKENS_PER_PERSON_HOUR
Tokens per room180 an hourLIVE_TOKENS_PER_ROOM_HOUR
Tokens per installation500 an hourLIVE_TOKENS_PER_HOUR

Stack

Media
LiveKit (LiveKit Cloud or self-hosted)
Server
PHP 8.2+, a file store instead of a database
Browser
Vanilla JavaScript, no build step
Speech translation
Gemini Live, through single-use tokens
Voice detection
Silero VAD v5, in the browser

Status and limits

The current version is 0.2.0, the first public release. The interface comes in 12 languages. Besides translation there is a standalone admin interface, waiting-room admission, optional booking, and transcripts that need the speaker's consent.

12interface languages
8participants, the default capacity
3target languages at once for one speaker

The capacity setting accepts 2 to 64, and its default is eight participants. The file store is designed for a single application host. The integration tests stub the provider protocols, so they do not prove how a real microphone, WebRTC or Gemini behaves.

It is not an offline translation engine either. While translation is on, the speaker's audio goes to Google's service. No model is selected silently, so the operator has to set the model explicitly.

More work

Contact

Let's build
something together.

If you have a project, a role or just an idea in mind, write to me.

Reach me

Email[email protected] LinkedInin/emreocell GitHub@emreocell X@emreocell1219 Instagram@emre.ocel Redditu/emreocell