From 352430af283b98fa1a10189121a0756c2408af74 Mon Sep 17 00:00:00 2001 From: Lotte V Date: Fri, 20 Oct 2023 18:26:07 +0200 Subject: [PATCH] Fix end breath + update C# lang version --- KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs | 8 +++++--- KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.csproj | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs b/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs index 9fcd34a..3c7838c 100644 --- a/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs +++ b/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs @@ -524,7 +524,6 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN } else { TNLconsonant = "ss"; } - } if ((TCLfinal == "K") && (TNLconsonant == "r") || (TCLfinal == "P") && (TNLconsonant == "r") || (TCLfinal == "T") && (TNLconsonant == "r")) { @@ -1059,6 +1058,9 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN if (prevExist && TPLfinal == "" && vowEnd.Contains(currentLyric)) { endBreath = $"{TPLplainvowel} {vowEnd}"; prevIsBreath = true; // to prevent this→→ case→→, for example... "[사, -, 사 (=notes)]" should be "[- sa, a -, - sa(=phonemes)]", but it becomes [sa, a -, 사(=phonemes)] in phonemizer, so '사' note becomes *no sound. + } else if (prevExist && TPLfinal != "" && vowEnd.Contains(currentLyric)) { + endBreath = $"{TPLplainfinal} {vowEnd}"; + prevIsBreath = true; // to prevent this→→ case→→, for example... "[사, -, 사 (=notes)]" should be "[- sa, a -, - sa(=phonemes)]", but it becomes [sa, a -, 사(=phonemes)] in phonemizer, so '사' note becomes *no sound. } if (singer.TryGetMappedOto(endBreath, note.tone + attr0.toneShift, attr0.voiceColor, out var oto)) { @@ -1202,7 +1204,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN consonant = "y"; } else if (nextLyric.StartsWith("w")) { consonant = "w"; - } else if (nextExist && nextHangeul && nextLyric.StartsWith("ㄹ")) { + } else if (nextExist && nextHangeul && nextLyric.StartsWith("ㄹ")) { TNLconsonant = "l"; consonant = TNLconsonant; } else if (nextExist && nextHangeul && nextLyric.StartsWith("1") && TNLconsonant == "p") { @@ -1314,4 +1316,4 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN }; } } -} +} \ No newline at end of file diff --git a/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.csproj b/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.csproj index 993b7d0..bc0ae58 100644 --- a/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.csproj +++ b/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.csproj @@ -10,6 +10,7 @@ KoreanCVVCPlusPhonemizer KoreanCVVCPlusPhonemizer v4.8.1 + preview 512 true