Skip to content

Commit fb6dbec

Browse files
committed
Fix lang_seq inference error
1 parent 690bf32 commit fb6dbec

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

inference/ds_acoustic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def preprocess_input(self, param, idx=0):
8888
languages = torch.LongTensor([
8989
(
9090
self.lang_map[lang if '/' not in p else p.split('/', maxsplit=1)[0]]
91-
if self.phoneme_dictionary.is_cross_lingual(p)
91+
if self.phoneme_dictionary.is_cross_lingual(p if '/' in p else f'{lang}/{p}')
9292
else 0
9393
)
9494
for p in param['ph_seq'].split()

inference/ds_variance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def preprocess_input(
112112
languages = torch.LongTensor([
113113
(
114114
self.lang_map[lang if '/' not in p else p.split('/', maxsplit=1)[0]]
115-
if self.phoneme_dictionary.is_cross_lingual(p)
115+
if self.phoneme_dictionary.is_cross_lingual(p if '/' in p else f'{lang}/{p}')
116116
else 0
117117
)
118118
for p in param['ph_seq'].split()

0 commit comments

Comments
 (0)