mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
refac: tts split
This commit is contained in:
parent
bb6188abf0
commit
869108a3e1
1 changed files with 2 additions and 2 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue