From 66a22f256e0a7380189b3e3442e8e8d5a0b22f77 Mon Sep 17 00:00:00 2001 From: litagin02 <139731664+litagin02@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:49:16 +0900 Subject: [PATCH 1/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2cbaad0..122a9c2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# 2024-01-05に、日本語の処理部分にあった大きいバグを修正しました。アップデートして使うのを強くおすすめします。(学習もし直すといいかもしれません。) # Style-Bert-VITS2 Bert-VITS2 with more controllable voice styles. From 77c559c5f70c9e65d9fb66ad9879fe1afe99bfaa Mon Sep 17 00:00:00 2001 From: litagin02 Date: Fri, 5 Jan 2024 21:37:57 +0900 Subject: [PATCH 2/3] Fix v-related g2p bug --- text/japanese.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/text/japanese.py b/text/japanese.py index 75a8433..de53a4d 100644 --- a/text/japanese.py +++ b/text/japanese.py @@ -19,16 +19,27 @@ def hiragana2p(text: str) -> str: - avoid using `:`, instead, `あーーー` -> `a a a a`. - avoid converting `o u` to `o o` (because the input is already actual `yomi`). - avoid using `N` for `ん` (for compatibility) + - use `v` for `ゔ` related text. """ # 3文字以上からなる変換規則 - text = text.replace("う゛ぁ", " b a") - text = text.replace("う゛ぃ", " b i") - text = text.replace("う゛ぇ", " b e") - text = text.replace("う゛ぉ", " b o") + text = text.replace("う゛ぁ", " v a") + text = text.replace("う゛ぃ", " v i") + text = text.replace("う゛ぇ", " v e") + text = text.replace("う゛ぉ", " v o") text = text.replace("う゛ゅ", " by u") + # ゔ等の処理を追加 + text = text.replace("ゔぁ", " v a") + text = text.replace("ゔぃ", " v i") + text = text.replace("ゔぇ", " v e") + text = text.replace("ゔぉ", " v o") + text = text.replace("ゔゅ", " by u") + # 2文字からなる変換規則 - text = text.replace("ぅ゛", " b u") + text = text.replace("ぅ゛", " v u") + + # ゔの処理を追加 + text = text.replace("ゔ", " v u") text = text.replace("あぁ", " a a") text = text.replace("いぃ", " i i") From 76a9a266e5db21d31cfe07841f1b16dff6c5fe32 Mon Sep 17 00:00:00 2001 From: litagin02 Date: Fri, 5 Jan 2024 21:49:29 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Move=20replacing=20of=20=E3=82=94=20to=20mo?= =?UTF-8?q?re=20appropriate=20position=20(maybe=20not=20so=20important)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- text/japanese.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/text/japanese.py b/text/japanese.py index de53a4d..af49eac 100644 --- a/text/japanese.py +++ b/text/japanese.py @@ -38,9 +38,6 @@ def hiragana2p(text: str) -> str: # 2文字からなる変換規則 text = text.replace("ぅ゛", " v u") - # ゔの処理を追加 - text = text.replace("ゔ", " v u") - text = text.replace("あぁ", " a a") text = text.replace("いぃ", " i i") text = text.replace("いぇ", " i e") @@ -244,6 +241,7 @@ def hiragana2p(text: str) -> str: text = text.replace("あ", " a") text = text.replace("い", " i") text = text.replace("う", " u") + text = text.replace("ゔ", " v u") # ゔの処理を追加 text = text.replace("え", " e") text = text.replace("お", " o") text = text.replace("か", " k a")