From 69026d83bba336e2cb51ecfe696c04953437489d Mon Sep 17 00:00:00 2001 From: passerbya Date: Tue, 9 Jul 2024 17:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=A0=87=E7=82=B9=E7=BB=93?= =?UTF-8?q?=E5=B0=BE=E6=97=B6=E9=BB=98=E8=AE=A4=E5=8A=A0=E4=B8=8A=E5=8F=A5?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cosyvoice/utils/frontend_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cosyvoice/utils/frontend_utils.py b/cosyvoice/utils/frontend_utils.py index 196c82f..59489a7 100644 --- a/cosyvoice/utils/frontend_utils.py +++ b/cosyvoice/utils/frontend_utils.py @@ -92,7 +92,10 @@ def split_paragraph(text: str, tokenize, lang="zh", token_max_n=80, token_min_n= else: st = i + 1 if len(utts) == 0: - utts.append(text) + if lang == "zh": + utts.append(text + '。') + else: + utts.append(text + '.') final_utts = [] cur_utt = "" for utt in utts: