StreamSubtitlesInputNode.sendFragments() method

Send timed text fragments (ideally timed words) which can later be split and formatted into subtitle cues

Timestamps are required for each fragment, which should of course be ordered, and the start/end of the run of fragments. The presence of the overall start/end time allows signalling of a gap with no speech so as not to hold up accumulated cues/other streams downstream. It is advisable to send an empty message initially when the appropriate timestamp is known.

Signature:

sendFragments(message: {
        fragments: SubtitleFragment[];
        startTimestamp: Interval;
        endTimestamp: Interval;
    }): void;

Parameters

Parameter Type Description

message

{ fragments: SubtitleFragment[]; startTimestamp: Interval; endTimestamp: Interval; }

Returns:

void