mcut
@mcut/transcription

splitCaptionAtWord

Generated TypeScript API reference for the public mcut SDK.

mcut SDK


mcut SDK / transcription/src / splitCaptionAtWord

Function: splitCaptionAtWord()

function splitCaptionAtWord(caption, wordIndex): CaptionSplitResult | null;

Defined in: packages/transcription/src/transcript-tools.ts:283

Split a caption immediately BEFORE wordIndex. Returns null when the boundary doesn't yield two valid captions (no word mapping, index at the edges, or either half shorter than the minimum element duration).

Parameters

caption

TranscriptCaption

wordIndex

number

Returns

CaptionSplitResult | null

On this page