Debug prints for phoneme extraction

This commit is contained in:
Eren Golge 2019-01-02 11:16:36 +01:00
parent e6750ca652
commit 7edb53ce63
2 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,10 @@ from matplotlib import pylab as plt
def synthesis(m, s, CONFIG, use_cuda, ap):
""" Given the text, synthesising the audio """
text_cleaner = [CONFIG.text_cleaner]
seq = np.array(phoneme_to_sequence(s, text_cleaner))
# print(phoneme_to_sequence(s, text_cleaner))
# print(sequence_to_phoneme(phoneme_to_sequence(s, text_cleaner)))
seq = np.asarray(
phoneme_to_sequence(s, text_cleaner), dtype=np.int32)
chars_var = torch.from_numpy(seq).unsqueeze(0)
if use_cuda:
chars_var = chars_var.cuda()

View File

@ -24,6 +24,7 @@ def phoneme_to_sequence(text, cleaner_names):
clean_text = _clean_text(text, cleaner_names)
for word in clean_text.split():
phonemes_text = text2phone(word)
print(word, ' -- ', phonemes_text)
if phonemes_text == None:
print("!! After phoneme conversion the result is None. -- {} ".format(word))
continue