GitHub

Source

useTrackTranscription

Note

This feature is experimental and may change or be removed based on developer feedback and real-world usage.

Import

import { useTrackTranscription } from "@livekit/components-react";

Properties

trackRefTrackReferenceOrPlaceholder | undefinedRequired
options.bufferSizenumberOptional

how many transcription segments should be buffered in state

options.onTranscription(newSegments: TranscriptionSegment[]) => voidOptional

optional callback for retrieving newly incoming transcriptions only

Returns

An object consisting of segments with maximum length of opts.windowLength and activeSegments that are valid for the current track timestamp

{
segments: ReceivedTranscriptionSegment[];
}