Fix BasePhonemizer

This commit is contained in:
Eren Gölge
2022-02-25 10:48:02 +01:00
parent 10d435ce77
commit ff7c385838
+4
View File
@@ -92,8 +92,12 @@ class BasePhonemizer(abc.ABC):
def _phonemize_preprocess(self, text) -> Tuple[List[str], List]:
"""Preprocess the text before phonemization
1. remove spaces
2. remove punctuation
Override this if you need a different behaviour
"""
text = text.strip()
if self._keep_puncs:
# a tuple (text, punctuation marks)
return self._punctuator.strip_to_restore(text)