-
Notifications
You must be signed in to change notification settings - Fork 116
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
C-APIのnew_with_initializeで初期化した場合、metas jsonが空になってしまうことの修正 #575
C-APIのnew_with_initializeで初期化した場合、metas jsonが空になってしまうことの修正 #575
Conversation
|
||
#[rstest] | ||
#[tokio::test] | ||
async fn new_with_initialize_must_output_metas_json() { |
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.
動作させるためには ./target/debug/deps/model
に sample.vvm
を配置しないといけないので、どう初期化するかに悩んでいます…
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.
以前ではVV_MODELS_ROOT_DIR
みたいな環境変数でmodel
ディレクトリの位置を制御してた記憶があります。それを入れるとか?
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.
おっ、そんなものが
crates/voicevox_core_c_api/tests/e2e/testcases/synthesizer_new_with_initialize_output_json.rs
Outdated
Show resolved
Hide resolved
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.
LGTM!
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.
LGTM!!
内容
new_with_initialize
をload_all_models = true
な options で Synthesizerを初期化した後に、voicevox_synthesizer_get_metas_json
を呼び出すとmetasが空文字列で返ってきてしまう。内部でmetasは取得できているのに default で返ってきてしまうのは不適切な挙動に見える。
そのため、空文字列で
metas_cstring
を初期化せずに、先にsynthesizerを初期化し、そこから取得したmetasを初期値とした。関連 Issue
その他