mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-06 14:40:00 +08:00
Update english.py
This commit is contained in:
parent
5aeb544c90
commit
6520951c74
@ -237,6 +237,7 @@ def text_normalize(text):
|
|||||||
text = normalize_numbers(text)
|
text = normalize_numbers(text)
|
||||||
text = ''.join(char for char in unicodedata.normalize('NFD', text)
|
text = ''.join(char for char in unicodedata.normalize('NFD', text)
|
||||||
if unicodedata.category(char) != 'Mn') # Strip accents
|
if unicodedata.category(char) != 'Mn') # Strip accents
|
||||||
|
text = re.sub("%", " percent", text) # 将 % 转化为 “percent”
|
||||||
text = re.sub("[^ A-Za-z'.,?!\-]", "", text)
|
text = re.sub("[^ A-Za-z'.,?!\-]", "", text)
|
||||||
text = re.sub(r"(?i)i\.e\.", "that is", text)
|
text = re.sub(r"(?i)i\.e\.", "that is", text)
|
||||||
text = re.sub(r"(?i)e\.g\.", "for example", text)
|
text = re.sub(r"(?i)e\.g\.", "for example", text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user