diff --git a/webui.py b/webui.py index 3a990690..369a02f7 100644 --- a/webui.py +++ b/webui.py @@ -747,7 +747,7 @@ def switch_version(version_): return {'__type__':'update', 'value':pretrained_sovits_name[-int(version[-1])+2]}, {'__type__':'update', 'value':pretrained_sovits_name[-int(version[-1])+2].replace("s2G","s2D")}, {'__type__':'update', 'value':pretrained_gpt_name[-int(version[-1])+2]}, {'__type__':'update', 'value':pretrained_gpt_name[-int(version[-1])+2]}, {'__type__':'update', 'value':pretrained_sovits_name[-int(version[-1])+2]} def check_for_exists(file_list=[],is_train=False): - _='' + _=[] if is_train == True and file_list: file_list.append(os.path.join(file_list[0],'2-name2text.txt')) file_list.append(os.path.join(file_list[0],'3-bert')) @@ -756,8 +756,13 @@ def check_for_exists(file_list=[],is_train=False): file_list.append(os.path.join(file_list[0],'6-name2semantic.tsv')) for file in file_list: if os.path.exists(file):pass - else:_+=f'\n {file}' - if _:gr.Warning(i18n('以下文件不存在:')) + else:_.append(file) + if _: + for i in _: + if i != '': + gr.Warning(i) + gr.Warning(i18n('以下文件不存在:')) + from text.g2pw import G2PWPinyin g2pw = G2PWPinyin(model_dir="GPT_SoVITS/text/G2PWModel",model_source="GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",v_to_u=False, neutral_tone_with_five=True)