mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-22 08:16:08 +00:00
tests for english normalization
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from tts.text.normalization.BaseNormalization import BaseNormalization
|
||||
from tts.text.normalization.common_cleaners import collapse_whitespace
|
||||
from tts.text.normalization.common_cleaners import convert_to_ascii
|
||||
from tts.text.normalization.common_cleaners import lowercase
|
||||
|
||||
class EnglishNormalization(BaseNormalization):
|
||||
|
||||
def normalize(self, raw_input_text: str) -> str:
|
||||
text = convert_to_ascii(raw_input_text)
|
||||
text = lowercase(text)
|
||||
|
||||
# TODO: Expand abbreviations
|
||||
# TODO: Expand numbers
|
||||
|
||||
text = collapse_whitespace(text)
|
||||
|
||||
return text
|
||||
Reference in New Issue
Block a user