Skip to content

Commit

Permalink
api接口,修复文本切分符号设定中,中文分号错写为英文分号的问题 (RVC-Boss#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
Downupanddownup authored Apr 23, 2024
1 parent 96b53be commit 20c49a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def read_clean_buffer(audio_bytes):


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

0 comments on commit 20c49a3

Please sign in to comment.