Fix phoneme cache file name aliasing problem

When the wav file has multiple dots in the file name,
_load_or_generate_phoneme_sequence would only use only the first segment
of the file name and cause overwrite of *_phoneme.npy
This commit is contained in:
ForceCore 2020-05-31 19:51:16 +09:00
Родитель f3209924f3
Коммит 3f78918715
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -92,7 +92,7 @@ class MyDataset(Dataset):
return phonemes
def _load_or_generate_phoneme_sequence(self, wav_file, text):
file_name = os.path.basename(wav_file).split('.')[0]
file_name = os.path.splitext(os.path.basename(wav_file))[0]
cache_path = os.path.join(self.phoneme_cache_path,
file_name + '_phoneme.npy')
try: