startTranscription()

startTranscription({ language, model })

You can start the service by calling startTranscription() on your call object.

Optionally pass configuration options:

NameTypeDescription
languagestringSee Deepgram's documentation for language
modelstringSee Deepgram's documentation for model
tierstringSee Deepgram's documentation for tier
profanity_filterbooleanSee Deepgram's documentation for profanity_filter
punctuatebooleanSee Deepgram's documentation for punctuate
endpointingnumber or booleanSee Deepgram's documentation for endpointing
redactboolean or arraySee Deepgram's documentation for redact
extraRecordSpecify additional parameters. See Deepgram's documentation for available streaming options

Transcription message data is passed from the transcription service to the Daily call object via the "app-message" event. These transcription "app-message" events will have a fromId of "transcription".

By listening to "app-message" events emitted from the transcription service, text can be received and handled by your application. It's helpful to also listen for the is_final attribute to receive only completed sentences instead of sentence fragments.

The properties that the data of a transcription "app-message" contains are as follows:

PropertyTypeDescription
is_finalbooleanWhether the event contains a completed sentence or a sentence fragment
session_idstringThe session ID of the participant being transcribed
textstringThe contents of the transcription
timestampstringTimestamp of transcription generation
user_idstringThe user ID of the participant being transcribed

Below is an example of listening and logging transcription messages in the browser console:

It has no effect if transcription is not enabled.