startTranscription method
Starts real-time transcription for the current room session.
- When real-time transcription starts, all participants, including the
local participant, will receive a
Events.transcriptionStateChanged event with the
TRANSCRIPTION_STARTINGstate, along with Events.transcriptionText events containing the transcribed text.
Parameters
-
transcriptionConfig(optional): Configuration for real-time transcription:-
webhookUrl: A URL that will be triggered whenever the state of real-time transcription changes. Learn more about webhooks: https://en.wikipedia.org/wiki/Webhook -
summaryConfig: Configuration for generating a summary from the real-time transcription:enabled: Enables summary generation. The summary will be available after transcription is stopped. Default:falseprompt: Custom instructions for generating the summary based on the transcription content.
-
Events associated with startTranscription()
- Events.transcriptionStateChanged with state
TRANSCRIPTION_STARTING - Events.transcriptionText
Example
final transcriptionConfig = TranscriptionConfig(
webhookUrl: 'https://webhook.your-api-server.com',
summaryConfig: SummaryConfig(
enabled: true,
prompt:
'Write summary in sections like Title, Agenda, Speakers, '
'Action Items, Outlines, Notes and Summary',
),
);
await room.startTranscription(
transcriptionConfig: transcriptionConfig,
);
Implementation
Future<void> startTranscription({TranscriptionConfig? transcriptionConfig}) =>
_startTranscription(transcriptionConfig: transcriptionConfig);