Przeglądaj źródła

for h5 timestamp parse bug (#1084)

zhaomingwork 2 lat temu
rodzic
commit
1966047a0b
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      runtime/html5/static/main.js

+ 1 - 1
runtime/html5/static/main.js

@@ -315,7 +315,7 @@ function handleWithTimestamp(tmptext,tmptime)
 	{
 		return tmptext;
 	}
-	tmptext=tmptext.replace(/。/g, ","); // in case there are a lot of "。"
+	tmptext=tmptext.replace(/。|?|,|、|\?|\./g, ","); // replace all punc for parse
 	var words=tmptext.split(",");
 	var jsontime=JSON.parse(tmptime); //JSON.parse(tmptime.replace(/\]\]\[\[/g, "],[")); // in case there are a lot segments by VAD
 	var char_index=0;