how to enable transcription in video conferencing ...
# ask-ai
b
how to enable transcription in video conferencing template ,meet
t
Thanks for reaching out, Tecnova. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to enable transcription in the LiveKit "meet" video-conferencing template — here’s how you can add real-time transcription step-by-step. 1. Add a voice agent via LiveKit Agents • Create or deploy an agent that performs speech-to-text (STT). The agent processes participant audio and produces transcription text. 1. Publish transcriptions to the lk.transcription text stream • Configure the agent to publish transcription output to the
lk.transcription
text stream topic so the room and clients can receive it. 1. Ensure agent session text output is enabled • When starting the agent session, enable text output in
RoomOptions
. Example:
Copy code
await session.start(
    agent=MyAgent(),
    room=ctx.room,
    room_options=RoomOptions(
        text_output=TextOutputOptions(sync_transcription=False)
    ),
)
1. Receive transcriptions on the frontend • Use the room text-stream handler to receive the transcription events (the meet app uses
registerTextStreamHandler
under the hood). • Alternatively, in React use the
useTranscriptions
hook from
@livekit/components-react
to display live transcription lines in your UI. 1. Reference examples and templates • Look at the transcription frontend example (transcription_frontend_groq) for a working implementation of real-time STT and UI handling. • Extend the meet app by adding the agent integration and the UI components shown in that example. If you want, tell me: • Which STT model or provider you plan to use (or if you want example agent code), and • Whether you want inline captions in the meeting UI or a separate transcript panel — and I’ll give the exact code snippets and file locations to modify in the meet template. Sources: livekit/livekit_composite | DeepWiki | Text and transcriptions | LiveKit docs | examples/other | livekit/livekit_composite | DeepWiki
b
any multilingual model
t
Great — you can use multilingual STT with the meet template. Recommended options: • Deepgram Nova-3 / Nova-2 ◦ Use
deepgram/nova-3:multi
(or Nova-2) for automatic multilingual detection and broad language coverage. ◦ Example in an agent session: set
stt="deepgram/nova-3:multi"
. • Cartesia Ink Whisper ◦ Model ID:
cartesia/ink-whisper
— supports ~98 languages; set language per session if needed. • Gladia STT plugin ◦ Supports automatic language detection and realtime translation configuration. How to wire it into meet: 1. Add a LiveKit Agent that uses one of the above STT models. 2. Ensure the agent publishes transcription to
lk.transcription
(text stream). 3. Enable text output in the agent session
RoomOptions
(example shown earlier). 4. On the frontend use
registerTextStreamHandler
or the
useTranscriptions
hook from
@livekit/components-react
to display captions. Which model do you want to try (Deepgram, Cartesia, or Gladia)? I’ll provide the exact agent config and the specific file edits for the meet template. Sources: Deepgram STT | LiveKit docs | Speech-to-text (STT) models | LiveKit Docs | Cartesia STT | LiveKit Docs | Gladia STT plugin guide | LiveKit Docs | LiveKit turn detector plugin | LiveKit docs
b
Cartesia
t
You're choosing Cartesia Ink Whisper — here are concise, actionable steps to enable multilingual transcription in the LiveKit "meet" template. Server-side (Agent) — create/configure an agent session 1. Install/ensure the LiveKit Agents runtime and Cartesia STT plugin are available in your agent environment. 2. Create an AgentSession that sets
stt
to
cartesia/ink-whisper
. Example (Python-style pseudocode):
Copy code
session = AgentSession(
    stt="cartesia/ink-whisper",
    # other components like tts, llm, etc. as needed
)
await session.start(agent=MyAgent(), room=ctx.room, room_options=RoomOptions(
    text_output=TextOutputOptions(sync_transcription=False)
))
• If you need a specific language, pass the language code when starting the STT component; otherwise the model supports many languages and you can detect/set language dynamically in the agent logic. 1. Publish transcriptions to the
lk.transcription
text stream • In your agent code, when you receive STT results, publish them to the room text stream topic
lk.transcription
so clients can consume them. Environment variables / credentials • Provide Cartesia API credentials or plugin config to the agent runtime via environment variables expected by your Cartesia plugin integration. (Place credentials in your agent host environment so the Cartesia STT calls succeed.) Frontend — receive and display transcriptions 1. Use the meet template’s existing text-stream handlers or register one: • The meet app uses
registerTextStreamHandler
to receive room text streams; ensure it listens for
lk.transcription
messages. 1. Or, use the React helper: • Use
useTranscriptions
from
@livekit/components-react
to surface live lines in the UI. 1. Display options: • Inline captions (below video) — render latest transcription line. • Transcript panel — append incoming lines to a scrollable transcript list. Files to update in the meet template • Backend agent service file(s): add/import Cartesia STT in your agent composition and configure
AgentSession
stt
parameter. • Agent startup/config: add environment variables for Cartesia credentials. • Frontend (Next.js pages / components): ensure
registerTextStreamHandler
or
useTranscriptions
is wired to show
lk.transcription
messages. Quick checklist • [ ] Cartesia credentials available to agent runtime • [ ] AgentSession
stt="cartesia/ink-whisper"
configured • [ ] Agent publishes STT results to
lk.transcription
• [ ] Frontend listens to
lk.transcription
and renders captions/transcript Would you like the exact code edits for the meet template files (backend agent file and the specific frontend component) for a Next.js project? If so, tell me whether your agent is implemented in Python or TypeScript/Node and I’ll provide precise snippets.
b
does livekit has any out of box transcription service that can be used
t
Yes — LiveKit provides out-of-the-box transcription via LiveKit Inference. You can use hosted STT models directly in an agent session without external infra. Multilingual-capable options include: • Cartesia:
cartesia/ink-whisper
(≈98 languages) • Deepgram:
deepgram/nova-3:multi
or
deepgram/nova-2
(multilingual modes) • AssemblyAI:
assemblyai/universal-streaming
(English-focused) How to use: 1. In your agent session set
stt
to the model ID (e.g.,
cartesia/ink-whisper
) when starting the session. 2. Ensure the agent publishes results to the
lk.transcription
text stream. 3. Frontend: consume
lk.transcription
via
registerTextStreamHandler
or
useTranscriptions
to show captions/transcripts. Would you like the exact agent config and meet-template file edits to enable Cartesia transcription (Node or Python)? Sources: AssemblyAI STT | LiveKit Docs | Deepgram STT | LiveKit docs | Speech-to-text (STT) models | LiveKit Docs | Agents v0.x migration guide - Node.js | LiveKit Docs | Text and transcriptions | LiveKit docs
b
yes
t
Which language do you want the exact snippets for: Node/TypeScript or Python?
b
node/typescript
t
Below are concise, ready-to-use Node/TypeScript snippets and file locations to enable Cartesia Ink Whisper transcription in the LiveKit "meet" template. Backend — Agent setup (Node/TypeScript) 1. Install:
Copy code
pnpm add @livekit/agents
1. Create or update your agent entry (e.g., src/agents/cartesiaAgent.ts):
Copy code
import { Agent, AgentSession, inference } from '@livekit/agents';
import { Room } from 'livekit-server-sdk'; // if you use server SDK

export class CartesiaAgent extends Agent {
  // implement handlers as needed
}

export async function startCartesiaAgent(room: Room) {
  const session = new AgentSession({
    stt: inference.STT({
      model: 'cartesia/ink-whisper',
      language: 'multi', // automatic multilingual detection
    }),
    // add other components if needed (llm, tts)
  });

  await session.start({
    room, // pass your LiveKit Room instance
    room_options: {
      text_output: { sync_transcription: false },
    },
  });

  // Example: publish manual text stream messages when you get STT results
  session.on('transcription', async (segment) => {
    // segment.text, segment.participantIdentity, segment.final
    await room.createDataPayload('lk.transcription', JSON.stringify({
      identity: segment.participantIdentity,
      text: segment.text,
      final: segment.final,
      segmentId: segment.segmentId,
    }));
  });

  return session;
}
Notes: • Ensure Cartesia credentials/config are available to the agent runtime via environment variables required by your deployment (Cartesia plugin config). • Replace the
session.on('transcription', ...)
with the actual event hook your agent SDK exposes for STT results if different. Frontend — receive transcription (meet template) A. Using room.registerTextStreamHandler (server-side/SDK consumer file) Update the file that connects to the LiveKit Room (e.g., src/utils/roomListeners.ts):
Copy code
room.registerTextStreamHandler('lk.transcription', async (reader, participantIdentity) => {
  const messages = await reader.readAll(); // get the text payload
  const payload = JSON.parse(messages);
  const isFinal = reader.info.attributes?.['lk.transcription_final'] === 'true';

  // Emit to app state / UI
  appState.addTranscription({
    participant: participantIdentity,
    text: payload.text,
    final: isFinal,
    segmentId: payload.segmentId,
  });
});
B. Using React helper (
useTranscriptions
) in a component (e.g., components/Transcriptions.tsx)
Copy code
import React from 'react';
import { useTranscriptions } from '@livekit/components-react';

export function TranscriptionsPanel() {
  const { transcriptions } = useTranscriptions();

  return (
    <div className="transcription-panel">
      {transcriptions.map(t => (
        <div key={t.segmentId} className={t.final ? 'final' : 'interim'}>
          <strong>{t.participant.identity}:</strong> {t.text}
        </div>
      ))}
    </div>
  );
}
File locations to edit in the meet template • Backend agent file: create/update src/agents/cartesiaAgent.ts (or src/server/agents/* depending on your repo) • Agent startup: update server bootstrap file where agents are started (e.g., src/server/index.ts or src/server/agentStartup.ts) • Frontend: add component at components/Transcriptions.tsx and import into pages/_app.tsx or pages/room/[id].tsx • Room listeners: update src/utils/roomListeners.ts or wherever you handle
room
events in the meet app Quick checklist • Cartesia credentials present in agent runtime environment •
@livekit/agents
installed and agent started with
stt.model = 'cartesia/ink-whisper'
and
language='multi'
• Agent publishes STT output to
lk.transcription
• Frontend listens via
registerTextStreamHandler('lk.transcription', ...)
or uses
useTranscriptions
Would you like the exact patched diffs for specific meet repo files (I can produce the minimal edits for the typical Next.js meet layout)? Sources: Groq and LiveKit | LiveKit Docs | Text and transcriptions | LiveKit docs | Cartesia STT | LiveKit Docs | Build voice, video, and physical AI | LiveKit | HIPAA Eligible Products and Services | LiveKit
b
is there any other template I can use that takes care fo video conferencing and transcription rather than creating an agent to do that
t
Short answer: No — there isn't a prebuilt LiveKit template that bundles full video conferencing + real-time transcription without an agent. The meet template provides video conferencing UI, and LiveKit supplies standalone transcription frontends (e.g., transcription-frontend-groq), but real-time STT requires an AI agent (or LiveKit Inference model configured in an agent session) to publish to
lk.transcription
. You can: • Use the meet template + a Cartesia agent (we gave Node/TS snippets earlier) — this is the common approach. • Combine meet UI with the transcription-frontend-groq components to speed UI work, then connect a Cartesia-powered agent. • Use LiveKit Inference models directly in an agent session (no external infra) to avoid rolling your own STT service. Which would you prefer: (A) I provide minimal patched diffs for the meet repo to add Cartesia agent + frontend wiring, or (B) I show how to merge transcription-frontend-groq UI into meet and the exact agent start code? Sources: examples/other | livekit/livekit_composite | DeepWiki | Realtime media | LiveKit Docs | Text and transcriptions | LiveKit docs | livekit/livekit_composite | DeepWiki | examples/voice_agents | livekit/livekit_composite | DeepWiki
b
• Use LiveKit Inference models directly in an agent session (no external infra) to avoid rolling your own STT service.
t
Perfect — here's a focused plan to use LiveKit Inference directly (no external STT infra) with Cartesia in Node/TypeScript, plus the minimal steps to get it running in the meet template. What this does • Uses LiveKit Inference models inside an AgentSession so you don’t host STT servers. • Publishes transcriptions to
lk.transcription
. • Frontend consumes via
registerTextStreamHandler
or
useTranscriptions
. Backend (Node/TypeScript) — minimal agent/session 1. Install:
Copy code
pnpm add @livekit/agents
1. Create/start AgentSession (example):
Copy code
import { AgentSession, inference } from '@livekit/agents';

const session = new AgentSession({
  stt: inference.STT({
    model: 'cartesia/ink-whisper',
    language: 'multi', // use supported value; or specify a language code
  }),
  // optionally include llm/tts if needed by your pipeline
});

await session.start({
  room, // your LiveKit Room instance
  room_options: {
    text_output: { sync_transcription: false },
  },
});
1. Ensure Cartesia credentials are available to LiveKit Inference (set required env vars in your deployment). Publishing transcriptions • LiveKit Inference will produce STT output; ensure the session/agent publishes those to
lk.transcription
. If you need to forward manually, use the agent SDK event for transcription results and publish into the room text stream. Frontend — receive & show transcriptions Option A — low-level handler:
Copy code
room.registerTextStreamHandler('lk.transcription', async (reader, participant) => {
  const msg = await reader.readAll();
  const isFinal = reader.info.attributes?.['lk.transcription_final'] === 'true';
  // parse msg and update UI
});
Option B — React helper (recommended for meet UI):
Copy code
import { useTranscriptions } from '@livekit/components-react';
const { transcriptions } = useTranscriptions();
Render
transcriptions
in a caption bar or transcript panel. Templates / shortcuts • You can use the meet template and add the AgentSession code above — this is the typical path. • Alternatively,
transcription-frontend-groq
shows ready transcription UI that you can merge into meet if you want visual examples. Next step Would you like: A) Exact patched diffs for the typical meet repo (Node/TS) to add the Cartesia AgentSession + frontend wiring, or B) A runnable minimal repo example (zip/snippets) you can drop into your project? Tell me A or B and I’ll produce the code diffs/snippets. Sources: Speech-to-text (STT) models | LiveKit Docs | Deepgram STT | LiveKit docs | Text and transcriptions | LiveKit docs | examples/voice_agents | livekit/livekit_composite | DeepWiki | Models | LiveKit Docs
b
To test give me a simplistic way to achieve this. model does not have to be cartesia any basic one will do
t
Good — here’s a minimal, easy-to-run test using LiveKit Inference + Deepgram Nova-3 (basic multilingual) so you can verify real-time transcription quickly. Backend (Node/TypeScript) — minimal agent session 1. Install:
Copy code
pnpm add @livekit/agents
1. Create file src/cartesia-lite-agent.ts (replace names as needed):
Copy code
import { AgentSession, inference } from '@livekit/agents';
import { Room } from 'livekit-server-sdk';

export async function startSimpleSTTAgent(room: Room) {
  const session = new AgentSession({
    stt: inference.STT({
      model: 'deepgram/nova-3:multi', // simple multilingual test model
    }),
  });

  await session.start({
    room,
    room_options: { text_output: { sync_transcription: false } },
  });

  // Optional: log transcription events if SDK emits them
  session.on('transcription', (seg) => {
    console.log('transcription:', seg);
  });

  return session;
}
1. Ensure your environment has any needed API keys (LiveKit Inference credentials are managed by your LiveKit deployment). No external STT infra required. Frontend — quick subscriber (TypeScript) Option A — low-level handler (works in meet template) Add this where you have the LiveKit
room
object:
Copy code
room.registerTextStreamHandler('lk.transcription', async (reader, participant) => {
  const msg = await reader.readAll();
  const isFinal = reader.info.attributes?.['lk.transcription_final'] === 'true';
  // msg is the transcription text (or JSON depending on agent)
  console.log('transcript', participant.identity, isFinal, msg);
  // Update your UI: append to transcript or show as caption
});
Option B — React (in meet UI)
Copy code
import { useTranscriptions } from '@livekit/components-react';

function Captions() {
  const { transcriptions } = useTranscriptions();
  return (
    <div>
      {transcriptions.map(t => (
        <div key={t.segmentId}><strong>{t.participant.identity}:</strong> {t.text}</div>
      ))}
    </div>
  );
}
How to test 1. Start your LiveKit room and run the server that calls startSimpleSTTAgent(room). 2. Join the room from two clients (one speaking). 3. Watch console logs or the Captions component — you should see interim/final transcription lines appear. If you want, I can: • Provide patched diffs for the meet repo (minimal edits), or • Swap the example to AssemblyAI or Cartesia instead. Which would you prefer?
b
DO I need to have my own server to host build and host agent
t
You need an agent process to run the transcription pipeline, but you do NOT have to host the STT model yourself. What this means: • The STT models (Deepgram, Cartesia, etc.) can be used via LiveKit Inference — models are hosted/managed by LiveKit. • You only need a lightweight agent runtime (a small server, container, or serverless function) that starts an AgentSession and connects to the LiveKit room. That agent orchestration is what receives audio, calls the hosted model, and publishes results to
lk.transcription
. Options depending on how much infra you want: • Minimal server: a small Node/TS Express or Next.js API route that runs the AgentSession (easy for testing). • Serverless: run the agent in a serverless function (short-lived sessions) if your provider and runtime fit the agent SDK. • Container: run the agent as a small container (recommended for production stability). • Full-managed: use LiveKit Cloud + LiveKit Inference so you never host models — only host the agent process. Quick practical suggestion for testing: • Start a tiny Node process (one file) that creates an AgentSession with
stt: 'deepgram/nova-3:multi'
(or
cartesia/ink-whisper
) and calls
session.start({ room })
. Run it locally while you join the meet room — you’ll see transcriptions appear in
lk.transcription
. No model hosting required. If you want, I can: • Provide a 1-file Node/TS agent you can run locally to test (ready-to-run). Would you like that?
b
Is there any out of box agent template provided to use it to achieve or I have to build and then deploy
t
LiveKit provides starter agent templates you can use out‑of‑the‑box so you don't have to build an agent from scratch — but you still need to run/deploy the agent process (you don't host the STT models themselves). What’s available: • agent-starter-react + agent-starter-python (or Node) templates: ready-made frontend + agent backend that demonstrate LiveKit Inference transcription wiring. • transcription-frontend-groq: a transcription-focused frontend you can merge with meet. • LiveKit Inference built-in models (Deepgram, Cartesia, AssemblyAI) — available without self‑hosting models; just configure the agent to use them. What you must do: • Pick a starter template (CLI creates it) and run or deploy the agent process (local Node/TS, Python, container, or serverless). • Provide any required credentials for the chosen model (where applicable) in the agent runtime env. If you want, I can: • Give the exact CLI command(s) to create a starter app (agent-starter-react / agent-starter-python), or • Provide a minimal 1-file Node/TS agent you can run locally to test transcription. Which would you like?
b
yes provide me both
t
Below are both options: (A) create starter apps via the LiveKit CLI (agent-starter templates), and (B) a minimal single-file Node/TypeScript agent you can run locally to test transcription. Follow the steps for the option you prefer. A — Starter templates (CLI) 1. Create frontend + agent backend templates • Frontend (React): lk app create --template agent-starter-react my-transcription-ui • Backend (Python agent): lk app create --template agent-starter-python my-agent-backend 1. What to edit / env • In the agent backend repo, set LiveKit and model credentials in environment variables per template README (LiveKit API key/secret, and any model creds if required). • Start frontend and backend per their README (usually pnpm/dev/uvicorn commands included). 1. How it works • The starter agent is prewired to start AgentSession and publish STT results to
lk.transcription
. Run the agent service and join the meet UI; transcriptions will appear in the UI or via the transcription stream. B — Minimal 1-file Node/TypeScript agent (quick local test) 1. Install
Copy code
mkdir livekit-stt-test
cd livekit-stt-test
pnpm init -y
pnpm add @livekit/agents livekit-server-sdk
1. Create file src/simple-agent.ts
Copy code
import { AgentSession, inference } from '@livekit/agents';
import { Room, RoomService } from 'livekit-server-sdk';

// Replace with your LiveKit host, API key/secret, and room name
const LIVEKIT_URL = process.env.LIVEKIT_URL!;
const LIVEKIT_API_KEY = process.env.LIVEKIT_API_KEY!;
const LIVEKIT_API_SECRET = process.env.LIVEKIT_API_SECRET!;
const ROOM_NAME = process.env.ROOM_NAME || 'test-room';

async function getRoom() {
  // simple way to get a Room object using livekit-server-sdk
  // adjust per your server setup; this is illustrative
  const svc = new RoomService(LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
  const room = await svc.getRoom(ROOM_NAME).catch(async () => {
    await svc.createRoom({ name: ROOM_NAME });
    return svc.getRoom(ROOM_NAME);
  });
  return room as any; // adapt to actual Room object your app uses
}

async function main() {
  const room = await getRoom();

  const session = new AgentSession({
    stt: inference.STT({
      model: 'deepgram/nova-3:multi', // quick multilingual test model
    }),
  });

  await session.start({
    room,
    room_options: { text_output: { sync_transcription: false } },
  });

  console.log('AgentSession started for room', ROOM_NAME);

  // Optional: log transcription events (SDK may provide different hooks)
  session.on('transcription', (seg: any) => {
    console.log('TRANSCRIPTION:', seg);
  });

  // Keep process alive
  process.stdin.resume();
}

main().catch((e) => {
  console.error(e);
  process.exit(1);
});
1. Run • Set env vars and run:
Copy code
export LIVEKIT_URL=https://your-livekit-host
export LIVEKIT_API_KEY=key
export LIVEKIT_API_SECRET=secret
export ROOM_NAME=test-room

pnpm ts-node src/simple-agent.ts
Notes and tips • You do need a running agent process (this file) that creates the AgentSession and connects to your LiveKit room — but you do NOT host the STT model itself; LiveKit Inference hosts models (Deepgram, Cartesia, etc.). • Starter templates include wiring and README steps (recommended if you want full UI + agent). • For the minimal agent you may need to adapt the Room object acquisition to your environment (the sample uses RoomService illustratively). Starter templates handle this for you. If you want, I can: • Produce the exact patched diffs to add the simple agent to the typical meet repo, or • Provide a runnable ZIP with the minimal Node agent and a tiny HTML/JS client that joins the room and logs
lk.transcription
. Which would you like next?
b
Once Agent Process is created. I have to start them every time
t
The agent process must be running whenever you want live transcription to occur. You have two main approaches to keep it running — short-lived/manual for testing, or persistent for production. Options to run persistently • Docker container: Build a small container for the agent and run it with restart policies (e.g.,
restart: always
) or use Docker Compose / Kubernetes for orchestration. • System service: Run as a systemd service on a VM so it starts on boot and restarts on failure. • Process manager: Use PM2 or similar to keep a Node agent alive and auto-restart on crashes. • Serverless (ephemeral): Use serverless functions to start sessions on demand, but you’ll need logic to keep sessions alive while meetings run (more complex). • Platform-managed: Deploy to a PaaS (Heroku, Fly, Vercel with background workers, AWS ECS/Fargate) and configure a worker service. Tips • For development/testing: run the single-file agent locally (node/ts-node) or with PM2 for convenience. • For production: containerize + orchestrate (Docker Compose for small scale, Kubernetes/ECS for scale). • Ensure the agent auto-reconnects / restarts on failure and that required env vars (LiveKit credentials, inference credentials) are available to the runtime. Would you like a short example systemd unit, a Dockerfile+docker-compose, or PM2 config for the minimal agent? Which deployment target are you planning?