Update
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -19,4 +19,4 @@ venv/
|
||||
*.zip
|
||||
*.csv
|
||||
*.bak
|
||||
mos_*.png
|
||||
/mos_results/
|
||||
|
||||
4
app.py
4
app.py
@@ -69,7 +69,7 @@ def tts_fn(
|
||||
json_data = json.loads(kata_tone_json_str)
|
||||
# tupleを使うように変換
|
||||
for kana, tone in json_data:
|
||||
assert isinstance(kana, str) and isinstance(tone, int)
|
||||
assert isinstance(kana, str) and tone in (0, 1), f"{kana}, {tone}"
|
||||
kata_tone.append((kana, tone))
|
||||
except Exception as e:
|
||||
logger.warning(f"Error occurred when parsing kana_tone_json: {e}")
|
||||
@@ -113,7 +113,7 @@ def tts_fn(
|
||||
# アクセント指定に使えるようにアクセント情報を返す
|
||||
norm_text = text_normalize(text)
|
||||
kata_tone = g2kata_tone(norm_text)
|
||||
kata_tone_json_str = json.dumps(kata_tone, ensure_ascii=False, indent=2)
|
||||
kata_tone_json_str = json.dumps(kata_tone, ensure_ascii=False)
|
||||
elif tone is None:
|
||||
kata_tone_json_str = ""
|
||||
message = f"Success, time: {duration} seconds."
|
||||
|
||||
@@ -2,9 +2,17 @@
|
||||
|
||||
## v1.3
|
||||
|
||||
### 大きい変更
|
||||
- 日本語の発音・アクセント処理部分のバグを大幅に改良
|
||||
- `車両`が`シャリヨオ`や`見つける`が`ミッケル`と発音・学習されており、その単語のアクセント情報が全て死んでいた
|
||||
- `私はそれを見る`のアクセントが`ワ➚タシ➘ワ ソ➚レ➘オ ミ➘ル`だったのを`ワ➚タシワ ソ➚レ オ ミ➘ル`に修正
|
||||
- アクセントの誤りを修正して音声合成できるように(万能制御ではない)。
|
||||
- これまでのモデルにも使える。アクセントや発音等が改善される可能性あり。学習し直すとよりよくなる可能性もある。
|
||||
|
||||
### 改善
|
||||
- `Dataset.bat`の音声スライスと書き起こしをよりカスタマイズできるように(秒数指定や書き起こしのWhisperモデル指定や言語指定等)
|
||||
- `Style.bat`のスタイル作成で、新しい方法(DBSCAN)を追加(こちらのほうがスタイル数を指定できない代わりに特徴がよく出るかもしれません)。
|
||||
- クラウド実行等の際にパスの指定をこちらでできるように、パスの設定を`configs/paths.yml`にまとめました(colabの[ノートブック](http://colab.research.google.com/github/litagin02/Style-Bert-VITS2/blob/master/colab.ipynb)もそれに伴って変えたので新しいものを使ってください)。デフォルトは`dataset_root: Data`と`assets_root: model_assets`です。クラウド等でやる方はここを変更してください。
|
||||
- `Style.bat`のスタイル作成で、新しい可視化方法(UMAP)と新しいスタイル分けの方法(DBSCAN)を追加
|
||||
- クラウド実行等の際にパスの指定をこちらでできるように、パスの設定を`configs/paths.yml`にまとめた(colabの[ノートブック](http://colab.research.google.com/github/litagin02/Style-Bert-VITS2/blob/master/colab.ipynb)もそれに伴って更新)。デフォルトは`dataset_root: Data`と`assets_root: model_assets`なので、クラウド等でやる方はここを変更してください。
|
||||
- どのステップ数の出力がよいかの「一つの」指標として [SpeechMOS](https://github.com/tarepan/SpeechMOS) を使うスクリプトを追加:
|
||||
```bash
|
||||
python speech_mos.py -m <model_name>
|
||||
|
||||
@@ -16,6 +16,9 @@ from config import config
|
||||
|
||||
warnings.filterwarnings("ignore")
|
||||
|
||||
mos_result_dir = Path("mos_results")
|
||||
mos_result_dir.mkdir(exist_ok=True)
|
||||
|
||||
test_texts = [
|
||||
# JVNVコーパスのテキスト
|
||||
# https://sites.google.com/site/shinnosuketakamichi/research-topics/jvnv_corpus
|
||||
@@ -95,7 +98,9 @@ results = sorted(results, key=lambda x: x[2][-1], reverse=True)
|
||||
for model_file, step, scores in results:
|
||||
logger.info(f"{model_file}: {scores[-1]}")
|
||||
|
||||
with open(f"mos_{model_name}.csv", "w", encoding="utf-8", newline="") as f:
|
||||
with open(
|
||||
mos_result_dir / f"mos_{model_name}.csv", "w", encoding="utf-8", newline=""
|
||||
) as f:
|
||||
writer = csv.writer(f)
|
||||
writer.writerow(["model_path"] + ["step"] + test_texts + ["mean"])
|
||||
for model_file, step, scores in results:
|
||||
@@ -147,7 +152,7 @@ plt.legend(loc="upper left", bbox_to_anchor=(1, 1))
|
||||
plt.tight_layout()
|
||||
|
||||
# グラフを画像として保存(plt.show() の前に実行する)
|
||||
plt.savefig(f"mos_{model_name}.png")
|
||||
plt.savefig(mos_result_dir / f"mos_{model_name}.png")
|
||||
|
||||
# グラフを表示
|
||||
plt.show()
|
||||
|
||||
Reference in New Issue
Block a user