Skip to content

Commit

Permalink
[ARPA+ Phonemizer] Re-adjusted consonant length for liquids, semi-vow…
Browse files Browse the repository at this point in the history
…els and long consonants
  • Loading branch information
Cadlaxa committed Aug 15, 2024
1 parent b494994 commit 0c5becf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OpenUtau.Plugin.Builtin/ArpasingPlusPhonemizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ protected override double GetTransitionBasicLengthMs(string alias = "") {

foreach (var c in longConsonants) {
if (alias.Contains(c) && !alias.StartsWith(c) && !alias.Contains("ng -")) {
return base.GetTransitionBasicLengthMs() * 2.5;
return base.GetTransitionBasicLengthMs() * 2.6;
}
}

Expand Down Expand Up @@ -1782,7 +1782,7 @@ protected override double GetTransitionBasicLengthMs(string alias = "") {
foreach (var c in connectingGlides) {
foreach (var v in vowels.Except(excludedVowels)) {
if (alias.Contains($"{v} {c}") && !alias.Contains($"{c} -") && !alias.Contains($"{v} -")) {
return base.GetTransitionBasicLengthMs() * 2.5;
return base.GetTransitionBasicLengthMs() * 2.3;
}
}
}
Expand All @@ -1807,15 +1807,15 @@ protected override double GetTransitionBasicLengthMs(string alias = "") {
foreach (var c in semiVowels) {
foreach (var v in semilongConsonants.Except(excludedEndings)) {
if (alias.Contains(c) && !alias.StartsWith(c) && !alias.Contains($"{c} -")) {
return base.GetTransitionBasicLengthMs() * 1.5;
return base.GetTransitionBasicLengthMs() * 1.6;
}
}
}

if (hasCons) {
return base.GetTransitionBasicLengthMs() * 1.3; // Value for 'cons'
} else if (haslr) {
return base.GetTransitionBasicLengthMs() * 1.7; // Value for 'cons'
return base.GetTransitionBasicLengthMs() * 1.5; // Value for 'cons'
}

// Check if the alias ends with a consonant or vowel
Expand Down

0 comments on commit 0c5becf

Please sign in to comment.