diff --git a/GPT_SoVITS/text/g2pw/g2pw.py b/GPT_SoVITS/text/g2pw/g2pw.py index 1e3738ab..e81b24de 100644 --- a/GPT_SoVITS/text/g2pw/g2pw.py +++ b/GPT_SoVITS/text/g2pw/g2pw.py @@ -144,11 +144,16 @@ def read_dict(): return polyphonic_dict -def correct_pronunciation(word,word_pinyins): - if word in pp_dict: - word_pinyins = pp_dict[word] - - return word_pinyins +def correct_pronunciation(word, word_pinyins): + new_pinyins = pp_dict.get(word, "") + if new_pinyins == "": + for idx, w in enumerate(word): + w_pinyin = pp_dict.get(w, "") + if w_pinyin != "": + word_pinyins[idx] = w_pinyin[0] + return word_pinyins + else: + return new_pinyins pp_dict = get_dict() diff --git a/webui.py b/webui.py index d510370f..60d585e8 100644 --- a/webui.py +++ b/webui.py @@ -72,7 +72,7 @@ mem = [] if_gpu_ok = False # 判断是否有能用来训练和加速推理的N卡 -ok_gpu_keywords={"10","16","20","30","40","A2","A3","A4","P4","A50","500","A60","70","80","90","M4","T4","TITAN","L4","4060","H"} +ok_gpu_keywords={"10","16","20","30","40","A2","A3","A4","P4","A50","500","A60","70","80","90","M4","T4","TITAN","L4","4060","H","600"} set_gpu_numbers=set() if torch.cuda.is_available() or ngpu != 0: for i in range(ngpu):