Sfoglia il codice sorgente

文本中没有标点时无法合成

passerbya 1 anno fa
parent
commit
f9fe31f200
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      cosyvoice/utils/frontend_utils.py

+ 2 - 0
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: