mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-12 19:42:19 +00:00
add text normalize
This commit is contained in:
parent
8ca2b2695e
commit
50b97d4332
3
egs/libriheavy/TTS/local/prepare_manifest.py
Normal file → Executable file
3
egs/libriheavy/TTS/local/prepare_manifest.py
Normal file → Executable file
@ -34,8 +34,7 @@ class TextNormlizer:
|
||||
# brackets
|
||||
# Always text inside brackets with numbers in them. Usually corresponds to "(Sam 23:17)"
|
||||
text = re.sub(r"\([^\)]*\d[^\)]*\)", " ", text)
|
||||
if remove_brackets:
|
||||
text = re.sub(r"\([^\)]*\)", " ", text)
|
||||
text = re.sub(r"\([^\)]*\)", " ", text)
|
||||
|
||||
# Apply mappings
|
||||
table = str.maketrans("’‘,。;?!():-《》、“”【】", "'',.;?!(): <>/\"\"[]")
|
||||
|
Loading…
x
Reference in New Issue
Block a user