From 050bddcabc162d2620d8e19f547b1adc06f0bb5c Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Thu, 26 Oct 2023 16:07:58 +0800 Subject: [PATCH] fix: make TTS more smooth by not splitting at dots Signed-off-by: Frost Ming --- xiaogpt/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xiaogpt/utils.py b/xiaogpt/utils.py index a6de1b65..da67b49f 100644 --- a/xiaogpt/utils.py +++ b/xiaogpt/utils.py @@ -29,7 +29,7 @@ def calculate_tts_elapse(text: str) -> float: return len(_no_elapse_chars.sub("", text)) / speed -_ending_punctuations = ("。", "?", "!", ";", ".", "?", "!", ";") +_ending_punctuations = ("。", "?", "!", ";", "\n", "?", "!", ";") async def split_sentences(text_stream: AsyncIterator[str]) -> AsyncIterator[str]: