Skip to content
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

Merged
merged 6 commits into from
Aug 12, 2023

Conversation

yamachu
Copy link
Member

@yamachu yamachu commented Aug 10, 2023

内容

new_with_initializeload_all_models = true な options で Synthesizerを初期化した後に、voicevox_synthesizer_get_metas_json を呼び出すとmetasが空文字列で返ってきてしまう。
内部でmetasは取得できているのに default で返ってきてしまうのは不適切な挙動に見える。

そのため、空文字列で metas_cstring を初期化せずに、先にsynthesizerを初期化し、そこから取得したmetasを初期値とした。

関連 Issue

その他


#[rstest]
#[tokio::test]
async fn new_with_initialize_must_output_metas_json() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動作させるためには ./target/debug/deps/modelsample.vvm を配置しないといけないので、どう初期化するかに悩んでいます…

Copy link
Member

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ディレクトリの位置を制御してた記憶があります。それを入れるとか?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おっ、そんなものが

@yamachu yamachu marked this pull request as ready for review August 10, 2023 12:44
Copy link
Member

@qryxip qryxip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@Hiroshiba Hiroshiba merged commit 07ded4e into VOICEVOX:main Aug 12, 2023
26 checks passed
@qryxip qryxip mentioned this pull request Aug 12, 2023
4 tasks
qryxip added a commit to qryxip/voicevox_core that referenced this pull request Aug 12, 2023
@yamachu yamachu deleted the new_with_initialize-initialize-metas branch September 6, 2023 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants