連続音の別名には遷移を挿入しない
このコミットが含まれているのは:
3ファイル変更
+44
検索条件に一致するファイルはありません
@@ -274,6 +274,24 @@ public sealed class PhonemizerTests : IDisposable
|
||||
Assert.Equal(["- あ", "a か"], units.Select(x => x.Alias));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ContinuousAliasesDoNotTakeAnExtraTransition()
|
||||
{
|
||||
var bank = TestVoiceBank.CreateVcvAndCvvcBank(directory);
|
||||
var units = Phonemize(bank, Lyrics("- あ", "a か"));
|
||||
|
||||
Assert.Equal(["- あ", "a か", "a -"], units.Select(x => x.Alias));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SingleLyricsPreferTheContinuousAliasInTheSameBank()
|
||||
{
|
||||
var bank = TestVoiceBank.CreateVcvAndCvvcBank(directory);
|
||||
var units = Phonemize(bank, Lyrics("あ", "か"));
|
||||
|
||||
Assert.Equal(["- あ", "a か", "a -"], units.Select(x => x.Alias));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UnresolvedLyricsAreReportedWithoutAnEntry()
|
||||
{
|
||||
|
||||
@@ -105,6 +105,30 @@ internal static class TestVoiceBank
|
||||
return VoiceBankLoader.Load("vcv", directory);
|
||||
}
|
||||
|
||||
public static VoiceBank CreateVcvAndCvvcBank(string directory)
|
||||
{
|
||||
WriteText(directory, VoiceBankLoader.CharacterFileName, "name=連続音CVVC\r\n");
|
||||
WriteText(
|
||||
directory,
|
||||
VoiceBankLoader.OtoFileName,
|
||||
string.Join("\r\n",
|
||||
[
|
||||
"a.wav=あ,50,80,-500,100,40",
|
||||
"ka.wav=か,50,120,-500,140,50",
|
||||
"start.wav=- あ,50,80,-500,100,40",
|
||||
"aka.wav=a か,50,120,-500,140,50",
|
||||
"ak.wav=a k,50,40,-200,60,20",
|
||||
"aend.wav=a -,50,40,-200,60,20",
|
||||
]));
|
||||
WriteSample(directory, "a.wav");
|
||||
WriteSample(directory, "ka.wav");
|
||||
WriteSample(directory, "start.wav");
|
||||
WriteSample(directory, "aka.wav");
|
||||
WriteSample(directory, "ak.wav");
|
||||
WriteSample(directory, "aend.wav");
|
||||
return VoiceBankLoader.Load("vcvcvvc", directory);
|
||||
}
|
||||
|
||||
public static VoiceBank CreateCvvcBank(string directory)
|
||||
{
|
||||
WriteText(directory, VoiceBankLoader.CharacterFileName, "name=CVVC\r\n");
|
||||
|
||||
@@ -64,6 +64,8 @@ internal static class Phonemizer
|
||||
var next = units[i + 1];
|
||||
if (current.IsSilent || next.IsSilent)
|
||||
continue;
|
||||
if (next.Alias.Contains(KanaRomanization.AliasSeparator))
|
||||
continue;
|
||||
|
||||
var vowel = KanaRomanization.GetVowel(current.Note.Lyric);
|
||||
var consonant = KanaRomanization.GetConsonant(next.Note.Lyric);
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする