Skip to content

Commit 5006b00

Browse files
DownupanddownupXXXXRT666
authored andcommitted
api接口,修复文本切分符号设定中,中文分号错写为英文分号的问题 (RVC-Boss#1001)
1 parent 8fc1e34 commit 5006b00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def read_clean_buffer(audio_bytes):
381381

382382

383383
def cut_text(text, punc):
384-
punc_list = [p for p in punc if p in {",", ".", ";", "?", "!", "、", ",", "。", "?", "!", ";", ":", "…"}]
384+
punc_list = [p for p in punc if p in {",", ".", ";", "?", "!", "、", ",", "。", "?", "!", "", ":", "…"}]
385385
if len(punc_list) > 0:
386386
punds = r"[" + "".join(punc_list) + r"]"
387387
text = text.strip("\n")
@@ -579,7 +579,7 @@ def handle(refer_wav_path, prompt_text, prompt_language, text, text_language, cu
579579
# 此时 full_precision==True, half_precision==False
580580
parser.add_argument("-sm", "--stream_mode", type=str, default="close", help="流式返回模式, close / normal / keepalive")
581581
parser.add_argument("-mt", "--media_type", type=str, default="wav", help="音频编码格式, wav / ogg / aac")
582-
parser.add_argument("-cp", "--cut_punc", type=str, default="", help="文本切分符号设定, 符号范围,.;?!、,。?!;:…")
582+
parser.add_argument("-cp", "--cut_punc", type=str, default="", help="文本切分符号设定, 符号范围,.;?!、,。?!:…")
583583
# 切割常用分句符为 `python ./api.py -cp ".?!。?!"`
584584
parser.add_argument("-hb", "--hubert_path", type=str, default=g_config.cnhubert_path, help="覆盖config.cnhubert_path")
585585
parser.add_argument("-b", "--bert_path", type=str, default=g_config.bert_path, help="覆盖config.bert_path")

0 commit comments

Comments
 (0)