From 7edb53ce6328a3ffef2992cc1a34ac44e18a3288 Mon Sep 17 00:00:00 2001 From: Eren Golge Date: Wed, 2 Jan 2019 11:16:36 +0100 Subject: [PATCH] Debug prints for phoneme extraction --- utils/synthesis.py | 5 ++++- utils/text/__init__.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/synthesis.py b/utils/synthesis.py index 9b61773d..58d3c433 100644 --- a/utils/synthesis.py +++ b/utils/synthesis.py @@ -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() diff --git a/utils/text/__init__.py b/utils/text/__init__.py index cd8ab472..93a73020 100644 --- a/utils/text/__init__.py +++ b/utils/text/__init__.py @@ -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