Skip to main content

split_sentences

Function split_sentences 

Source
pub fn split_sentences(text: &str) -> Vec<String>
Expand description

Split text into sentence-sized chunks suitable for streaming synthesis.

Splits on sentence-ending punctuation while preserving the punctuation at the end of each chunk. Handles both Japanese (。!?) and Western (.!?) sentence terminators.

Consecutive whitespace between sentences is trimmed. Empty text returns an empty Vec.