From 6c215b59c1f46a6c61c2ff68fd844ef14f3790b9 Mon Sep 17 00:00:00 2001 From: lyris Date: Tue, 21 May 2024 06:17:54 +0800 Subject: [PATCH 1/2] Update english.py copy but not ref the phones list becoz it will be extend later, if not do so,it will affect the self.cmu dict values. --- GPT_SoVITS/text/english.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPT_SoVITS/text/english.py b/GPT_SoVITS/text/english.py index 68ce789..30fafb5 100644 --- a/GPT_SoVITS/text/english.py +++ b/GPT_SoVITS/text/english.py @@ -320,7 +320,7 @@ class en_G2p(G2p): # 尝试分离所有格 if re.match(r"^([a-z]+)('s)$", word): - phones = self.qryword(word[:-2]) + phones = self.qryword(word[:-2])[:] # P T K F TH HH 无声辅音结尾 's 发 ['S'] if phones[-1] in ['P', 'T', 'K', 'F', 'TH', 'HH']: phones.extend(['S']) @@ -359,4 +359,4 @@ def g2p(text): if __name__ == "__main__": print(g2p("hello")) print(g2p(text_normalize("e.g. I used openai's AI tool to draw a picture."))) - print(g2p(text_normalize("In this; paper, we propose 1 DSPGAN, a GAN-based universal vocoder."))) \ No newline at end of file + print(g2p(text_normalize("In this; paper, we propose 1 DSPGAN, a GAN-based universal vocoder."))) From 4ebf87907d330740f4b2dfb5b515bddf5da1c604 Mon Sep 17 00:00:00 2001 From: lyris Date: Thu, 22 Aug 2024 17:19:31 +0800 Subject: [PATCH 2/2] Update utils.py revert trainning log's logging level from "ERROR" to "DEBUG" --- GPT_SoVITS/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPT_SoVITS/utils.py b/GPT_SoVITS/utils.py index 177eda1..9e1b5b5 100644 --- a/GPT_SoVITS/utils.py +++ b/GPT_SoVITS/utils.py @@ -319,13 +319,13 @@ def check_git_hash(model_dir): def get_logger(model_dir, filename="train.log"): global logger logger = logging.getLogger(os.path.basename(model_dir)) - logger.setLevel(logging.ERROR) + logger.setLevel(logging.DEBUG) formatter = logging.Formatter("%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s") if not os.path.exists(model_dir): os.makedirs(model_dir) h = logging.FileHandler(os.path.join(model_dir, filename)) - h.setLevel(logging.ERROR) + h.setLevel(logging.DEBUG) h.setFormatter(formatter) logger.addHandler(h) return logger