Skip to main content
Available since v5.0.4 — transcription and closed captions require CometChat Calls SDK v5.0.4 or later for Android. See Setup to install or upgrade.
Transcribe call sessions in real time and display live closed captions on screen. Transcripts are stored server-side and can be retrieved after the call using TranscriptRequest.
Transcription must be enabled for your CometChat app. Contact support if you need to enable this feature.

How It Works

Transcription and closed captions are two related but separate things: Starting transcription is a prerequisite for captions — toggling captions on without an active transcription shows nothing.

Starting Transcription

Auto-Start Transcription

Configure transcription to start automatically when the session begins:
Default: false

Manual Transcription Control

Transcription can be started and stopped during an active call through the CallSession singleton.

Start Transcription

Stop Transcription

Stops the current transcription. Any captions currently on screen are cleared:
Always check isSessionActive() before calling these actions to ensure there’s an active call.

Built-in UI Controls

On Android, both transcription controls live in the control panel’s More menu and are hidden by default.

Transcription Button

To show the Start Transcription / Stop Transcription item:
Default: true The menu item toggles between Start Transcription and Stop Transcription based on the current state.

Closed Caption Button

To show the Show Captions / Hide Captions item, which toggles the on-screen captions overlay:
Default: true
Even with hideClosedCaptionButton(false), the captions item only appears once transcription is running for the session, because captions are generated from the live transcript.

Caption Language

Method: setCaptionLanguage(String) Sets the language used for transcription and captions. This is fixed for the session — there is no in-call language picker on Android.
Default: en-US

Retrieving Transcripts

After a call, use TranscriptRequest to list the transcript artifacts for a session. Each record is a pointer to a downloadable transcript file, not the transcript text itself.
The SDK must be initialized with CometChatCalls.init() and a user must be logged in. The auth token is read from the logged-in user at fetch time, so it automatically tracks re-logins.

Building a Request

Paginating

A TranscriptRequest is a stateful cursor. Create one per session ID and drive it with fetchNext() and fetchPrevious():
  • fetchNext() delivers the next page, or an empty list when there are no more pages. A session with no transcripts delivers an empty list.
  • fetchPrevious() delivers the previous page, or an empty list when already on the first page. It never requests a page below 1.
  • Only one fetch may be in flight at a time. Calling fetchNext() or fetchPrevious() while another request is pending reports ERROR_REQUEST_IN_PROGRESS; the original call is unaffected and still completes.
  • Callbacks are always delivered on the main thread.

Transcript Object

Every property is optional. The server omits keys whose value is empty, so String getters may return null and numeric getters 0. Sparse records are normal and should not be treated as an error.

Reading the Transcript Content

transcriptUrl points at the transcript file. Download it with your HTTP client of choice to read the actual utterances:

Error Handling

All errors — including pre-flight validation — are delivered to onError() with a CometChatException carrying a code. build() never throws.

Complete Example