mirror of https://github.com/coqui-ai/TTS.git
remove debug prints
This commit is contained in:
parent
b9629135db
commit
524743507c
|
@ -76,11 +76,13 @@ def text2phone(text):
|
||||||
punctuations = re.findall(pat, text)
|
punctuations = re.findall(pat, text)
|
||||||
ph = phonemizer.phonemize(text, separator=seperator, strip=False, njobs=1, backend='espeak', language='en-us')
|
ph = phonemizer.phonemize(text, separator=seperator, strip=False, njobs=1, backend='espeak', language='en-us')
|
||||||
# Replace \n with matching punctuations.
|
# Replace \n with matching punctuations.
|
||||||
for punct in punctuations[:-1]:
|
if len(punctuations) > 0:
|
||||||
ph = ph.replace(' \n', punct+'| ', 1)
|
for punct in punctuations[:-1]:
|
||||||
ph = ph[:-1] + punctuations[-1]
|
ph = ph.replace(' \n', punct+'| ', 1)
|
||||||
#except:
|
try:
|
||||||
# ph = None
|
ph = ph[:-1] + punctuations[-1]
|
||||||
|
except:
|
||||||
|
print(text)
|
||||||
return ph
|
return ph
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,7 +93,7 @@ def phoneme_to_sequence(text, cleaner_names):
|
||||||
sequence = []
|
sequence = []
|
||||||
clean_text = _clean_text(text, cleaner_names)
|
clean_text = _clean_text(text, cleaner_names)
|
||||||
phonemes = text2phone(clean_text)
|
phonemes = text2phone(clean_text)
|
||||||
print(phonemes.replace('|', ''))
|
# print(phonemes.replace('|', ''))
|
||||||
if phonemes is None:
|
if phonemes is None:
|
||||||
print("!! After phoneme conversion the result is None. -- {} ".format(clean_text))
|
print("!! After phoneme conversion the result is None. -- {} ".format(clean_text))
|
||||||
for phoneme in phonemes.split('|'):
|
for phoneme in phonemes.split('|'):
|
||||||
|
|
Loading…
Reference in New Issue