Skip to content

LiveCaptions

Stable

A streaming caption log for voice that marks words still changing, words the assistant never said, and hidden numbers.

Also known as captions, subtitles, live transcript

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

A live conversation

Captions

  1. YouStill changingWhat time does the pharmacy on

Step 2 of 6: Person starts talking

Step through it. The person's words start light and settle. The assistant is cut off mid-answer, and the part it never said is struck through.

When to use it

Makes a voice conversation readable without sound, and honest about what was really said. It is the accessible version of voice.

Made of: Header with label · Size control · Hide or Show button · Caption log · Speaker label (AI mark for the assistant) · Time · State word · Caption text · Jump to latest · Live region (hidden, optional)

Use it for

  • Live captions under a voice assistant.
  • A support call transcript where the assistant and the caller are both shown.
  • A recorded call where each line jumps the audio to that point.

Not for

  • A typed chat thread: use MessageList.
  • A stream of agent steps or logs: use LiveLog.
  • The whole voice screen with orb and controls: use VoicePanel.

Do and avoid

Captions

  1. You00:03When does the pharmacy on Elm Street close?
  2. Assistant00:05InterruptedElm Street Pharmacy closes at 8 pm today. Not spoken: It opens at 9 tomorrow, and the drive-through stays open until 10 pm.
  3. You00:08Sorry, just tonight.

Do. Words the assistant never said are marked, so the record stays honest.

Captions

  1. You00:03When does the pharmacy on Elm Street close?
  2. Assistant00:05Elm Street Pharmacy closes at 8 pm today. It opens at 9 tomorrow, and the drive-through stays open until 10 pm.
  3. You00:08Sorry, just tonight.

Avoid. Cut-off words look as if they were said, so the record is wrong.

Do

  • Keep the same id when an interim line becomes final, so it settles in place.
  • Pass spokenUpTo from the audio that really played.
  • Name every speaker in words, and list AI speakers in aiSpeakers.
  • Store the size and visible choices for the person.

Avoid

  • Do not colour the person's captions lime. Only the AI label carries the AI wash.
  • Do not live-announce every word. It fights the audio and the screen reader.
  • Do not show speech the assistant never played as if it was said.
  • Do not show emotion scores about the person.

On a phone

  • Caption text starts at the large size on screens narrower than 600px, and medium elsewhere.
  • The header wraps: the size control and the Hide button drop under the label on a narrow screen.
  • Lines wrap and never scroll sideways, so the log works at 320px wide.
  • The Hide and Show button and Jump to latest have 44px touch areas.

Seen in products

  • Gemini Live: a captions toggle that stays on for all Live chats, with size and style settings.
  • Google Meet: caption font, size and colour settings, saved automatically and private to each viewer.
  • OpenAI Realtime API: conversation.item.truncate trims the transcript to the audio that was played.
  • Vapi call logs: transcript lines that seek the recording.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started