Skip to content

Commit bd5641c

Browse files
committed
setup beta and stable release channels
1 parent af16021 commit bd5641c

File tree

11 files changed

+2657
-2612
lines changed

11 files changed

+2657
-2612
lines changed

OpenUtau.Core/G2p/ItalianG2p.cs

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using Microsoft.ML.OnnxRuntime;
5-
using OpenUtau.Api;
6-
7-
namespace OpenUtau.Core.G2p {
8-
public class ItalianG2p : G2pPack {
9-
private static readonly string[] graphemes = new string[] {
10-
"", "", "", "", "\'", "a", "b", "c", "d", "e",
11-
"f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
12-
"q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
13-
"à", "é", "è", "È", "í", "ì", "ò", "ú", "ù",
14-
};
15-
16-
private static readonly string[] phonemes = new string[] {
17-
"", "", "", "", "a", "a1", "b", "d", "dz", "dZZ", "e", "e1", "EE", "f",
18-
"g", "i", "i1", "JJ", "k", "l", "LL", "m", "n", "nf", "ng", "o", "o1",
19-
"OO", "p", "r", "rr", "s", "SS", "t", "ts", "tSS", "u", "u1", "v", "w",
20-
"y", "z",
21-
};
22-
23-
private static object lockObj = new object();
24-
private static Dictionary<string, int> graphemeIndexes;
25-
private static IG2p dict;
26-
private static InferenceSession session;
27-
private static Dictionary<string, string[]> predCache = new Dictionary<string, string[]>();
28-
29-
public ItalianG2p() {
30-
lock (lockObj) {
31-
if (graphemeIndexes == null) {
32-
graphemeIndexes = graphemes
33-
.Skip(4)
34-
.Select((g, i) => Tuple.Create(g, i))
35-
.ToDictionary(t => t.Item1, t => t.Item2 + 4);
36-
var tuple = LoadPack(Data.Resources.g2p_it);
37-
dict = tuple.Item1;
38-
session = tuple.Item2;
39-
}
40-
}
41-
GraphemeIndexes = graphemeIndexes;
42-
Phonemes = phonemes;
43-
Dict = dict;
44-
Session = session;
45-
PredCache = predCache;
46-
}
47-
}
48-
}
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using Microsoft.ML.OnnxRuntime;
5+
using OpenUtau.Api;
6+
7+
namespace OpenUtau.Core.G2p {
8+
public class ItalianG2p : G2pPack {
9+
private static readonly string[] graphemes = new string[] {
10+
"", "", "", "", "\'", "a", "b", "c", "d", "e",
11+
"f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
12+
"q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
13+
"à", "é", "è", "È", "í", "ì", "ò", "ú", "ù",
14+
};
15+
16+
private static readonly string[] phonemes = new string[] {
17+
"", "", "", "", "a", "a1", "b", "d", "dz", "dZZ", "e", "e1", "EE", "f",
18+
"g", "i", "i1", "JJ", "k", "l", "LL", "m", "n", "nf", "ng", "o", "o1",
19+
"OO", "p", "r", "rr", "s", "SS", "t", "ts", "tSS", "u", "u1", "v", "w",
20+
"y", "z",
21+
};
22+
23+
private static object lockObj = new object();
24+
private static Dictionary<string, int> graphemeIndexes;
25+
private static IG2p dict;
26+
private static InferenceSession session;
27+
private static Dictionary<string, string[]> predCache = new Dictionary<string, string[]>();
28+
29+
public ItalianG2p() {
30+
lock (lockObj) {
31+
if (graphemeIndexes == null) {
32+
graphemeIndexes = graphemes
33+
.Skip(4)
34+
.Select((g, i) => Tuple.Create(g, i))
35+
.ToDictionary(t => t.Item1, t => t.Item2 + 4);
36+
var tuple = LoadPack(Data.Resources.g2p_it);
37+
dict = tuple.Item1;
38+
session = tuple.Item2;
39+
}
40+
}
41+
GraphemeIndexes = graphemeIndexes;
42+
Phonemes = phonemes;
43+
Dict = dict;
44+
Session = session;
45+
PredCache = predCache;
46+
}
47+
}
48+
}

OpenUtau.Core/G2p/SpanishG2p.cs

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using Microsoft.ML.OnnxRuntime;
5-
using OpenUtau.Api;
6-
7-
namespace OpenUtau.Core.G2p {
8-
public class SpanishG2p : G2pPack {
9-
private static readonly string[] graphemes = new string[] {
10-
"", "", "", "", "\'", "-", "a", "b", "c", "d", "e",
11-
"f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
12-
"q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
13-
"Á", "É", "Í", "Ó", "Ú", "á", "ã", "é", "ë", "ê", "í",
14-
"ñ", "ó", "ú", "ü"
15-
};
16-
17-
private static readonly string[] phonemes = new string[] {
18-
"", "", "", "", "a", "b", "B", "ch", "d", "D", "e", "f",
19-
"g", "G", "gn", "i", "I", "k", "l", "ll", "m", "n", "o",
20-
"p", "r", "rr", "s", "t", "u", "U", "w", "x", "y", "Y", "z"
21-
};
22-
23-
private static object lockObj = new object();
24-
private static Dictionary<string, int> graphemeIndexes;
25-
private static IG2p dict;
26-
private static InferenceSession session;
27-
private static Dictionary<string, string[]> predCache = new Dictionary<string, string[]>();
28-
29-
public SpanishG2p() {
30-
lock (lockObj) {
31-
if (graphemeIndexes == null) {
32-
graphemeIndexes = graphemes
33-
.Skip(4)
34-
.Select((g, i) => Tuple.Create(g, i))
35-
.ToDictionary(t => t.Item1, t => t.Item2 + 4);
36-
var tuple = LoadPack(
37-
Data.Resources.g2p_es,
38-
s => s.ToLowerInvariant());
39-
dict = tuple.Item1;
40-
session = tuple.Item2;
41-
}
42-
}
43-
GraphemeIndexes = graphemeIndexes;
44-
Phonemes = phonemes;
45-
Dict = dict;
46-
Session = session;
47-
PredCache = predCache;
48-
}
49-
}
50-
}
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using Microsoft.ML.OnnxRuntime;
5+
using OpenUtau.Api;
6+
7+
namespace OpenUtau.Core.G2p {
8+
public class SpanishG2p : G2pPack {
9+
private static readonly string[] graphemes = new string[] {
10+
"", "", "", "", "\'", "-", "a", "b", "c", "d", "e",
11+
"f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
12+
"q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
13+
"Á", "É", "Í", "Ó", "Ú", "á", "ã", "é", "ë", "ê", "í",
14+
"ñ", "ó", "ú", "ü"
15+
};
16+
17+
private static readonly string[] phonemes = new string[] {
18+
"", "", "", "", "a", "b", "B", "ch", "d", "D", "e", "f",
19+
"g", "G", "gn", "i", "I", "k", "l", "ll", "m", "n", "o",
20+
"p", "r", "rr", "s", "t", "u", "U", "w", "x", "y", "Y", "z"
21+
};
22+
23+
private static object lockObj = new object();
24+
private static Dictionary<string, int> graphemeIndexes;
25+
private static IG2p dict;
26+
private static InferenceSession session;
27+
private static Dictionary<string, string[]> predCache = new Dictionary<string, string[]>();
28+
29+
public SpanishG2p() {
30+
lock (lockObj) {
31+
if (graphemeIndexes == null) {
32+
graphemeIndexes = graphemes
33+
.Skip(4)
34+
.Select((g, i) => Tuple.Create(g, i))
35+
.ToDictionary(t => t.Item1, t => t.Item2 + 4);
36+
var tuple = LoadPack(
37+
Data.Resources.g2p_es,
38+
s => s.ToLowerInvariant());
39+
dict = tuple.Item1;
40+
session = tuple.Item2;
41+
}
42+
}
43+
GraphemeIndexes = graphemeIndexes;
44+
Phonemes = phonemes;
45+
Dict = dict;
46+
Session = session;
47+
PredCache = predCache;
48+
}
49+
}
50+
}

OpenUtau.Core/Util/Preferences.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public class SerializablePreferences {
112112
public bool LyricsHelperBrackets = false;
113113
public int OtoEditor = 0;
114114
public string VLabelerPath = string.Empty;
115+
public bool Beta = false;
115116
}
116117
}
117118
}

OpenUtau.Plugin.Builtin/VietnameseCVVCPhonemizer.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
221221
phonemes.Add(
222222
new Phoneme { phoneme = $"{N}-", position = End });
223223
}
224-
} else if (prevNeighbour == null) {
224+
} else if (prevNeighbour == null) {
225225
phonemes.Add(
226-
new Phoneme { phoneme = $"-{N}" });
226+
new Phoneme { phoneme = $"-{N}" });
227227
}
228228
}
229229
// 2 kí tự CV, ví dụ: "ba"
@@ -242,10 +242,10 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
242242
phonemes.Add(
243243
new Phoneme { phoneme = $"{N2}-", position = End });
244244
}
245-
} else if (prevNeighbour == null) {
245+
} else if (prevNeighbour == null) {
246246
phonemes.Add(
247-
new Phoneme { phoneme = $"{N}" });
248-
}
247+
new Phoneme { phoneme = $"{N}" });
248+
}
249249
}
250250
// 2 kí tự VV, ví dụ: "oa"
251251
if ((dem == 2) && kocoC) {
@@ -738,7 +738,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
738738
new Phoneme { phoneme = $"{C}{V}" });
739739
phonemes.Add(
740740
new Phoneme { phoneme = $"{V}-", position = End });
741-
} else {
741+
} else {
742742
phonemes.Add(
743743
new Phoneme { phoneme = $"{C}{V}" });
744744
}
@@ -879,7 +879,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
879879
phonemes.Add(
880880
new Phoneme { phoneme = $"{V1}{V2}", position = Long });
881881
phonemes.Add(
882-
new Phoneme { phoneme = $"{VC}", position = ViTri });
882+
new Phoneme { phoneme = $"{VC}", position = ViTri });
883883
}
884884
}
885885
// 3 kí tự VVV/VVC chia 2 nốt, ví dụ: "yên" "ướt"
@@ -930,7 +930,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
930930
phonemes.Add(
931931
new Phoneme { phoneme = $"{vow}{V1}" });
932932
phonemes.Add(
933-
new Phoneme { phoneme = $"{VVC}", position = ViTri });
933+
new Phoneme { phoneme = $"{VVC}", position = ViTri });
934934
}
935935
}
936936
// 3 kí tự CVC/CVV, ví dụ: "hát" "hoa"
@@ -1073,8 +1073,8 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
10731073
phonemes.Add(
10741074
new Phoneme { phoneme = $"{V1}{V2}", position = Long });
10751075
phonemes.Add(
1076-
new Phoneme { phoneme = $"{VVC}", position = ViTri });
1077-
}
1076+
new Phoneme { phoneme = $"{VVC}", position = ViTri });
1077+
}
10781078
}
10791079
// 4 kí tự CVVC, có VVC liền, chia 2 nốt, ví dụ "thiết" "tiên"
10801080
if (dem == 4 && tontaiVVC && tontaiC) {
@@ -1129,8 +1129,8 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
11291129
new Phoneme { phoneme = $"{VVC}", position = ViTri });
11301130
phonemes.Add(
11311131
new Phoneme { phoneme = $"{N}-", position = End });
1132-
} else {
1133-
phonemes.Add(
1132+
} else {
1133+
phonemes.Add(
11341134
new Phoneme { phoneme = $"{C}{V1}" });
11351135
phonemes.Add(
11361136
new Phoneme { phoneme = $"{VVC}", position = ViTri });
@@ -1299,7 +1299,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
12991299
phonemes.Add(
13001300
new Phoneme { phoneme = $"{V1}{V2}", position = Long });
13011301
phonemes.Add(
1302-
new Phoneme { phoneme = $"{VVC}", position = ViTri });
1302+
new Phoneme { phoneme = $"{VVC}", position = ViTri });
13031303
}
13041304
}
13051305
if (BR) {
@@ -1314,10 +1314,10 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
13141314
phonemes.Add(
13151315
new Phoneme { phoneme = $"{vow}-", position = -60 });
13161316
phonemes.Add(
1317-
new Phoneme { phoneme = $"breath{num}" });
1318-
}
1319-
}
1320-
}
1317+
new Phoneme { phoneme = $"breath{num}" });
1318+
}
1319+
}
1320+
}
13211321
}
13221322
}
13231323
int noteIndex = 0;

OpenUtau.Plugin.Builtin/VietnameseVCVPhonemizer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
237237
phonemes.Add(
238238
new Phoneme { phoneme = $"{N2} -", position = End });
239239
}
240-
} else if (prevNeighbour == null) {
240+
} else if (prevNeighbour == null) {
241241
phonemes.Add(
242-
new Phoneme { phoneme = $"- {N}" });
243-
}
242+
new Phoneme { phoneme = $"- {N}" });
243+
}
244244
}
245245
// 2 kí tự VV/VC, ví dụ: "oa" "an"
246246
if ((dem == 2) && kocoC && kocoCcuoi) {
@@ -861,7 +861,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
861861
phonemes.Add(
862862
new Phoneme { phoneme = $"{V1} {V2}", position = Long });
863863
phonemes.Add(
864-
new Phoneme { phoneme = $"{V2} {V3}", position = ViTri });
864+
new Phoneme { phoneme = $"{V2} {V3}", position = ViTri });
865865
}
866866
}
867867
// 3 kí tự VVV/VVC chia 2 nốt, ví dụ: "yên" "ướt"
@@ -890,7 +890,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
890890
phonemes.Add(
891891
new Phoneme { phoneme = $"{vow} {V1}" });
892892
phonemes.Add(
893-
new Phoneme { phoneme = $"{VVC}", position = ViTri });
893+
new Phoneme { phoneme = $"{VVC}", position = ViTri });
894894
}
895895
}
896896
// 3 kí tự CVC, ví dụ: "hát"
@@ -1135,8 +1135,8 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
11351135
phonemes.Add(
11361136
new Phoneme { phoneme = $"{vow} -", position = -60 });
11371137
phonemes.Add(
1138-
new Phoneme { phoneme = $"breath{num}" });
1139-
}
1138+
new Phoneme { phoneme = $"breath{num}" });
1139+
}
11401140
}
11411141
}
11421142
}

0 commit comments

Comments
 (0)