Skip to content

Commit

Permalink
Fix the passing of the lang parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Artrajz committed Jul 19, 2024
1 parent 2e44d31 commit 253faa7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gpt_sovits/gpt_sovits.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,13 @@ def preprocess_text(self, text: str, lang: str, segment_size: int):
text = "。" + text if lang != "en" else "." + text
if (text[-1] not in splits):
text += "。" if lang != "en" else "."
phones, word2ph, norm_text, bert_features = self.get_bert_and_cleaned_text_multilang(text)

if lang == "auto":
phones, word2ph, norm_text, bert_features = self.get_bert_and_cleaned_text_multilang(text)
else:
phones, word2ph, norm_text = self.get_cleaned_text(text, lang)
bert_features = self.get_bert_feature(text, phones, word2ph, norm_text).to(self.device)

res = {
"phones": phones,
"bert_features": bert_features,
Expand Down

0 comments on commit 253faa7

Please sign in to comment.