Skip to content
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
2 changes: 1 addition & 1 deletion binding/voicevox_core
Submodule voicevox_core updated 68 files
+1 −1 .github/actions/install-cargo-deny/action.yml
+10 −0 .github/workflows/build_and_deploy.yml
+2 −5 .github/workflows/build_and_deploy_downloader.yml
+4 −0 .github/workflows/check-shebangs-and-filemodes.yml
+9 −0 .github/workflows/generate_document.yml
+12 −1 .github/workflows/test.yml
+2 −0 .github/workflows/typos.yml
+45 −21 CHANGELOG.md
+850 −565 Cargo.lock
+20 −15 Cargo.toml
+1 −2 crates/downloader/Cargo.toml
+7 −7 crates/downloader/src/main.rs
+1 −1 crates/test_util/Cargo.toml
+6 −1 crates/voicevox_core/Cargo.toml
+2 −4 crates/voicevox_core/src/__internal/interop.rs
+1 −1 crates/voicevox_core/src/blocking.rs
+184 −0 crates/voicevox_core/src/collections.rs
+2 −2 crates/voicevox_core/src/core/adjust/post.rs
+1 −1 crates/voicevox_core/src/core/infer/session_set.rs
+4 −1 crates/voicevox_core/src/engine.rs
+8 −5 crates/voicevox_core/src/engine/acoustic_feature_extractor.rs
+84 −4 crates/voicevox_core/src/engine/acoustic_feature_extractor/convert.rs
+49 −6 crates/voicevox_core/src/engine/audio_file.rs
+4 −2 crates/voicevox_core/src/engine/mora_mappings.rs
+34 −0 crates/voicevox_core/src/engine/ndarray.rs
+27 −7 crates/voicevox_core/src/engine/sampling_rate.rs
+3 −0 crates/voicevox_core/src/engine/song.rs
+293 −0 crates/voicevox_core/src/engine/song/interpret.rs
+859 −0 crates/voicevox_core/src/engine/song/queries.rs
+434 −0 crates/voicevox_core/src/engine/song/validate.rs
+1 −1 crates/voicevox_core/src/engine/talk.rs
+33 −5 crates/voicevox_core/src/engine/talk/audio_query.rs
+7 −31 crates/voicevox_core/src/engine/talk/audio_query/validated.rs
+35 −0 crates/voicevox_core/src/engine/validate.rs
+49 −3 crates/voicevox_core/src/error.rs
+143 −1 crates/voicevox_core/src/lib.rs
+3 −1 crates/voicevox_core/src/nonblocking.rs
+23 −0 crates/voicevox_core/src/numerics.rs
+988 −8 crates/voicevox_core/src/synthesizer.rs
+10 −6 crates/voicevox_core_c_api/include/voicevox_core.h
+1 −0 crates/voicevox_core_c_api/src/helpers.rs
+6 −6 crates/voicevox_core_c_api/src/lib.rs
+6 −0 crates/voicevox_core_c_api/src/result_code.rs
+13 −4 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/AccentPhrase.java
+13 −4 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/AudioQuery.java
+13 −4 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/Mora.java
+12 −0 ...evox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/IncompatibleQueriesException.java
+1 −0 crates/voicevox_core_java_api/src/common.rs
+1 −2 crates/voicevox_core_python_api/Cargo.toml
+1 −0 crates/voicevox_core_python_api/LICENSE
+18 −17 crates/voicevox_core_python_api/poetry.lock
+3 −3 crates/voicevox_core_python_api/pyproject.toml
+89 −0 crates/voicevox_core_python_api/python/test/test_asyncio_song.py
+73 −0 crates/voicevox_core_python_api/python/test/test_blocking_song.py
+49 −0 crates/voicevox_core_python_api/python/test/test_ensure_compatible.py
+14 −0 crates/voicevox_core_python_api/python/voicevox_core/__init__.py
+239 −12 crates/voicevox_core_python_api/python/voicevox_core/_python/__init__.py
+44 −1 crates/voicevox_core_python_api/python/voicevox_core/_rust/__init__.pyi
+127 −0 crates/voicevox_core_python_api/python/voicevox_core/_rust/asyncio.pyi
+170 −0 crates/voicevox_core_python_api/python/voicevox_core/_rust/blocking.pyi
+73 −54 crates/voicevox_core_python_api/src/convert.rs
+296 −128 crates/voicevox_core_python_api/src/lib.rs
+33 −26 deny.toml
+4 −4 example/python/README.md
+134 −0 example/python/song-asyncio.py
+132 −0 example/python/song.py
+1 −1 example/python/talk-asyncio.py
+2 −0 example/python/talk.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ public enum ResultCode : int
/// 無効なMora
/// </summary>
RESULT_INVALID_MORA_ERROR = 30,
/// <summary>
/// 楽譜とFrameAudioQueryの組み合わせが不正
/// </summary>
RESULT_INCOMPATIBLE_QUERIES_ERROR = 35,
}

public static class ResultCodeExt
Expand Down Expand Up @@ -147,6 +151,7 @@ internal static ResultCode FromNative(this VoicevoxResultCode code)
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR => ResultCode.RESULT_INVALID_USER_DICT_WORD_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_UUID_ERROR => ResultCode.RESULT_INVALID_UUID_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR => ResultCode.RESULT_INVALID_MORA_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INCOMPATIBLE_QUERIES_ERROR => ResultCode.RESULT_INCOMPATIBLE_QUERIES_ERROR,
};
#pragma warning restore CS8524
}
Expand Down Expand Up @@ -182,6 +187,7 @@ internal static VoicevoxResultCode ToNative(this ResultCode code)
ResultCode.RESULT_INVALID_USER_DICT_WORD_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR,
ResultCode.RESULT_INVALID_UUID_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_UUID_ERROR,
ResultCode.RESULT_INVALID_MORA_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR,
ResultCode.RESULT_INCOMPATIBLE_QUERIES_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INCOMPATIBLE_QUERIES_ERROR,
};
#pragma warning restore CS8524
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ internal static unsafe partial class CoreUnsafe
internal static extern VoicevoxResultCode voicevox_audio_query_create_from_accent_phrases(byte* accent_phrases_json, byte** output_audio_query_json);

/// <summary>
/// JSONを`AudioQuery`型としてバリデートする
/// 与えられたJSONが`AudioQuery`型として不正であるときエラーを返す
///
/// 次のうちどれかを満たすならエラーを返す
/// 不正であるとは、以下のいずれかの条件を満たすことである
///
/// - [Rust APIの`AudioQuery`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `accent_phrases`の要素のうちいずれかが、 ::voicevox_accent_phrase_validate でエラーになる。
Expand Down Expand Up @@ -264,9 +264,9 @@ internal static unsafe partial class CoreUnsafe
internal static extern VoicevoxResultCode voicevox_audio_query_validate(byte* audio_query_json);

/// <summary>
/// JSONを`AccentPhrase`型としてバリデートする
/// 与えられたJSONが`AccentPhrase`型として不正であるときエラーを返す
///
/// 次のうちどれかを満たすならエラーを返す
/// 不正であるとは、以下のいずれかの条件を満たすことである
///
/// - [Rust APIの`AccentPhrase`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `moras`もしくは`pause_mora`の要素のうちいずれかが、 ::voicevox_mora_validate でエラーになる。
Expand All @@ -293,9 +293,9 @@ internal static unsafe partial class CoreUnsafe
internal static extern VoicevoxResultCode voicevox_accent_phrase_validate(byte* accent_phrase_json);

/// <summary>
/// JSONを`Mora`型としてバリデートする
/// 与えられたJSONが`Mora`型として不正であるときエラーを返す
///
/// 次のうちどれかを満たすならエラーを返す
/// 不正であるとは、以下のいずれかの条件を満たすことである
///
/// - [Rust APIの`Mora`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `consonant`と`consonant_length`の有無が不一致。
Expand Down Expand Up @@ -1155,6 +1155,7 @@ internal enum VoicevoxResultCode : int
VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR = 24,
VOICEVOX_RESULT_INVALID_UUID_ERROR = 25,
VOICEVOX_RESULT_INVALID_MORA_ERROR = 30,
VOICEVOX_RESULT_INCOMPATIBLE_QUERIES_ERROR = 35,
}

internal enum VoicevoxAccelerationMode : int
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 @@ -112,6 +112,10 @@ public enum ResultCode : int
/// 無効なMora
/// </summary>
RESULT_INVALID_MORA_ERROR = 30,
/// <summary>
/// 楽譜とFrameAudioQueryの組み合わせが不正
/// </summary>
RESULT_INCOMPATIBLE_QUERIES_ERROR = 35,
}

public static class ResultCodeExt
Expand Down Expand Up @@ -147,6 +151,7 @@ internal static ResultCode FromNative(this VoicevoxResultCode code)
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR => ResultCode.RESULT_INVALID_USER_DICT_WORD_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_UUID_ERROR => ResultCode.RESULT_INVALID_UUID_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR => ResultCode.RESULT_INVALID_MORA_ERROR,
VoicevoxResultCode.VOICEVOX_RESULT_INCOMPATIBLE_QUERIES_ERROR => ResultCode.RESULT_INCOMPATIBLE_QUERIES_ERROR,
};
#pragma warning restore CS8524
}
Expand Down Expand Up @@ -182,6 +187,7 @@ internal static VoicevoxResultCode ToNative(this ResultCode code)
ResultCode.RESULT_INVALID_USER_DICT_WORD_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR,
ResultCode.RESULT_INVALID_UUID_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_UUID_ERROR,
ResultCode.RESULT_INVALID_MORA_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR,
ResultCode.RESULT_INCOMPATIBLE_QUERIES_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INCOMPATIBLE_QUERIES_ERROR,
};
#pragma warning restore CS8524
}
Expand Down
13 changes: 7 additions & 6 deletions src/VoicevoxCoreSharp.Core/Native/CoreUnsafe.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ internal static unsafe partial class CoreUnsafe
internal static extern VoicevoxResultCode voicevox_audio_query_create_from_accent_phrases(byte* accent_phrases_json, byte** output_audio_query_json);

/// <summary>
/// JSONを`AudioQuery`型としてバリデートする
/// 与えられたJSONが`AudioQuery`型として不正であるときエラーを返す
///
/// 次のうちどれかを満たすならエラーを返す
/// 不正であるとは、以下のいずれかの条件を満たすことである
///
/// - [Rust APIの`AudioQuery`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `accent_phrases`の要素のうちいずれかが、 ::voicevox_accent_phrase_validate でエラーになる。
Expand Down Expand Up @@ -264,9 +264,9 @@ internal static unsafe partial class CoreUnsafe
internal static extern VoicevoxResultCode voicevox_audio_query_validate(byte* audio_query_json);

/// <summary>
/// JSONを`AccentPhrase`型としてバリデートする
/// 与えられたJSONが`AccentPhrase`型として不正であるときエラーを返す
///
/// 次のうちどれかを満たすならエラーを返す
/// 不正であるとは、以下のいずれかの条件を満たすことである
///
/// - [Rust APIの`AccentPhrase`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `moras`もしくは`pause_mora`の要素のうちいずれかが、 ::voicevox_mora_validate でエラーになる。
Expand All @@ -293,9 +293,9 @@ internal static unsafe partial class CoreUnsafe
internal static extern VoicevoxResultCode voicevox_accent_phrase_validate(byte* accent_phrase_json);

/// <summary>
/// JSONを`Mora`型としてバリデートする
/// 与えられたJSONが`Mora`型として不正であるときエラーを返す
///
/// 次のうちどれかを満たすならエラーを返す
/// 不正であるとは、以下のいずれかの条件を満たすことである
///
/// - [Rust APIの`Mora`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `consonant`と`consonant_length`の有無が不一致。
Expand Down Expand Up @@ -1155,6 +1155,7 @@ internal enum VoicevoxResultCode : int
VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR = 24,
VOICEVOX_RESULT_INVALID_UUID_ERROR = 25,
VOICEVOX_RESULT_INVALID_MORA_ERROR = 30,
VOICEVOX_RESULT_INCOMPATIBLE_QUERIES_ERROR = 35,
}

internal enum VoicevoxAccelerationMode : int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VoicevoxOnnxRuntimeVersion>1.17.3</VoicevoxOnnxRuntimeVersion>
<VoicevoxCoreCommitHash>cb0d80b8dc085720530629db9e034fc306bf09e0</VoicevoxCoreCommitHash>
<VoicevoxCoreCommitHash>60b423c70330d7f6d620241fe714b288d4b4f80d</VoicevoxCoreCommitHash>
</PropertyGroup>
</Project>
Loading