mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-08-15 13:29:51 +08:00
remove duplicate spaces
This commit is contained in:
parent
ed96ffd752
commit
05bcf9c859
@ -121,7 +121,7 @@ class TextPreprocessor:
|
|||||||
|
|
||||||
def get_phones_and_bert(self, text: str, language: str, version: str, final: bool = False):
|
def get_phones_and_bert(self, text: str, language: str, version: str, final: bool = False):
|
||||||
with self.bert_lock:
|
with self.bert_lock:
|
||||||
if language in {"all_zh", "all_yue", "all_ja", "all_ko", "zh", "ja", "ko", "yue", "en", "auto", "auto_yue"}:
|
text = re.sub(r' {2,}', ' ', text)
|
||||||
textlist = []
|
textlist = []
|
||||||
langlist = []
|
langlist = []
|
||||||
if language == "all_zh":
|
if language == "all_zh":
|
||||||
|
@ -586,7 +586,7 @@ from text import chinese
|
|||||||
|
|
||||||
|
|
||||||
def get_phones_and_bert(text, language, version, final=False):
|
def get_phones_and_bert(text, language, version, final=False):
|
||||||
if language in {"all_zh", "all_yue", "all_ja", "all_ko", "zh", "ja", "ko", "yue", "en", "auto", "auto_yue"}:
|
text = re.sub(r' {2,}', ' ', text)
|
||||||
textlist = []
|
textlist = []
|
||||||
langlist = []
|
langlist = []
|
||||||
if language == "all_zh":
|
if language == "all_zh":
|
||||||
|
2
api.py
2
api.py
@ -532,7 +532,7 @@ from text import chinese
|
|||||||
|
|
||||||
|
|
||||||
def get_phones_and_bert(text, language, version, final=False):
|
def get_phones_and_bert(text, language, version, final=False):
|
||||||
if language in {"all_zh", "all_yue", "all_ja", "all_ko", "zh", "ja", "ko", "yue", "en", "auto", "auto_yue"}:
|
text = re.sub(r' {2,}', ' ', text)
|
||||||
textlist = []
|
textlist = []
|
||||||
langlist = []
|
langlist = []
|
||||||
if language == "all_zh":
|
if language == "all_zh":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user