Meet API Docs Dashboard
On this page

Live Captions and Translation API

People speak their own language. Everyone else reads captions or hears the speaker in theirs, a few seconds later.

Meet does the speech to text and the translation for you. There is nothing to connect and no extra key. You turn it on for a room, and each person picks what they want to read or hear.

What each part does#

1. Turn it on for the room#

bash
curl "https://meet.respiresoft.com/api/v1/rooms" \
  -H "Authorization: Bearer $MEET_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "town-hall-1", "privacy": "private", "properties": {
        "enable_captions": true, "enable_translation": true, "languages": ["es", "fr", "ar"] }}'

languages lists the translation languages for the room, at most 5, and at least one when enable_translation is true. Setting both enable_captions and enable_translation to false switches speech off for the room.

2. Say what language each person speaks#

Put lang in the meeting token so the speaker is understood in the right language from the first word:

bash
curl "https://meet.respiresoft.com/api/v1/rooms/town-hall-1/tokens" \
  -H "Authorization: Bearer $MEET_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "Ann", "role": "participant", "lang": "en", "perms": ["audio", "video", "chat", "translate"]}'

3. Use it from your page#

With the embed SDK:

js
await call.setCaptions(true);                       // starts `caption` events and shows captions
await call.setLanguage('es');                       // hear the call in Spanish
call.on('caption', ({ participantId, text, final, lang }) => {
  if (final) console.log(participantId, lang, text);
});

The call screen also has its own captions and language menu, so you can use them without writing code.

4. Get the transcript afterwards#

bash
curl "https://meet.respiresoft.com/api/v1/sessions/$SESSION_ID/transcript?format=vtt&lang=es" \
  -H "Authorization: Bearer $MEET_API_KEY"

format is json (default, paginated, with start_ms and end_ms from the start of the session), txt, vtt or srt. lang shows the translation where a line has one. A transcript.ready webhook tells you when a finished session has lines.

Good to know#