Update tts_chunk_player.html
bumped sentence splitting
This commit is contained in:
1 parent
374c794fa9
commit
a22830f700
1 file changed
+2
-3
@@ -655,8 +655,7 @@
|
|||||||
cleanedText = cleanedText.replace(/%/g, " percent");
|
cleanedText = cleanedText.replace(/%/g, " percent");
|
||||||
cleanedText = cleanedText.replace(/\.\s'/g, ".'");
|
cleanedText = cleanedText.replace(/\.\s'/g, ".'");
|
||||||
cleanedText = cleanedText.replace(/[^a-zA-Z0-9\s\.,;:!?\-\'"À-ÿ\u0400-\u04FF\u0150\u0151\u0170\u0171]\$/g, '');
|
cleanedText = cleanedText.replace(/[^a-zA-Z0-9\s\.,;:!?\-\'"À-ÿ\u0400-\u04FF\u0150\u0151\u0170\u0171]\$/g, '');
|
||||||
//let sentences = cleanedText.match(/("[^"]+"|[^.!?]+[.!?]+)/g);
|
let sentences = cleanedText.split(/(?<=[.!?:])\s+/);
|
||||||
let sentences = cleanedText.match(/(?:\d+\.\d+|[^\d.!?])+\b[.!?]+(?=\s|$)/g);
|
|
||||||
|
|
||||||
if (!sentences) {
|
if (!sentences) {
|
||||||
console.error("No sentences found in the input text.");
|
console.error("No sentences found in the input text.");
|
||||||
@@ -1666,4 +1665,4 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in new issue
Block a user