@mcut/transcription
replaceMatch
Generated TypeScript API reference for the public mcut SDK.
mcut SDK / transcription/src / replaceMatch
Function: replaceMatch()
function replaceMatch(
caption,
match,
replacement): CaptionContentPatch;Defined in: packages/transcription/src/transcript-tools.ts:186
Replace one match, preserving word timings: the replacement's tokens map onto the matched word span, with multi-word replacements distributing the span's time proportionally to token length. Partial-word matches keep the untouched prefix/suffix of the boundary words.
Parameters
caption
match
replacement
string