From 4e67931fe9bedb1e2be0b4f188c95d699a091227 Mon Sep 17 00:00:00 2001 From: erew123 <35898566+erew123@users.noreply.github.com> Date: Sat, 20 Apr 2024 10:28:18 +0100 Subject: [PATCH] bug fix --- tts_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tts_server.py b/tts_server.py index 604acae..8974b49 100644 --- a/tts_server.py +++ b/tts_server.py @@ -1088,13 +1088,13 @@ async def tts_generate( cleaned_string = html.unescape(standard_filtering(text_input)) cleaned_string = re.sub(r'([!?.])\1+', r'\1', text_input) # Further clean to remove any other unwanted characters - cleaned_string = re.sub(r'[^a-zA-Z0-9\s\.,;:!?\-\'"\u0400-\u04FFÀ-ÿ\u0150\u0151\u0170\u0171\u0900-\u097F\$]', '', cleaned_part) + cleaned_string = re.sub(r'[^a-zA-Z0-9\s\.,;:!?\-\'"\u0400-\u04FFÀ-ÿ\u0150\u0151\u0170\u0171\u0900-\u097F\$]', '', cleaned_string) # Remove all newline characters (single or multiple) cleaned_string = re.sub(r'\n+', ' ', cleaned_string) elif text_filtering == "standard": cleaned_string = re.sub(r'([!?.])\1+', r'\1', text_input) # Further clean to remove any other unwanted characters - cleaned_string = re.sub(r'[^a-zA-Z0-9\s\.,;:!?\-\'"\u0400-\u04FFÀ-ÿ\u0150\u0151\u0170\u0171\u0900-\u097F\$]', '', cleaned_part) + cleaned_string = re.sub(r'[^a-zA-Z0-9\s\.,;:!?\-\'"\u0400-\u04FFÀ-ÿ\u0150\u0151\u0170\u0171\u0900-\u097F\$]', '', cleaned_string) # Remove all newline characters (single or multiple) cleaned_string = re.sub(r'\n+', ' ', cleaned_string) else: