-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
モーフィング機能を追加する #713
base: main
Are you sure you want to change the base?
モーフィング機能を追加する #713
Conversation
// ==========================================WARNING============================================== | ||
// | ||
// DO NOT BYPASS THIS OR YOU MAY VIOLATE THE ToS OF THE MODELS | ||
// | ||
// =============================================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なんか一言書いておいた方がよいかなと思い書いたのですが、これは多分違いますね。
(あと"ToS"じゃない)
書くとしたらどういう書き方がいいんでしょう?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なんか何も書かないのが正解な気がしたので消しました。
38b8732
(#713)
なんかわかりませんが、 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なんかわかりませんが、
windows-2019
でビルドできなくなるみたいですね… (2022
だと多分通る)
解決。
- if: matrix.os == 'windows-2019' | ||
name: Install Clang | ||
uses: KyleMayes/install-llvm-action@v1 | ||
with: | ||
version: "16.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
リリース時以外スキップされるwindows-x86-cpu
(i686-pc-windows-msvc
)に対しても必要。あるとビルドできるし無いとビルドできない。
can_skip_in_simple_test
を外して確かめた。
model/sample.vvm
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
変更:
metas.json
@@ -1,39 +1,45 @@
[
{
"name": "dummy1",
"styles": [
{
"name": "style1",
"id": 0
}
],
"speaker_uuid": "574bc678-8370-44be-b941-08e46e7b47d7",
"version": "0.0.1"
},
{
"name": "dummy2",
"styles": [
{
"name": "style2",
"id": 1
}
],
"speaker_uuid": "dd9ccd75-75f6-40ce-a3db-960cbed2e905",
- "version": "0.0.1"
+ "version": "0.0.1",
+ "supported_features": {
+ "permitted_synthesis_morphing": "ALL"
+ }
},
{
"name": "dummy3",
"styles": [
{
"name": "style3-1",
"id": 302
},
{
"name": "style3-2",
"id": 303
}
],
"speaker_uuid": "5d3d9aa9-88e5-4a96-8ef7-f13a3cad1cb3",
- "version": "0.0.1"
+ "version": "0.0.1",
+ "supported_features": {
+ "permitted_synthesis_morphing": "SELF_ONLY"
+ }
}
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
まーーた何も変更していないのにoutdatedになってる...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なんかこんな感じになりましたが、まあ動くのでよし?
❯ zipinfo ./model/sample.vvm
Archive: ./model/sample.vvm
Zip file size: 53465028 bytes, number of entries: 5
-rw-a-- 3.0 fat 57149888 bx defN 79-Dec-31 00:00 decode.onnx
-rw-a-- 3.0 fat 286 tx defN 23-Jul-28 05:39 manifest.json
-rw-r--r-- 3.0 unx 819 tx defN 23-Dec-31 02:57 metas.json
-rw-a-- 3.0 fat 53381 bx defN 79-Dec-31 00:00 predict_duration.onnx
-rw-a-- 3.0 fat 30803 bx defN 79-Dec-31 00:00 predict_intonation.onnx
5 files, 57235177 bytes uncompressed, 53463918 bytes compressed: 6.6%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
とりあえずこれでレビュー可能になったはず。
CStr::from_ptr(morphable_targets).to_bytes(), | ||
)?[&self.target_style]; | ||
|
||
// TODO: スナップショットテストをやる |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#713 (comment)の話ですが、通常synthesis
と一緒にやった方がよいと思うので別PRにしたいと考えています。
# Conflicts: # Cargo.lock # crates/voicevox_core/Cargo.toml
@@ -145,6 +150,8 @@ pub enum ErrorKind { | |||
UseUserDict, | |||
/// ユーザー辞書の単語のバリデーションに失敗した。 | |||
InvalidWord, | |||
/// 要求された機能を話者が持っていない。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo!感が出るのはあまりよくない気がします。
https://github.com/VOICEVOX/voicevox_engine/blob/f43881bb5f4c6ab3a3a1e5786384d1ae62600696/run.py#L620
エンジンだと「指定されたスタイルペアでのモーフィングはできません」なので、シンプルにForbiddenMorphPairとか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そのエラーがエンジンに誕生した経緯を考えると、"forbidden"のような単語が表層に表れることはできるだけ避けた方がよいかなと思いました。
ほどよく煙に巻くことができ、かつ嘘を言わず事実を指し示す塩梅としてはこうなるかなと思った次第です。
@Hiroshiba ちょっと判断をお願いします。エラーメッセージは今こうなっています。
`{speaker_name}` ({speaker_uuid})は以下の機能を持ちません: `{target_speaker_name}` ({target_speaker_uuid})に対するモーフィング
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません遅くなりました!!
permitted_synthesis_morphing
という名前で、エラーが指定されたスタイルペアでのモーフィングはできません
なんですね
https://github.com/VOICEVOX/voicevox_engine/blob/a4749af418a0e9aa277c86e0c987ac2a42d336a9/voicevox_engine/metas/Metas.py#L46-L49
エンジンに合わせるならエラーは「モーフィングできなかった(Failed?)」ですかねぇ。
(いやそれは抽象度高すぎでしょという感じならコメントください 🙇 )
case!(TestCase { | ||
base_style: 0, | ||
target_style: 0, | ||
}); | ||
case!(TestCase { | ||
base_style: 0, | ||
target_style: 1, | ||
}); | ||
case!(TestCase { | ||
base_style: 0, | ||
target_style: 302, | ||
}); | ||
case!(TestCase { | ||
base_style: 0, | ||
target_style: 303, | ||
}); | ||
|
||
case!(TestCase { | ||
base_style: 1, | ||
target_style: 0, | ||
}); | ||
case!(TestCase { | ||
base_style: 1, | ||
target_style: 1, | ||
}); | ||
case!(TestCase { | ||
base_style: 1, | ||
target_style: 302, | ||
}); | ||
case!(TestCase { | ||
base_style: 1, | ||
target_style: 303, | ||
}); | ||
|
||
case!(TestCase { | ||
base_style: 302, | ||
target_style: 0, | ||
}); | ||
case!(TestCase { | ||
base_style: 302, | ||
target_style: 1, | ||
}); | ||
case!(TestCase { | ||
base_style: 302, | ||
target_style: 302, | ||
}); | ||
case!(TestCase { | ||
base_style: 302, | ||
target_style: 303, | ||
}); | ||
|
||
case!(TestCase { | ||
base_style: 303, | ||
target_style: 0, | ||
}); | ||
case!(TestCase { | ||
base_style: 303, | ||
target_style: 1, | ||
}); | ||
case!(TestCase { | ||
base_style: 303, | ||
target_style: 302, | ||
}); | ||
case!(TestCase { | ||
base_style: 303, | ||
target_style: 303, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.rs/duplicate/latest/duplicate/macro.duplicate.html
function macroのduplicateを二段重ねすればスッキリできそうな気がします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case!
はここで定義しているマクロなので、cases!
を作ってしまってTestCase
のコンストラクタも関数化(fn testcase(u32, u32) -> TestCase
)すればいいように思えます。別PRで。
ただまあ、duplicateも悪くないかも。
内容
@White-Green さんのWhite-Green/WORLD_rsを利用してモーフィング機能を追加します。
permitted_synthesis_morphing
の追加関連 Issue
その他