VOICEVOX / voicevox_core

無料で使える中品質なテキスト読み上げソフトウェア、VOICEVOXのコア
https://voicevox.hiroshiba.jp/
MIT License
844 stars 114 forks source link

`metas`出力時に話者情報をマージする #728

Closed qryxip closed 6 months ago

qryxip commented 7 months ago

内容

次の2つにおいて、話者が分散しないようにします。

また話者とスタイルを、次の値をキーとしてソートするようにします。

(追記) このPR内での議論の結果、話者およびスタイルにorder: Option<u32>を持たせることにしました。

関連 Issue

Fixes #727.

その他

sevenc-nanashi commented 7 months ago

また話者とスタイルを、次の値をキーとしてソートするようにします。

  • 話者: 持っているスタイルのうち最小のスタイルID
  • スタイル: ID

compatible engineでは切った方が良さそうです、というのもずんだもんがたしか2(あまあま)->0(ノーマル)->4(セクシー)->6(ツンツン)みたいな感じ(後半二つは自信ない)のStyleIdだった記憶があるので

Hiroshiba commented 7 months ago

あっ ほんとですね。。。ソートがあると不自然な並びになるかもです。

modelディレクトリのファイルをバージョンソートしてvvmリストを作るとして、指定されたlistの順に後ろに足されていく感じだと合うと思います🙇

qryxip commented 7 months ago

今VVMの割り当てを見たのですが、VVMの順番をもって並び順を再現するのは少なくとも話者レベルでは厳しくないでしょうか? (3.vvmが波音リツ, もち子さん, 中国うさぎという構成)

metas.jsonとかにspeaker_order: numberstyle_orders: Map<number, number>を持たせるとかしないといけない気がします。

qryxip commented 7 months ago

あ、話者を今のPRの状態の

  • 話者: 持っているスタイルのうち最小のスタイルID

みたいな方向にして、スタイルもVVM単位でまとめながら各styles[0].idだけソートのキーにするようにすれば上手くいく? (初期のあまあま事件を除けばtypestyle_idで降順になっていると期待できそうなので)

Hiroshiba commented 7 months ago

おおお。。ほんとですね。。 model_indexのマップ辺りが順番も持ってたのを失念していました。

順序に関してはスタイルIDの番号に依存せず持ってたいかもです。 スタイルIDにID以外の情報をなるべく持たせたくないので…。

あ、metas.jsonにorder持たせるのいいですね!! 思いつきませんでした。個人的にはそれで十分な気がします。 @y-chan にも意見聞きたみです。

qryxip commented 6 months ago

SpeakerMeta::{speaker_order,style_order}を導入しました。 178d5ac (#728)

あとmergeに対するユニットテストを一つ入れました。 e78dd4f (#728)

qryxip commented 6 months ago

おっと何もしていないのに壊れた的な...? https://github.com/VOICEVOX/voicevox_core/actions/runs/7679657706/job/20930795908?pr=728

qryxip commented 6 months ago

あーーーー

-# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
qryxip commented 6 months ago

いや正確にはこっちか。Poetry 1.7.1は昨年11月に出てる。

@@ -808,6 +808,7 @@ files = [
     {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
     {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
     {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
+    {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},
     {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
     {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
     {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
qryxip commented 6 months ago

735