This method can be used to start real-time transcription for the meeting.
All participants, including the local participant, will receive the TRANSCRIPTION_STARTING state in the onTranscriptionStateChanged event.
OptionalmodelConfig?: objectOptional model configuration used during transcription.
Optionalsummary?: { enabled: boolean; prompt?: string }Configuration for real-time transcription summary generation.
Enables or disables summary generation.
Optionalprompt?: stringCustom instructions used to guide summary generation.
OptionalwebhookUrl?: stringA webhook URL that will be called whenever the transcription state changes.
This method can be used to stop the ongoing real-time transcription.
All participants, including the local participant, will receive the TRANSCRIPTION_STOPPING state in the onTranscriptionStateChanged event.
ID of the transcription session.
status has following values:
TRANSCRIPTION_STARTING - Realtime Transcription is in starting phase and hasn't started yet.TRANSCRIPTION_STARTED - Realtime Transcription has started successfully.TRANSCRIPTION_STOPPING - Realtime Transcription is in stopping phase and hasn't stopped yet.TRANSCRIPTION_STOPPED - Realtime Transcription has stopped successfully.import { Constants, useTranscription } from "@videosdk.live/react-sdk";
function onTranscriptionStateChanged(data) {
const { status, id } = data;
if (status === Constants.transcriptionEvents.TRANSCRIPTION_STARTING) {
console.log("Realtime transcription is starting", id);
} else if (status === Constants.transcriptionEvents.TRANSCRIPTION_STARTED) {
console.log("Realtime transcription has started", id);
} else if (status === Constants.transcriptionEvents.TRANSCRIPTION_STOPPING) {
console.log("Realtime transcription is stopping", id);
} else if (status === Constants.transcriptionEvents.TRANSCRIPTION_STOPPED) {
console.log("Realtime transcription has stopped", id);
}
}
useTranscription({
onTranscriptionStateChanged,
});
ID of the participant whose speech was transcribed.
Name of the participant whose speech was transcribed.
Transcribed text content.
Timestamp (in milliseconds since epoch) when the transcription was generated.
Type of transcription event.
useTranscriptionprovides reactive APIs and events to manage real-time transcription and receive transcribed text within a meeting.