Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 chinese2.py 中 model_source 在训练时的路径获取问题 #1774

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion GPT_SoVITS/text/chinese2.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
print("当前使用g2pw进行拼音推理")
from text.g2pw import G2PWPinyin, correct_pronunciation
parent_directory = os.path.dirname(current_file_path)
g2pw = G2PWPinyin(model_dir="GPT_SoVITS/text/G2PWModel",model_source=os.environ.get("bert_path","GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large"),v_to_u=False, neutral_tone_with_five=True)
g2pw = G2PWPinyin(model_dir="GPT_SoVITS/text/G2PWModel",
model_source=os.environ.get("bert_path") or os.environ.get("bert_pretrained_dir") or "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",
v_to_u=False, neutral_tone_with_five=True)

rep_map = {
":": ",",
Expand Down