Skip to main content

soft_split_text_segments

Function soft_split_text_segments 

Source
pub fn soft_split_text_segments(
    text: &str,
    start: f64,
    end: f64,
    max_chars: usize,
) -> Vec<Segment>
Expand description

Soft-split an overlong single segment into adjacent pieces under max_chars.

Used when a vendor returns one continuous hyp for a chunk that still exceeds TranscriptLimits::max_segment_chars (rare for ~210s speech, but fail-closed without soft-split would block the whole job).