mirror of https://github.com/coqui-ai/TTS.git
Debug prints for phoneme extraction
This commit is contained in:
parent
e6750ca652
commit
7edb53ce63
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue