C APIとPython APIの不必要なUTF-8の要求を外す #752
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
内容
次の変更を加えます。
voicevox_synthesizer_is_loaded_voice_model
: 引数model_id
がUTF-8ではない場合、パニックする代わりに黙ってfalse
を返す。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
その他