Skip to content

Commit

Permalink
resolve conflicts, move diffsinger phonemizers into a subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
oxygen-dioxide committed Jan 25, 2024
1 parent dc1ef9a commit 17a8d8b
Show file tree
Hide file tree
Showing 6 changed files with 497 additions and 496 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using OpenUtau.Api;
using OpenUtau.Core.G2p;

namespace OpenUtau.Core.DiffSinger {
[Phonemizer("DiffSinger Italian Phonemizer", "DIFFS IT", language: "IT")]
public class DiffSingerItalianPhonemizer : DiffSingerG2pPhonemizer {
protected override string GetDictionaryName() => "dsdict-it.yaml";
protected override IG2p LoadBaseG2p() => new ItalianG2p();
protected override string[] GetBaseG2pVowels() => new string[] {
"a", "a1", "e", "e1", "EE", "i", "i1", "o", "o1", "OO", "u", "u1"
};

protected override string[] GetBaseG2pConsonants() => new string[] {
"b", "d", "dz", "dZZ", "f", "g", "JJ", "k", "l", "LL", "m", "n",
"nf", "ng", "p", "r", "rr", "s", "SS", "t", "ts", "tSS", "v", "w", "y", "z"
};
}
}
using OpenUtau.Api;
using OpenUtau.Core.G2p;

namespace OpenUtau.Core.DiffSinger {
[Phonemizer("DiffSinger Italian Phonemizer", "DIFFS IT", language: "IT")]
public class DiffSingerItalianPhonemizer : DiffSingerG2pPhonemizer {
protected override string GetDictionaryName() => "dsdict-it.yaml";
protected override IG2p LoadBaseG2p() => new ItalianG2p();
protected override string[] GetBaseG2pVowels() => new string[] {
"a", "a1", "e", "e1", "EE", "i", "i1", "o", "o1", "OO", "u", "u1"
};

protected override string[] GetBaseG2pConsonants() => new string[] {
"b", "d", "dz", "dZZ", "f", "g", "JJ", "k", "l", "LL", "m", "n",
"nf", "ng", "p", "r", "rr", "s", "SS", "t", "ts", "tSS", "v", "w", "y", "z"
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace OpenUtau.Core.DiffSinger {
[Phonemizer("DiffSinger Jyutping Phonemizer", "DIFFS ZH-YUE", language: "ZH-YUE")]
public class DiffSingerJyutpingPhonemizer : DiffSingerBasePhonemizer {
protected override string GetDictionaryName() => "dsdict-zh-yue.yaml";
protected override string[] Romanize(IEnumerable<string> lyrics) {
return ZhG2p.CantoneseInstance.Convert(lyrics.ToList(), false, true).Split(" ");
}
Expand Down
Loading

0 comments on commit 17a8d8b

Please sign in to comment.