mirror of https://github.com/coqui-ai/TTS.git
bug fixes
This commit is contained in:
parent
004dd0f208
commit
28d45a8d80
|
@ -89,7 +89,7 @@ class MyDataset(Dataset):
|
||||||
file_name = os.path.basename(wav_file).split('.')[0]
|
file_name = os.path.basename(wav_file).split('.')[0]
|
||||||
tmp_path = os.path.join("tmp/",file_name+'_phoneme.npy')
|
tmp_path = os.path.join("tmp/",file_name+'_phoneme.npy')
|
||||||
if os.path.isfile(tmp_path):
|
if os.path.isfile(tmp_path):
|
||||||
text = np.load(tmp_path, dtype=np.int32)
|
text = np.load(tmp_path)
|
||||||
else:
|
else:
|
||||||
text = np.asarray(
|
text = np.asarray(
|
||||||
phoneme_to_sequence(text, [self.cleaners]), dtype=np.int32)
|
phoneme_to_sequence(text, [self.cleaners]), dtype=np.int32)
|
||||||
|
|
|
@ -75,7 +75,7 @@ def phoneme_to_sequence(text, cleaner_names):
|
||||||
clean_text = _clean_text(text, cleaner_names)
|
clean_text = _clean_text(text, cleaner_names)
|
||||||
for word in clean_text.split():
|
for word in clean_text.split():
|
||||||
phonemes_text = text2phone(word)
|
phonemes_text = text2phone(word)
|
||||||
print(word, ' -- ', phonemes_text)
|
# print(word, ' -- ', phonemes_text)
|
||||||
if phonemes_text == None:
|
if phonemes_text == None:
|
||||||
print("!! After phoneme conversion the result is None. -- {} ".format(word))
|
print("!! After phoneme conversion the result is None. -- {} ".format(word))
|
||||||
continue
|
continue
|
||||||
|
@ -158,18 +158,8 @@ def _symbols_to_sequence(symbols):
|
||||||
return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)]
|
return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)]
|
||||||
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
def _phoneme_to_sequence(phonemes):
|
def _phoneme_to_sequence(phonemes):
|
||||||
return [_phonemes_to_id[s] for s in list(phonemes) if _should_keep_phoneme(s)]
|
return [_phonemes_to_id[s] for s in list(phonemes) if _should_keep_phoneme(s)]
|
||||||
=======
|
|
||||||
def _phonem_to_sequence(phonemes):
|
|
||||||
return [_phonemes_to_id[s] for s in phonemes.split(" ") if _should_keep_phonem(s)]
|
|
||||||
>>>>>>> phonem updates
|
|
||||||
=======
|
|
||||||
def _phoneme_to_sequence(phonemes):
|
|
||||||
return [_phonemes_to_id[s] for s in phonemes.split(" ") if _should_keep_phoneme(s)]
|
|
||||||
>>>>>>> Convesntional update s
|
|
||||||
|
|
||||||
|
|
||||||
def _arpabet_to_sequence(text):
|
def _arpabet_to_sequence(text):
|
||||||
|
|
Loading…
Reference in New Issue