Skip to content

Commit 690bf32

Browse files
committed
Fix lang_seq binarizing error
1 parent 082b531 commit 690bf32

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

preprocessing/acoustic_binarizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def load_meta_data(self, raw_data_dir: pathlib.Path, ds_id, spk, lang):
9292
'lang_seq': [
9393
(
9494
self.lang_map[lang if '/' not in p else p.split('/', maxsplit=1)[0]]
95-
if self.phoneme_dictionary.is_cross_lingual(p)
95+
if self.phoneme_dictionary.is_cross_lingual(p if '/' in p else f'{lang}/{p}')
9696
else 0
9797
)
9898
for p in utterance_label['ph_seq'].split()

preprocessing/variance_binarizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def require(attr, optional=False):
153153
'lang_seq': [
154154
(
155155
self.lang_map[lang if '/' not in p else p.split('/', maxsplit=1)[0]]
156-
if self.phoneme_dictionary.is_cross_lingual(p)
156+
if self.phoneme_dictionary.is_cross_lingual(p if '/' in p else f'{lang}/{p}')
157157
else 0
158158
)
159159
for p in utterance_label['ph_seq'].split()

0 commit comments

Comments
 (0)