diff --git a/OpenUtau.Plugin.Builtin/ArpasingPlusPhonemizer.cs b/OpenUtau.Plugin.Builtin/ArpasingPlusPhonemizer.cs index 0a70297ee..53083aeb8 100644 --- a/OpenUtau.Plugin.Builtin/ArpasingPlusPhonemizer.cs +++ b/OpenUtau.Plugin.Builtin/ArpasingPlusPhonemizer.cs @@ -296,7 +296,7 @@ protected override List ProcessSyllable(Syllable syllable) { } else { { if (HasOto($"{prevV} {v}", syllable.vowelTone) || HasOto(ValidateAlias($"{prevV} {v}"), syllable.vowelTone)) { - basePhoneme = AliasFormat($"{prevV} {v}", "dynMid", syllable.vowelTone, ""); + basePhoneme = AliasFormat($"{prevV} {v}", "dynMid_vv", syllable.vowelTone, ""); } else if (HasOto(v, syllable.vowelTone) || HasOto(ValidateAlias(v), syllable.vowelTone)) { basePhoneme = v; } else { @@ -723,6 +723,7 @@ private string AliasFormat(string alias, string type, int tone, string prevV) { // Define alias formats for different types { "dynStart", new string[] { "" } }, { "dynMid", new string[] { "" } }, + { "dynMid_vv", new string[] { "" } }, { "dynEnd", new string[] { "" } }, { "startingV", new string[] { "-", "- ", "_", "" } }, { "vcEx", new string[] { $"{prevV} ", $"{prevV}" } }, @@ -798,6 +799,29 @@ private string AliasFormat(string alias, string type, int tone, string prevV) { } } + if (type.Contains("dynMid_vv")) { + string consonant = ""; + string vowel = ""; + if (alias.Contains(" ")) { + var parts = alias.Split(' '); + consonant = parts[0]; + vowel = parts[1]; + } else { + consonant = alias; + } + var dynamicVariations1 = new List { + $"{consonant} {vowel}", // "C V" + $"{consonant}{vowel}", // "CV" + $"{consonant}_{vowel}", // "C_V" + }; + // Check each dynamically generated format + foreach (var variation1 in dynamicVariations1) { + if (HasOto(variation1, tone) || HasOto(ValidateAlias(variation1), tone)) { + return variation1; + } + } + } + if (type.Contains("dynEnd")) { string consonant = ""; string vowel = "";