refac: tts split
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user