Skip to content

Commit

Permalink
Merge pull request #899 from lottev1991/patch-39
Browse files Browse the repository at this point in the history
[ZH CVVC] Make VC use pitch of previous note
  • Loading branch information
stakira authored Nov 14, 2023
2 parents e5d58f4 + f7648f3 commit c287eca
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions OpenUtau.Plugin.Builtin/ChineseCVVCPhonemizer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -44,11 +44,16 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
vcLen = Math.Min(120, vcLen * 2); // explosive consonant with short preutter.
}
}
if (singer.TryGetMappedOto($"{prevVowel} {consonant}", notes[0].tone + attr0.toneShift, attr0.voiceColor, out oto)) {
var vcPhoneme = $"{prevVowel} {consonant}";
if (singer.TryGetMappedOto(vcPhoneme, prevNeighbour.Value.tone + attr0.toneShift, attr0.voiceColor, out oto)) {
vcPhoneme = oto.Alias;
}

if (singer.TryGetMappedOto(vcPhoneme, prevNeighbour.Value.tone + attr0.toneShift, attr0.voiceColor, out oto)) {
return new Result {
phonemes = new Phoneme[] {
new Phoneme() {
phoneme = oto.Alias,
phoneme = vcPhoneme,
position = -vcLen,
},
new Phoneme() {
Expand Down

0 comments on commit c287eca

Please sign in to comment.