mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
Debug prints for phoneme extraction
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user