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 properties:

ParameterRequiredTypeDescription
onTranscriptionAppDataFunctionCallback for the "app-message" event from transcription
onTranscriptionErrorFunctionCallback for the "transcription-error" event
onTranscriptionStartedFunctionCallback for the "transcription-started" event
onTranscriptionStoppedFunctionCallback for the "transcription-stopped" event

Return type

An object with the following properties:

NameTypeDescription
detect_languagebooleanReturns true when language detection is enabled. Please check Deepgram's language detection docs for more details.
errorbooleantrue in the event of a "transcription-error"
isTranscribingbooleanReturns true after transcription has started
isTranscriptionEnabledbooleanReturns true when enable_transcription is configured on the domain
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.
redactbooleanReturns true when redaction is enabled. 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