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 61 files
+0 −1 .github/workflows/benchmarks.yml
+2 −2 .github/workflows/build_and_deploy.yml
+1 −0 .github/workflows/test.yml
+38 −2 CHANGELOG.md
+82 −4 Cargo.lock
+4 −1 Cargo.toml
+0 −1 crates/downloader/Cargo.toml
+38 −62 crates/downloader/src/main.rs
+3 −0 crates/voicevox_core/Cargo.toml
+7 −0 crates/voicevox_core/benches/benches.rs
+4 −1 crates/voicevox_core/src/__internal/interop.rs
+4 −1 crates/voicevox_core/src/core.rs
+4 −1 crates/voicevox_core/src/core/adjust.rs
+38 −0 crates/voicevox_core/src/core/adjust/post.rs
+11 −0 crates/voicevox_core/src/core/adjust/pre.rs
+29 −0 crates/voicevox_core/src/core/metas.rs
+5 −1 crates/voicevox_core/src/engine.rs
+1,249 −110 crates/voicevox_core/src/engine/acoustic_feature_extractor.rs
+6 −5 crates/voicevox_core/src/engine/audio_file.rs
+479 −146 crates/voicevox_core/src/engine/mora_list.rs
+18 −0 crates/voicevox_core/src/engine/sampling_rate.rs
+5 −2 crates/voicevox_core/src/engine/talk.rs
+84 −4 crates/voicevox_core/src/engine/talk/audio_query.rs
+598 −0 crates/voicevox_core/src/engine/talk/audio_query/validated.rs
+5 −10 crates/voicevox_core/src/engine/talk/full_context_label.rs
+63 −65 crates/voicevox_core/src/engine/talk/interpret_query.rs
+33 −39 crates/voicevox_core/src/engine/talk/kana_parser.rs
+46 −2 crates/voicevox_core/src/engine/talk/user_dict/word.rs
+63 −5 crates/voicevox_core/src/error.rs
+38 −0 crates/voicevox_core/src/lib.rs
+77 −77 crates/voicevox_core/src/synthesizer.rs
+1 −0 crates/voicevox_core_c_api/Cargo.toml
+2 −1 crates/voicevox_core_c_api/cbindgen.toml
+106 −2 crates/voicevox_core_c_api/include/voicevox_core.h
+55 −6 crates/voicevox_core_c_api/src/helpers.rs
+121 −19 crates/voicevox_core_c_api/src/lib.rs
+5 −2 crates/voicevox_core_c_api/src/result_code.rs
+1 −1 crates/voicevox_core_c_api/tests/e2e/snapshots.toml
+32 −1 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/AccentPhrase.java
+37 −2 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/AudioQuery.java
+5 −1 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/CharacterMeta.java
+34 −1 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/Mora.java
+4 −3 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/UserDictWord.java
+12 −0 ...es/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/InvalidQueryException.java
+1 −1 crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/exceptions/RunModelException.java
+56 −4 crates/voicevox_core_java_api/src/audio_query.rs
+1 −0 crates/voicevox_core_java_api/src/common.rs
+11 −0 crates/voicevox_core_macros/src/check.rs
+39 −0 crates/voicevox_core_macros/src/extract.rs
+11 −70 crates/voicevox_core_macros/src/inference_domain.rs
+8 −0 crates/voicevox_core_macros/src/lib.rs
+114 −0 crates/voicevox_core_macros/src/mora_mappings.rs
+1 −1 crates/voicevox_core_python_api/README.md
+3 −1 crates/voicevox_core_python_api/python/voicevox_core/__init__.py
+101 −0 crates/voicevox_core_python_api/python/voicevox_core/_python/__init__.py
+0 −0 crates/voicevox_core_python_api/python/voicevox_core/_python/_please_do_not_use.py
+10 −2 crates/voicevox_core_python_api/python/voicevox_core/_rust/__init__.pyi
+9 −5 crates/voicevox_core_python_api/src/convert.rs
+31 −1 crates/voicevox_core_python_api/src/lib.rs
+38 −0 docs/guide/user/key-changes/0.16.3.md
+1 −1 docs/guide/user/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,26 @@ internal static class AccelerationModeExt
{
public static AccelerationMode FromNative(this VoicevoxAccelerationMode mode)
{
#pragma warning disable CS8524
return mode switch
{
VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_AUTO => AccelerationMode.AUTO,
VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_CPU => AccelerationMode.CPU,
VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_GPU => AccelerationMode.GPU,
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
};
#pragma warning restore CS8524
}

public static VoicevoxAccelerationMode ToNative(this AccelerationMode mode)
{
#pragma warning disable CS8524
return mode switch
{
AccelerationMode.AUTO => VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_AUTO,
AccelerationMode.CPU => VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_CPU,
AccelerationMode.GPU => VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_GPU,
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
};
#pragma warning restore CS8524
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,17 @@ public enum ResultCode : int
/// UUIDの変換に失敗した
/// </summary>
RESULT_INVALID_UUID_ERROR = 25,
/// <summary>
/// 無効なMora
/// </summary>
RESULT_INVALID_MORA_ERROR = 30,
}

public static class ResultCodeExt
{
internal static ResultCode FromNative(this VoicevoxResultCode code)
{
#pragma warning disable CS8524
return code switch
{
VoicevoxResultCode.VOICEVOX_RESULT_OK => ResultCode.RESULT_OK,
Expand Down Expand Up @@ -141,12 +146,14 @@ internal static ResultCode FromNative(this VoicevoxResultCode code)
VoicevoxResultCode.VOICEVOX_RESULT_USE_USER_DICT_ERROR => ResultCode.RESULT_USE_USER_DICT_ERROR,
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,
_ => throw new ArgumentOutOfRangeException(nameof(code), code, null),
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR => ResultCode.RESULT_INVALID_MORA_ERROR,
};
#pragma warning restore CS8524
}

internal static VoicevoxResultCode ToNative(this ResultCode code)
{
#pragma warning disable CS8524
return code switch
{
ResultCode.RESULT_OK => VoicevoxResultCode.VOICEVOX_RESULT_OK,
Expand Down Expand Up @@ -174,8 +181,9 @@ internal static VoicevoxResultCode ToNative(this ResultCode code)
ResultCode.RESULT_USE_USER_DICT_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_USE_USER_DICT_ERROR,
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,
_ => throw new ArgumentOutOfRangeException(nameof(code), code, null),
ResultCode.RESULT_INVALID_MORA_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR,
};
#pragma warning restore CS8524
}

public static unsafe string ToMessage(this ResultCode code)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,30 @@ internal static class UserDictWordTypeExt
{
public static UserDictWordType FromNative(this VoicevoxUserDictWordType wordType)
{
#pragma warning disable CS8524
return wordType switch
{
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_PROPER_NOUN => UserDictWordType.PROPER_NOUN,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_COMMON_NOUN => UserDictWordType.COMMON_NOUN,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_VERB => UserDictWordType.VERB,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_ADJECTIVE => UserDictWordType.ADJECTIVE,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_SUFFIX => UserDictWordType.SUFFIX,
_ => throw new ArgumentOutOfRangeException(nameof(wordType), wordType, null),
};
#pragma warning restore CS8524
}

public static VoicevoxUserDictWordType ToNative(this UserDictWordType wordType)
{
#pragma warning disable CS8524
return wordType switch
{
UserDictWordType.PROPER_NOUN => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_PROPER_NOUN,
UserDictWordType.COMMON_NOUN => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_COMMON_NOUN,
UserDictWordType.VERB => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_VERB,
UserDictWordType.ADJECTIVE => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_ADJECTIVE,
UserDictWordType.SUFFIX => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_SUFFIX,
_ => throw new ArgumentOutOfRangeException(nameof(wordType), wordType, null),
};
#pragma warning restore CS8524
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,99 @@ internal static unsafe partial class CoreUnsafe
[DllImport(__DllName, EntryPoint = "voicevox_audio_query_create_from_accent_phrases", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
internal static extern VoicevoxResultCode voicevox_audio_query_create_from_accent_phrases(byte* accent_phrases_json, byte** output_audio_query_json);

/// <summary>
/// JSONを`AudioQuery`型としてバリデートする。
///
/// 次のうちどれかを満たすならエラーを返す。
///
/// - [Rust APIの`AudioQuery`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `accent_phrases`の要素のうちいずれかが、 ::voicevox_accent_phrase_validate でエラーになる。
/// - `outputSamplingRate`が`24000`の倍数ではない、もしくは`0` (将来的に解消予定。cf. [#762])。
///
/// [Rust APIの`AudioQuery`型]: ../rust_api/voicevox_core/struct.AudioQuery.html
/// [#762]: https://github.com/VOICEVOX/voicevox_core/issues/762
///
/// 次の状態に対しては警告のログを出す。将来的にはエラーになる予定。
///
/// - `accent_phrases`の要素のうちいずれかが警告が出る状態。
/// - `speedScale`が負。
/// - `volumeScale`が負。
/// - `prePhonemeLength`が負。
/// - `postPhonemeLength`が負。
/// - `outputSamplingRate`が`24000`以外の値(エラーと同様将来的に解消予定)。
///
/// @param [in] audio_query_json `AudioQuery`型のJSON
///
/// @returns 成功時には ::VOICEVOX_RESULT_OK 、失敗時には ::VOICEVOX_RESULT_INVALID_AUDIO_QUERY_ERROR
///
/// \safety{
/// - `audio_query_json`はヌル終端文字列を指し、かつ&lt;a href="#voicevox-core-safety"&gt;読み込みについて有効&lt;/a&gt;でなければならない。
/// }
///
/// \orig-impl{voicevox_audio_query_validate}
/// </summary>
[DllImport(__DllName, EntryPoint = "voicevox_audio_query_validate", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
internal static extern VoicevoxResultCode voicevox_audio_query_validate(byte* audio_query_json);

/// <summary>
/// JSONを`AccentPhrase`型としてバリデートする。
///
/// 次のうちどれかを満たすならエラーを返す。
///
/// - [Rust APIの`AccentPhrase`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `moras`もしくは`pause_mora`の要素のうちいずれかが、 ::voicevox_mora_validate でエラーになる。
/// - `accent`が`0`。
///
/// [Rust APIの`AccentPhrase`型]: ../rust_api/voicevox_core/struct.AccentPhrase.html
///
/// 次の状態に対しては警告のログを出す。将来的にはエラーになる予定。
///
/// - `moras`もしくは`pause_mora`の要素のうちいずれかが、警告が出る状態。
/// - `accent`が`moras`の数を超過している。
///
/// @param [in] accent_phrase_json `AccentPhrase`型のJSON
///
/// @returns 成功時には ::VOICEVOX_RESULT_OK 、失敗時には ::VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR
///
/// \safety{
/// - `accent_phrase_json`はヌル終端文字列を指し、かつ&lt;a href="#voicevox-core-safety"&gt;読み込みについて有効&lt;/a&gt;でなければならない。
/// }
///
/// \orig-impl{voicevox_accent_phrase_validate}
/// </summary>
[DllImport(__DllName, EntryPoint = "voicevox_accent_phrase_validate", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
internal static extern VoicevoxResultCode voicevox_accent_phrase_validate(byte* accent_phrase_json);

/// <summary>
/// JSONを`Mora`型としてバリデートする。
///
/// 次のうちどれかを満たすならエラーを返す。
///
/// - [Rust APIの`Mora`型]としてデシリアライズ不可、もしくはJSONとして不正。
/// - `consonant`と`consonant_length`の有無が不一致。
/// - `consonant`が子音以外の音素であるか、もしくは音素として不正。
/// - `vowel`が子音であるか、もしくは音素として不正。
///
/// [Rust APIの`Mora`型]: ../rust_api/voicevox_core/struct.Mora.html
///
/// 次の状態に対しては警告のログを出す。将来的にはエラーになる予定。
///
/// - `consonant_length`が負。
/// - `vowel_length`が負。
///
/// @param [in] mora_json `Mora`型のJSON
///
/// @returns 成功時には ::VOICEVOX_RESULT_OK 、失敗時には ::VOICEVOX_RESULT_INVALID_MORA_ERROR
///
/// \safety{
/// - `mora_json`はヌル終端文字列を指し、かつ&lt;a href="#voicevox-core-safety"&gt;読み込みについて有効&lt;/a&gt;でなければならない。
/// }
///
/// \orig-impl{voicevox_mora_validate}
/// </summary>
[DllImport(__DllName, EntryPoint = "voicevox_mora_validate", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
internal static extern VoicevoxResultCode voicevox_mora_validate(byte* mora_json);

/// <summary>
/// VVMファイルを開く。
///
Expand Down Expand Up @@ -1061,6 +1154,7 @@ internal enum VoicevoxResultCode : int
VOICEVOX_RESULT_USE_USER_DICT_ERROR = 23,
VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR = 24,
VOICEVOX_RESULT_INVALID_UUID_ERROR = 25,
VOICEVOX_RESULT_INVALID_MORA_ERROR = 30,
}

internal enum VoicevoxAccelerationMode : int
Expand Down
42 changes: 42 additions & 0 deletions src/VoicevoxCoreSharp.Core.Unity/Runtime/Script/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,47 @@ public static ResultCode CreateAudioQueryFromAccentPhrases(string accentPhrasesJ
}
}
}

/// <returns>
/// <see cref="ResultCode.RESULT_OK"/> または <see cref="ResultCode.RESULT_INVALID_AUDIO_QUERY_ERROR"/>
/// </returns>
public static ResultCode ValidateAudioQuery(string audioQueryJson)
{
unsafe
{
fixed (byte* ptr = System.Text.Encoding.UTF8.GetBytes(audioQueryJson))
{
return CoreUnsafe.voicevox_audio_query_validate(ptr).FromNative();
}
}
}

/// <returns>
/// <see cref="ResultCode.RESULT_OK"/> または <see cref="ResultCode.RESULT_INVALID_ACCENT_PHRASE_ERROR"/>
/// </returns>
public static ResultCode ValidateAccentPhrase(string accentPhraseJson)
{
unsafe
{
fixed (byte* ptr = System.Text.Encoding.UTF8.GetBytes(accentPhraseJson))
{
return CoreUnsafe.voicevox_accent_phrase_validate(ptr).FromNative();
}
}
}

/// <returns>
/// <see cref="ResultCode.RESULT_OK"/> または <see cref="ResultCode.RESULT_INVALID_MORA_ERROR"/>
/// </returns>
public static ResultCode ValidateMora(string moraJson)
{
unsafe
{
fixed (byte* ptr = System.Text.Encoding.UTF8.GetBytes(moraJson))
{
return CoreUnsafe.voicevox_mora_validate(ptr).FromNative();
}
}
}
}
}
6 changes: 4 additions & 2 deletions src/VoicevoxCoreSharp.Core/Enum/AccelerationMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,26 @@ internal static class AccelerationModeExt
{
public static AccelerationMode FromNative(this VoicevoxAccelerationMode mode)
{
#pragma warning disable CS8524
return mode switch
{
VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_AUTO => AccelerationMode.AUTO,
VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_CPU => AccelerationMode.CPU,
VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_GPU => AccelerationMode.GPU,
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
};
#pragma warning restore CS8524
}

public static VoicevoxAccelerationMode ToNative(this AccelerationMode mode)
{
#pragma warning disable CS8524
return mode switch
{
AccelerationMode.AUTO => VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_AUTO,
AccelerationMode.CPU => VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_CPU,
AccelerationMode.GPU => VoicevoxAccelerationMode.VOICEVOX_ACCELERATION_MODE_GPU,
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
};
#pragma warning restore CS8524
}
}
}
12 changes: 10 additions & 2 deletions src/VoicevoxCoreSharp.Core/Enum/ResultCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,17 @@ public enum ResultCode : int
/// UUIDの変換に失敗した
/// </summary>
RESULT_INVALID_UUID_ERROR = 25,
/// <summary>
/// 無効なMora
/// </summary>
RESULT_INVALID_MORA_ERROR = 30,
}

public static class ResultCodeExt
{
internal static ResultCode FromNative(this VoicevoxResultCode code)
{
#pragma warning disable CS8524
return code switch
{
VoicevoxResultCode.VOICEVOX_RESULT_OK => ResultCode.RESULT_OK,
Expand Down Expand Up @@ -141,12 +146,14 @@ internal static ResultCode FromNative(this VoicevoxResultCode code)
VoicevoxResultCode.VOICEVOX_RESULT_USE_USER_DICT_ERROR => ResultCode.RESULT_USE_USER_DICT_ERROR,
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,
_ => throw new ArgumentOutOfRangeException(nameof(code), code, null),
VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR => ResultCode.RESULT_INVALID_MORA_ERROR,
};
#pragma warning restore CS8524
}

internal static VoicevoxResultCode ToNative(this ResultCode code)
{
#pragma warning disable CS8524
return code switch
{
ResultCode.RESULT_OK => VoicevoxResultCode.VOICEVOX_RESULT_OK,
Expand Down Expand Up @@ -174,8 +181,9 @@ internal static VoicevoxResultCode ToNative(this ResultCode code)
ResultCode.RESULT_USE_USER_DICT_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_USE_USER_DICT_ERROR,
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,
_ => throw new ArgumentOutOfRangeException(nameof(code), code, null),
ResultCode.RESULT_INVALID_MORA_ERROR => VoicevoxResultCode.VOICEVOX_RESULT_INVALID_MORA_ERROR,
};
#pragma warning restore CS8524
}

public static unsafe string ToMessage(this ResultCode code)
Expand Down
6 changes: 4 additions & 2 deletions src/VoicevoxCoreSharp.Core/Enum/UserDictWordType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,30 @@ internal static class UserDictWordTypeExt
{
public static UserDictWordType FromNative(this VoicevoxUserDictWordType wordType)
{
#pragma warning disable CS8524
return wordType switch
{
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_PROPER_NOUN => UserDictWordType.PROPER_NOUN,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_COMMON_NOUN => UserDictWordType.COMMON_NOUN,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_VERB => UserDictWordType.VERB,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_ADJECTIVE => UserDictWordType.ADJECTIVE,
VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_SUFFIX => UserDictWordType.SUFFIX,
_ => throw new ArgumentOutOfRangeException(nameof(wordType), wordType, null),
};
#pragma warning restore CS8524
}

public static VoicevoxUserDictWordType ToNative(this UserDictWordType wordType)
{
#pragma warning disable CS8524
return wordType switch
{
UserDictWordType.PROPER_NOUN => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_PROPER_NOUN,
UserDictWordType.COMMON_NOUN => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_COMMON_NOUN,
UserDictWordType.VERB => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_VERB,
UserDictWordType.ADJECTIVE => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_ADJECTIVE,
UserDictWordType.SUFFIX => VoicevoxUserDictWordType.VOICEVOX_USER_DICT_WORD_TYPE_SUFFIX,
_ => throw new ArgumentOutOfRangeException(nameof(wordType), wordType, null),
};
#pragma warning restore CS8524
}
}
}
Loading
Loading