Fix: initialize worker and dict for use

This commit is contained in:
litagin02
2024-03-12 15:23:18 +09:00
parent 7736532c75
commit bc0729d970
6 changed files with 43 additions and 23 deletions

View File

@@ -10,9 +10,18 @@ from style_bert_vits2.logging import logger
from style_bert_vits2.models import commons
from style_bert_vits2.models.hyper_parameters import HyperParameters
from style_bert_vits2.nlp import cleaned_text_to_sequence, extract_bert_feature
from style_bert_vits2.nlp.japanese import pyopenjtalk_worker
from style_bert_vits2.nlp.japanese.user_dict import update_dict
from style_bert_vits2.utils.stdout_wrapper import SAFE_STDOUT
# このプロセスからはワーカーを起動して辞書を使いたいので、ここで初期化
pyopenjtalk_worker.initialize_worker()
# dict_data/ 以下の辞書データを pyopenjtalk に適用
update_dict()
def process_line(x):
line, add_blank = x
device = config.bert_gen_config.device