Refactor: split style_bert_vits2.nlp.chinese package

Configured so that the same public function is exported from the module with the same name for each language.
This commit is contained in:
tsukumi
2024-03-08 09:04:40 +00:00
parent a672aeefd9
commit df68771651
6 changed files with 210 additions and 206 deletions

View File

@@ -82,7 +82,8 @@ def clean_text(
norm_text = normalize_text(text)
phones, tones, word2ph = g2p(norm_text)
elif language == Languages.ZH:
from style_bert_vits2.nlp.chinese import g2p, normalize_text
from style_bert_vits2.nlp.chinese.g2p import g2p
from style_bert_vits2.nlp.chinese.normalizer import normalize_text
norm_text = normalize_text(text)
phones, tones, word2ph = g2p(norm_text)
else: