Skip to content

C APIとPython APIの不必要なUTF-8の要求を外す #752

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

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

qryxip
Copy link
Member

@qryxip qryxip commented Feb 23, 2024

内容

次の変更を加えます。

  • C API
    • voicevox_synthesizer_is_loaded_voice_model: 引数model_idがUTF-8ではない場合、パニックする代わりに黙ってfalseを返す。
  • Python API
    • VoiceModel::is_loaded_voice_model: 引数にRustのstrではなくPythonのstrを要求し、UTF-8ではない場合黙ってFalseを返す(C APIと一貫性を持たせる)。
    • VoiceModel::from_path: 引数がUTF-8であることを要求しない。

Java APIについては、MUTF-8 → UTF-8の変換が多分必ず成功するので、isLoadedVoiceModelも含めそのままです。

あとユーザー辞書については、別PRにしようと思います。

関連 Issue

その他

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!!

@qryxip qryxip merged commit 0ad71b0 into VOICEVOX:main Feb 23, 2024
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.

3 participants