useTranscription

useTranscription(params?) : Object

Returns information about a meeting's current transcription state, along with helper functions that wrap daily-js transcription related methods.

useTranscription can also be used to set up optional callbacks for transcription events.

Params (optional)

An object with the following optional properties:

ParameterTypeDescription
DeprecatedonTranscriptionAppDataFunctionCallback for the "app-message" event from transcription
onTranscriptionErrorFunctionCallback for the "transcription-error" event
onTranscriptionMessageFunctionCallback for the "transcription-message" event
onTranscriptionStartedFunctionCallback for the "transcription-started" event
onTranscriptionStoppedFunctionCallback for the "transcription-stopped" event

Return type

An object with the following properties:

NameTypeDescription
errorbooleantrue in the event of a "transcription-error"
isTranscribingbooleanReturns true after transcription has started
languagestringReturns the language applied for the transcription. Please check Deepgram's language docs for details.
modelstringReturns the model applied for transcription. Please check Deepgram's model docs for more details.
profanity_filterbooleanReturns true when profanity filter is enabled. Please check Deepgram's profanity filter docs for more details.
redactboolean or arrayReturns the redaction applied for transcription. Please check Deepgram's redaction docs for more details.
startedBystringReturns the session_id for the participant who initiated the transcription
startTranscriptionFunctionSee daily-js startTranscription()
stopTranscriptionFunctionSee daily-js stopTranscription()
tierstringReturns the tier applied for transcription. Please check Deepgram's tier docs for more details.
transcriptionsTranscription[]Array of Transcription object. See Transcription for more information.
transcriptionStartDateDateTimestamp for when the transcription started
updatedBystringReturns the session_id for the participant who updated the transcription most recently

Sample code