Skip to content

Commit

Permalink
Fix end breath + update C# lang version
Browse files Browse the repository at this point in the history
  • Loading branch information
lottev1991 committed Oct 20, 2023
1 parent ae21338 commit 352430a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -1314,4 +1316,4 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
};
}
}
}
}
1 change: 1 addition & 0 deletions KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<RootNamespace>KoreanCVVCPlusPhonemizer</RootNamespace>
<AssemblyName>KoreanCVVCPlusPhonemizer</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<LangVersion>preview</LangVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
Expand Down

0 comments on commit 352430a

Please sign in to comment.