mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-06 22:50:00 +08:00
调整minus识别,防止误识别转化
This commit is contained in:
parent
f6d0165843
commit
401c275c5a
@ -237,6 +237,7 @@ def normalize(text):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
text = re.sub(_ordinal_number_re, _convert_ordinal, text)
|
text = re.sub(_ordinal_number_re, _convert_ordinal, text)
|
||||||
|
text = re.sub(r'(?<!\d)-|-(?!\d)', ' minus ', text)
|
||||||
text = re.sub(_comma_number_re, _remove_commas, text)
|
text = re.sub(_comma_number_re, _remove_commas, text)
|
||||||
text = re.sub(_time_re, _expand_time, text)
|
text = re.sub(_time_re, _expand_time, text)
|
||||||
text = re.sub(_measurement_re, _expand_measurement, text)
|
text = re.sub(_measurement_re, _expand_measurement, text)
|
||||||
@ -252,7 +253,6 @@ def normalize(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("-", "minus ", text)
|
|
||||||
text = re.sub("%", " percent", text)
|
text = re.sub("%", " percent", text)
|
||||||
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user