From f9fe31f2005acecd865c34c2c1cd29cd9052460e Mon Sep 17 00:00:00 2001 From: passerbya Date: Tue, 9 Jul 2024 17:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=B8=AD=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=A0=87=E7=82=B9=E6=97=B6=E6=97=A0=E6=B3=95=E5=90=88=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cosyvoice/utils/frontend_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cosyvoice/utils/frontend_utils.py b/cosyvoice/utils/frontend_utils.py index bcd637c..196c82f 100644 --- a/cosyvoice/utils/frontend_utils.py +++ b/cosyvoice/utils/frontend_utils.py @@ -91,6 +91,8 @@ def split_paragraph(text: str, tokenize, lang="zh", token_max_n=80, token_min_n= st = i + 2 else: st = i + 1 + if len(utts) == 0: + utts.append(text) final_utts = [] cur_utt = "" for utt in utts: