Akjava commited on
Commit
19b1489
·
1 Parent(s): 1b4133e

include .!?

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -102,7 +102,9 @@ function update_tts_texts(text){
102
  //console.log(text)
103
  const replaced_text = replaceSpecialChars(text)
104
  const new_texts = []
105
- const splited = replaced_text.split(/[.!?]+\s*/);
 
 
106
  for (let i = 0; i < splited.length; i++) {
107
  const value = splited[i].trim();
108
 
 
102
  //console.log(text)
103
  const replaced_text = replaceSpecialChars(text)
104
  const new_texts = []
105
+ //const splited = replaced_text.split(/[.!?]+\s*/);
106
+ const splited = replaced_text.match(/[^.?!]+[.?!]?/g);
107
+
108
  for (let i = 0; i < splited.length; i++) {
109
  const value = splited[i].trim();
110