Transcript
Defined in: transcript.ts:64
What a listener has read of one audio track’s transcript: each segment’s latest version, less what was cut.
apply each segment read for the track and cut on each interrupt for it; linesAt gives what to show as the
audio plays. A segment’s final version is kept against later ones. Cuts are remembered, so a version that arrives
after one is clipped as if it had arrived before. A segment is known by its seq within one run of the talker’s
track, so create a new transcript when the talker starts over.
Properties
Section titled “Properties”readonly lines: TranscriptLine[];Defined in: transcript.ts:79
Every segment held, in timeline order.
Methods
Section titled “Methods”apply()
Section titled “apply()”apply(segment): boolean;Defined in: transcript.ts:71
Keep a segment’s version, clipped by the cuts so far; false if it changed nothing. Ignored: a version of a
segment the talker already sent final, a segment that starts inside a range cut earlier (as audio arriving there
late is), and an interim version of a segment a cut ended. A cut segment takes the talker’s final version,
clipped: one whose audio ended before the cut is no longer cut.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
segment |
TranscriptSegment |
Returns
Section titled “Returns”boolean
cut(range, positionUs?): void;Defined in: transcript.ts:77
Apply an interrupt’s range, with the playout position now (PlayoutClock.position()). Audio before the position
has been heard, so the cut starts at the later of fromUs and the position. It drops the segments that start in
the cut, and ends the one playing there at its start, final and cut.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
range |
TranscriptCutRange |
positionUs? |
number |
Returns
Section titled “Returns”void
linesAt()
Section titled “linesAt()”linesAt(positionUs): TranscriptLine[];Defined in: transcript.ts:81
The segments whose audio has started playing at this position, in timeline order; none while idle.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
positionUs |
number | undefined |