Skip to content

MiroTalk LK live captions

Live captions are optional and use a LiveKit Agents worker (agent/, Python). It joins a meeting, transcribes everyone's microphone and sends the text to the browsers, which show it over the video with the speaker's name.

  • The host or a co-host turns captions on with the Captions (CC) button. The app dispatches the agent to that meeting only, so nothing is transcribed until someone asks for it. Everyone is told that captions are on (also people who join later), and the button appears for them too.
  • Anyone can hide or show captions for themselves with the button (remembered in the browser). The host's button also offers Turn off for everyone, which removes the agent. The agent also leaves once everyone else has left.
  • Finished lines are also read out by screen readers (a polite live region), without the partial text.
  • The agent isn't a person: it gets no video tile and doesn't appear in the People panel, the participant count or the chat recipients. Captions are only accepted from the agent (participants can't set the attribute that identifies it).
  • Captions aren't offered in an end-to-end encrypted meeting: the agent couldn't decrypt anyone's microphone.
  • Nothing is stored: captions only exist in the browsers while the meeting runs. Audio goes to the speech-to-text service you choose, so with a cloud provider let participants know where consent is required.

Speech-to-text – set STT_PROVIDER:

STT_PROVIDER Runs on Captions appear
whisper (default) Self-hosted Whisper: the bundled Speaches server (--profile whisper), or any OpenAI-compatible /v1/audio/transcriptions server in STT_BASE_URL while you talk: the sentence being spoken is transcribed again every WHISPER_INTERIM_S (2 s) and once you pause
openai OpenAI realtime transcription (gpt-4o-mini-transcribe), needs STT_API_KEY streaming, word by word
deepgram Deepgram (nova-3), needs STT_API_KEY streaming, word by word

The whisper provider also works with hosted Whisper APIs, e.g. Groq: STT_BASE_URL=https://api.groq.com/openai/v1, STT_MODEL=whisper-large-v3-turbo, STT_API_KEY=gsk_.... STT_LANGUAGE sets the spoken language (en, de, it...), or auto to detect it.

Local development

Bash
# instead of `npm run livekit:dev` (starts LiveKit + the captions agent + self-hosted Whisper)
npm run captions:dev
# .env: CAPTIONS_ENABLED=true
npm run dev

The first start downloads the Whisper model (Systran/faster-whisper-small, ~0.5 GB). To use a cloud provider instead, set STT_PROVIDER and STT_API_KEY in .env (the Whisper containers can then be skipped). You can also run the agent without Docker: cd agent && python -m venv .venv && .venv/bin/pip install -r requirements.txt && STT_BASE_URL=http://localhost:8000/v1 .venv/bin/python main.py dev (it reads the app's .env).

If captions don't appear and the agent logs speech-to-text failed ... Request timed out, Whisper is too slow for the machine (common on older laptops, where Docker makes it slower still): set a smaller model such as STT_MODEL=Systran/faster-whisper-base (or -tiny) and/or WHISPER_INTERIM_S=0, then restart npm run captions:dev. Also keep only one browser tab's microphone on while testing: every participant is transcribed separately.

Production – set CAPTIONS_ENABLED=true and start the captions profile, with self-hosted Whisper:

Bash
docker compose --profile captions --profile whisper up -d --build

or with a cloud provider (STT_PROVIDER=openai or deepgram and STT_API_KEY in .env):

Bash
docker compose --profile captions up -d --build

Whisper on a CPU works with small models: the default Systran/faster-whisper-small needs ~1 GB RAM and transcribes a few seconds of speech in about 1-3 s with 2 vCPUs, which is fine for a meeting or two with a few people talking. The whisper container is capped at WHISPER_CPUS (default 2) so transcription can't starve live calls. For larger models (e.g. Systran/faster-whisper-large-v3), more meetings or faster captions, use an NVIDIA GPU (WHISPER_IMAGE=ghcr.io/speaches-ai/speaches:0.8.3-cuda and give the container the GPU) or point STT_BASE_URL at a Whisper server on another machine. Set WHISPER_INTERIM_S=0 to transcribe each sentence only once (lines then appear when the speaker pauses), which roughly halves the load.