refac: tts split

This commit is contained in:
Timothy Jaeryang Baek
2026-01-09 19:08:35 +04:00
parent bb6188abf0
commit 869108a3e1
+2 -2
View File
@@ -894,8 +894,8 @@ export const extractSentences = (text: string) => {
return placeholder;
});
// Split the modified text into sentences based on common punctuation marks, avoiding these blocks
let sentences = text.split(/(?<=[.!?])\s+/);
// Split the modified text into sentences based on common punctuation marks or newlines, avoiding these blocks
let sentences = text.split(/(?<=[.!?])\s+|\n+/);
// Restore code blocks and process sentences
sentences = sentences.map((sentence) => {