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

[breaking] Update submodules #109

Merged
merged 8 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/csharp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
- run: |
cp open_jtalk_dic_utf_8-1.11.tar.gz ./tests/VoicevoxCoreSharp.Core.Tests/resources
tar zxf ./tests/VoicevoxCoreSharp.Core.Tests/resources/open_jtalk_dic_utf_8-1.11.tar.gz -C tests/VoicevoxCoreSharp.Core.Tests/resources/
- run: cp -r binding/voicevox_core/model ./tests/VoicevoxCoreSharp.Core.Tests/resources
- name: sample.vvmを自前でzipコマンドで作成する
run: mkdir -p tests/VoicevoxCoreSharp.Core.Tests/resources/model; cd binding/voicevox_core/model/sample.vvm; zip -r ../../../../tests/VoicevoxCoreSharp.Core.Tests/resources/model/sample.vvm .
Copy link
Owner Author

Choose a reason for hiding this comment

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

本来は crates/test_util/data/model 以下に生成された sample.vvm を使用するのがいいが、cacheなどの関係上変更が若干面倒なので、やるとしても別のPRで出来るようにしたい

- run: dotnet test VoicevoxCoreSharp-without-exmaples.slnf

run-dotnet-cli-example:
Expand Down
2 changes: 1 addition & 1 deletion binding/voicevox_core
Submodule voicevox_core updated 77 files
+0 −4 .cargo/config.toml
+3 −0 .github/actions/create-venv/action.yml
+3 −0 .github/actions/rust-toolchain-from-file/action.yml
+9 −26 .github/workflows/build_and_deploy.yml
+1 −1 .github/workflows/generate_document.yml
+1 −1 .github/workflows/java_lint.yml
+8 −8 .github/workflows/test.yml
+130 −985 Cargo.lock
+5 −7 Cargo.toml
+4 −5 crates/test_util/Cargo.toml
+75 −19 crates/test_util/build.rs
+5 −51 crates/test_util/src/lib.rs
+6 −4 crates/voicevox_core/Cargo.toml
+4 −5 crates/voicevox_core/src/__internal/doctest_fixtures.rs
+4 −1 crates/voicevox_core/src/__internal/interop.rs
+15 −5 crates/voicevox_core/src/error.rs
+25 −12 crates/voicevox_core/src/infer.rs
+22 −0 crates/voicevox_core/src/infer/domains.rs
+16 −6 crates/voicevox_core/src/infer/domains/talk.rs
+129 −155 crates/voicevox_core/src/infer/runtimes/onnxruntime.rs
+101 −0 crates/voicevox_core/src/infer/session_set.rs
+0 −429 crates/voicevox_core/src/infer/status.rs
+3 −1 crates/voicevox_core/src/lib.rs
+104 −21 crates/voicevox_core/src/manifest.rs
+57 −1 crates/voicevox_core/src/metas.rs
+425 −0 crates/voicevox_core/src/status.rs
+35 −45 crates/voicevox_core/src/synthesizer.rs
+0 −11 crates/voicevox_core/src/test_data/model_sources/load_model_works1/manifest.json
+2 −20 crates/voicevox_core/src/test_util.rs
+291 −97 crates/voicevox_core/src/voice_model.rs
+2 −0 crates/voicevox_core_c_api/Cargo.toml
+7 −3 crates/voicevox_core_c_api/include/voicevox_core.h
+5 −3 crates/voicevox_core_c_api/src/c_impls.rs
+2 −5 crates/voicevox_core_c_api/src/compatible_engine.rs
+11 −1 crates/voicevox_core_c_api/src/helpers.rs
+23 −26 crates/voicevox_core_c_api/src/lib.rs
+3 −0 crates/voicevox_core_c_api/src/result_code.rs
+1 −6 crates/voicevox_core_c_api/tests/e2e/assert_cdylib.rs
+3 −11 crates/voicevox_core_c_api/tests/e2e/main.rs
+8 −0 crates/voicevox_core_c_api/tests/e2e/snapshots.toml
+1 −2 crates/voicevox_core_c_api/tests/e2e/testcases/simple_tts.rs
+1 −2 crates/voicevox_core_c_api/tests/e2e/testcases/synthesizer_new_output_json.rs
+1 −2 crates/voicevox_core_c_api/tests/e2e/testcases/tts_via_audio_query.rs
+1 −1 crates/voicevox_core_c_api/tests/e2e/testcases/user_dict_load.rs
+4 −0 crates/voicevox_core_java_api/Cargo.toml
+5 −4 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/Synthesizer.java
+18 −2 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/VoiceModel.java
+14 −0 ...cevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/InvalidModelFormatException.java
+1 −1 crates/voicevox_core_java_api/lib/src/test/java/jp/hiroshiba/voicevoxcore/MetaTest.java
+1 −1 crates/voicevox_core_java_api/lib/src/test/java/jp/hiroshiba/voicevoxcore/TestUtils.java
+36 −0 crates/voicevox_core_java_api/lib/src/test/java/jp/hiroshiba/voicevoxcore/VoiceModelTest.java
+1 −1 crates/voicevox_core_java_api/settings.gradle
+55 −1 crates/voicevox_core_java_api/src/common.rs
+7 −5 crates/voicevox_core_java_api/src/logger.rs
+7 −7 crates/voicevox_core_java_api/src/synthesizer.rs
+2 −4 crates/voicevox_core_java_api/src/voice_model.rs
+12 −6 crates/voicevox_core_macros/src/inference_domain.rs
+6 −5 crates/voicevox_core_macros/src/lib.rs
+1 −0 crates/voicevox_core_python_api/Cargo.toml
+3 −1 crates/voicevox_core_python_api/python/test/conftest.py
+26 −0 crates/voicevox_core_python_api/python/test/test_asyncio_metas.py
+24 −0 crates/voicevox_core_python_api/python/test/test_blocking_metas.py
+13 −2 crates/voicevox_core_python_api/python/voicevox_core/_models.py
+5 −0 crates/voicevox_core_python_api/python/voicevox_core/_rust/__init__.pyi
+2 −2 crates/voicevox_core_python_api/python/voicevox_core/_rust/asyncio.pyi
+2 −2 crates/voicevox_core_python_api/python/voicevox_core/_rust/blocking.pyi
+6 −4 crates/voicevox_core_python_api/src/convert.rs
+33 −26 crates/voicevox_core_python_api/src/lib.rs
+1 −1 docs/vvm.md
+2 −2 example/kotlin/README.md
+2 −2 example/python/README.md
+ model/sample.vvm
+ model/sample.vvm/decode.onnx
+14 −0 model/sample.vvm/manifest.json
+0 −0 model/sample.vvm/metas.json
+ model/sample.vvm/predict_duration.onnx
+ model/sample.vvm/predict_intonation.onnx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public enum ResultCode : int
/// </summary>
RESULT_READ_ZIP_ENTRY_ERROR = 17,
/// <summary>
/// モデルの形式が不正
/// </summary>
RESULT_INVALID_MODEL_HEADER_ERROR = 28,
/// <summary>
/// すでに読み込まれている音声モデルを読み込もうとした
/// </summary>
RESULT_MODEL_ALREADY_LOADED_ERROR = 18,
Expand Down Expand Up @@ -122,6 +126,7 @@ internal static ResultCode FromNative(this VoicevoxResultCode code)
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR => ResultCode.RESULT_INVALID_ACCENT_PHRASE_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_OPEN_ZIP_FILE_ERROR => ResultCode.RESULT_OPEN_ZIP_FILE_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_READ_ZIP_ENTRY_ERROR => ResultCode.RESULT_READ_ZIP_ENTRY_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_HEADER_ERROR => ResultCode.RESULT_INVALID_MODEL_HEADER_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_MODEL_ALREADY_LOADED_ERROR => ResultCode.RESULT_MODEL_ALREADY_LOADED_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_STYLE_ALREADY_LOADED_ERROR => ResultCode.RESULT_STYLE_ALREADY_LOADED_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_DATA_ERROR => ResultCode.RESULT_INVALID_MODEL_DATA_ERROR,
Expand Down Expand Up @@ -153,6 +158,7 @@ internal static VoicevoxResultCode ToNative(this ResultCode code)
ResultCode.RESULT_INVALID_ACCENT_PHRASE_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR,
ResultCode.RESULT_OPEN_ZIP_FILE_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_OPEN_ZIP_FILE_ERROR,
ResultCode.RESULT_READ_ZIP_ENTRY_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_READ_ZIP_ENTRY_ERROR,
ResultCode.RESULT_INVALID_MODEL_HEADER_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_HEADER_ERROR,
ResultCode.RESULT_MODEL_ALREADY_LOADED_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_MODEL_ALREADY_LOADED_ERROR,
ResultCode.RESULT_STYLE_ALREADY_LOADED_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_STYLE_ALREADY_LOADED_ERROR,
ResultCode.RESULT_INVALID_MODEL_DATA_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_DATA_ERROR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal static unsafe partial class CoreUnsafe

/// <summary>::VoicevoxVoiceModel からIDを取得する。 @param [in] model 音声モデル @returns 音声モデルID \\safety{ - `model`は ::voicevox_voice_model_new_from_path で得たものでなければならず、また ::voicevox_voice_model_delete で解放されていてはいけない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_voice_model_id", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern byte* voicevox_voice_model_id(VoicevoxVoiceModel* model);
public static extern void/* byte[] */* voicevox_voice_model_id(VoicevoxVoiceModel* model);

/// <summary>::VoicevoxVoiceModel からメタ情報を取得する。 @param [in] model 音声モデル @returns メタ情報のJSON文字列 \\safety{ - `model`は ::voicevox_voice_model_new_from_path で得たものでなければならず、また ::voicevox_voice_model_delete で解放されていてはいけない。 - 戻り値の文字列の&lt;b&gt;生存期間&lt;/b&gt;(_lifetime_)は次にこの関数が呼ばれるか、`model`が破棄されるまでである。この生存期間を越えて文字列にアクセスしてはならない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_voice_model_get_metas_json", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
Expand All @@ -69,19 +69,19 @@ internal static unsafe partial class CoreUnsafe
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_load_voice_model", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern VoicevoxResultCode voicevox_synthesizer_load_voice_model(VoicevoxSynthesizer* synthesizer, VoicevoxVoiceModel* model);

/// <summary>音声モデルの読み込みを解除する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns 結果コード \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`はヌル終端文字列を指し、かつ&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
/// <summary>音声モデルの読み込みを解除する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns 結果コード \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_unload_voice_model", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern VoicevoxResultCode voicevox_synthesizer_unload_voice_model(VoicevoxSynthesizer* synthesizer, byte* model_id);
public static extern VoicevoxResultCode voicevox_synthesizer_unload_voice_model(VoicevoxSynthesizer* synthesizer, void/* byte[] */* model_id);

/// <summary>ハードウェアアクセラレーションがGPUモードか判定する。 @param [in] synthesizer 音声シンセサイザ @returns GPUモードかどうか \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_is_gpu_mode", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool voicevox_synthesizer_is_gpu_mode(VoicevoxSynthesizer* synthesizer);

/// <summary>指定したIDの音声モデルが読み込まれているか判定する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns モデルが読み込まれているかどうか \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`はヌル終端文字列を指し、かつ&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
/// <summary>指定したIDの音声モデルが読み込まれているか判定する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns モデルが読み込まれているかどうか \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_is_loaded_voice_model", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool voicevox_synthesizer_is_loaded_voice_model(VoicevoxSynthesizer* synthesizer, byte* model_id);
public static extern bool voicevox_synthesizer_is_loaded_voice_model(VoicevoxSynthesizer* synthesizer, void/* byte[] */* model_id);

/// <summary>今読み込んでいる音声モデルのメタ情報を、JSONで取得する。 JSONの解放は ::voicevox_json_free で行う。 @param [in] synthesizer 音声シンセサイザ @return メタ情報のJSON文字列 \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_create_metas_json", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
Expand Down Expand Up @@ -260,6 +260,7 @@ internal enum VoicevoxResultCode : int
VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR = 15,
VOICEVOX_RESULT_OPEN_ZIP_FILE_ERROR = 16,
VOICEVOX_RESULT_READ_ZIP_ENTRY_ERROR = 17,
VOICEVOX_RESULT_INVALID_MODEL_HEADER_ERROR = 28,
VOICEVOX_RESULT_MODEL_ALREADY_LOADED_ERROR = 18,
VOICEVOX_RESULT_STYLE_ALREADY_LOADED_ERROR = 26,
VOICEVOX_RESULT_INVALID_MODEL_DATA_ERROR = 27,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public string Id
unsafe
{
var ptr = CoreUnsafe.voicevox_voice_model_id((VoicevoxVoiceModel*)Handle);
return StringConvertCompat.ToUTF8String(ptr);
return StringConvertCompat.ToUTF8String((byte*)ptr);
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/VoicevoxCoreSharp.Core/Enum/ResultCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public enum ResultCode : int
/// </summary>
RESULT_READ_ZIP_ENTRY_ERROR = 17,
/// <summary>
/// モデルの形式が不正
/// </summary>
RESULT_INVALID_MODEL_HEADER_ERROR = 28,
/// <summary>
/// すでに読み込まれている音声モデルを読み込もうとした
/// </summary>
RESULT_MODEL_ALREADY_LOADED_ERROR = 18,
Expand Down Expand Up @@ -122,6 +126,7 @@ internal static ResultCode FromNative(this VoicevoxResultCode code)
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR => ResultCode.RESULT_INVALID_ACCENT_PHRASE_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_OPEN_ZIP_FILE_ERROR => ResultCode.RESULT_OPEN_ZIP_FILE_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_READ_ZIP_ENTRY_ERROR => ResultCode.RESULT_READ_ZIP_ENTRY_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_HEADER_ERROR => ResultCode.RESULT_INVALID_MODEL_HEADER_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_MODEL_ALREADY_LOADED_ERROR => ResultCode.RESULT_MODEL_ALREADY_LOADED_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_STYLE_ALREADY_LOADED_ERROR => ResultCode.RESULT_STYLE_ALREADY_LOADED_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_DATA_ERROR => ResultCode.RESULT_INVALID_MODEL_DATA_ERROR,
Expand Down Expand Up @@ -153,6 +158,7 @@ internal static VoicevoxResultCode ToNative(this ResultCode code)
ResultCode.RESULT_INVALID_ACCENT_PHRASE_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR,
ResultCode.RESULT_OPEN_ZIP_FILE_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_OPEN_ZIP_FILE_ERROR,
ResultCode.RESULT_READ_ZIP_ENTRY_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_READ_ZIP_ENTRY_ERROR,
ResultCode.RESULT_INVALID_MODEL_HEADER_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_HEADER_ERROR,
ResultCode.RESULT_MODEL_ALREADY_LOADED_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_MODEL_ALREADY_LOADED_ERROR,
ResultCode.RESULT_STYLE_ALREADY_LOADED_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_STYLE_ALREADY_LOADED_ERROR,
ResultCode.RESULT_INVALID_MODEL_DATA_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MODEL_DATA_ERROR,
Expand Down
11 changes: 6 additions & 5 deletions src/VoicevoxCoreSharp.Core/Native/CoreUnsafe.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal static unsafe partial class CoreUnsafe

/// <summary>::VoicevoxVoiceModel からIDを取得する。 @param [in] model 音声モデル @returns 音声モデルID \\safety{ - `model`は ::voicevox_voice_model_new_from_path で得たものでなければならず、また ::voicevox_voice_model_delete で解放されていてはいけない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_voice_model_id", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern byte* voicevox_voice_model_id(VoicevoxVoiceModel* model);
public static extern void/* byte[] */* voicevox_voice_model_id(VoicevoxVoiceModel* model);

/// <summary>::VoicevoxVoiceModel からメタ情報を取得する。 @param [in] model 音声モデル @returns メタ情報のJSON文字列 \\safety{ - `model`は ::voicevox_voice_model_new_from_path で得たものでなければならず、また ::voicevox_voice_model_delete で解放されていてはいけない。 - 戻り値の文字列の&lt;b&gt;生存期間&lt;/b&gt;(_lifetime_)は次にこの関数が呼ばれるか、`model`が破棄されるまでである。この生存期間を越えて文字列にアクセスしてはならない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_voice_model_get_metas_json", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
Expand All @@ -69,19 +69,19 @@ internal static unsafe partial class CoreUnsafe
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_load_voice_model", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern VoicevoxResultCode voicevox_synthesizer_load_voice_model(VoicevoxSynthesizer* synthesizer, VoicevoxVoiceModel* model);

/// <summary>音声モデルの読み込みを解除する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns 結果コード \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`はヌル終端文字列を指し、かつ&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
/// <summary>音声モデルの読み込みを解除する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns 結果コード \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_unload_voice_model", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern VoicevoxResultCode voicevox_synthesizer_unload_voice_model(VoicevoxSynthesizer* synthesizer, byte* model_id);
public static extern VoicevoxResultCode voicevox_synthesizer_unload_voice_model(VoicevoxSynthesizer* synthesizer, void/* byte[] */* model_id);

/// <summary>ハードウェアアクセラレーションがGPUモードか判定する。 @param [in] synthesizer 音声シンセサイザ @returns GPUモードかどうか \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_is_gpu_mode", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool voicevox_synthesizer_is_gpu_mode(VoicevoxSynthesizer* synthesizer);

/// <summary>指定したIDの音声モデルが読み込まれているか判定する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns モデルが読み込まれているかどうか \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`はヌル終端文字列を指し、かつ&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
/// <summary>指定したIDの音声モデルが読み込まれているか判定する。 @param [in] synthesizer 音声シンセサイザ @param [in] model_id 音声モデルID @returns モデルが読み込まれているかどうか \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 - `model_id`&lt;a href=\"#voicevox-core-safety\"&gt;読み込みについて有効&lt;/a&gt;でなければならない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_is_loaded_voice_model", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool voicevox_synthesizer_is_loaded_voice_model(VoicevoxSynthesizer* synthesizer, byte* model_id);
public static extern bool voicevox_synthesizer_is_loaded_voice_model(VoicevoxSynthesizer* synthesizer, void/* byte[] */* model_id);

/// <summary>今読み込んでいる音声モデルのメタ情報を、JSONで取得する。 JSONの解放は ::voicevox_json_free で行う。 @param [in] synthesizer 音声シンセサイザ @return メタ情報のJSON文字列 \\safety{ - `synthesizer`は ::voicevox_synthesizer_new で得たものでなければならず、また ::voicevox_synthesizer_delete で解放されていてはいけない。 }</summary>
[DllImport(__DllName, EntryPoint = "voicevox_synthesizer_create_metas_json", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
Expand Down Expand Up @@ -260,6 +260,7 @@ internal enum VoicevoxResultCode : int
VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR = 15,
VOICEVOX_RESULT_OPEN_ZIP_FILE_ERROR = 16,
VOICEVOX_RESULT_READ_ZIP_ENTRY_ERROR = 17,
VOICEVOX_RESULT_INVALID_MODEL_HEADER_ERROR = 28,
VOICEVOX_RESULT_MODEL_ALREADY_LOADED_ERROR = 18,
VOICEVOX_RESULT_STYLE_ALREADY_LOADED_ERROR = 26,
VOICEVOX_RESULT_INVALID_MODEL_DATA_ERROR = 27,
Expand Down
2 changes: 1 addition & 1 deletion src/VoicevoxCoreSharp.Core/VoiceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public string Id
unsafe
{
var ptr = CoreUnsafe.voicevox_voice_model_id((VoicevoxVoiceModel*)Handle);
return StringConvertCompat.ToUTF8String(ptr);
return StringConvertCompat.ToUTF8String((byte*)ptr);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VoicevoxOnnxRuntimeVersion>1.14.0</VoicevoxOnnxRuntimeVersion>
<VoicevoxCoreCommitHash>52bc1d657e9529b288c8da7966f5242463d6580b</VoicevoxCoreCommitHash>
<VoicevoxOnnxRuntimeVersion>1.17.3</VoicevoxOnnxRuntimeVersion>
<VoicevoxCoreCommitHash>4cd19cce53ae2e0ee14adeb93180f3c6e530ba3a</VoicevoxCoreCommitHash>
</PropertyGroup>
</Project>
Loading
Loading