From 2e361e2306338b674650548c47f5ea14b65e1bc3 Mon Sep 17 00:00:00 2001 From: Eren Golge Date: Fri, 29 Mar 2019 17:05:44 +0100 Subject: [PATCH] strip sting after phonemizer --- utils/text/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/text/__init__.py b/utils/text/__init__.py index 37bc35f6..2683ddc2 100644 --- a/utils/text/__init__.py +++ b/utils/text/__init__.py @@ -28,7 +28,7 @@ def text2phone(text, language): #try: punctuations = re.findall(pat, text) ph = phonemize(text, separator=seperator, strip=False, njobs=1, backend='espeak', language=language) - ph = ph[:-1] # skip the last empty character + ph = ph[:-1].strip() # skip the last empty character # Replace \n with matching punctuations. if len(punctuations) > 0: # if text ends with a punctuation.