Fix multiprocessing bert_gen error of pyopenjtalk_worker

This commit is contained in:
litagin02
2024-03-08 18:18:38 +09:00
parent 9f01e54d2d
commit ebb37ad7bb
7 changed files with 14 additions and 26 deletions

View File

@@ -52,7 +52,7 @@ def get_bert_feature(
style_res = torch.cat(style_res["hidden_states"][-3:-2], -1)[0].cpu()
style_res_mean = style_res.mean(0)
assert len(word2ph) == len(text) + 2, text
assert len(word2ph) == len(text) + 2, f"word2ph: {word2ph}, text: {text}"
word2phone = word2ph
phone_level_feature = []
for i in range(len(word2phone)):