csukuangfj
commited on
Commit
•
b436d26
1
Parent(s):
ceea97b
update
Browse files- tokens.txt +130 -0
- vits-piper-en_US.py +11 -0
tokens.txt
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_ 0
|
2 |
+
^ 1
|
3 |
+
$ 2
|
4 |
+
3
|
5 |
+
! 4
|
6 |
+
' 5
|
7 |
+
( 6
|
8 |
+
) 7
|
9 |
+
, 8
|
10 |
+
- 9
|
11 |
+
. 10
|
12 |
+
: 11
|
13 |
+
; 12
|
14 |
+
? 13
|
15 |
+
a 14
|
16 |
+
b 15
|
17 |
+
c 16
|
18 |
+
d 17
|
19 |
+
e 18
|
20 |
+
f 19
|
21 |
+
h 20
|
22 |
+
i 21
|
23 |
+
j 22
|
24 |
+
k 23
|
25 |
+
l 24
|
26 |
+
m 25
|
27 |
+
n 26
|
28 |
+
o 27
|
29 |
+
p 28
|
30 |
+
q 29
|
31 |
+
r 30
|
32 |
+
s 31
|
33 |
+
t 32
|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+
ʍ 103
|
105 |
+
ʎ 104
|
106 |
+
ʏ 105
|
107 |
+
ʐ 106
|
108 |
+
ʑ 107
|
109 |
+
ʒ 108
|
110 |
+
ʔ 109
|
111 |
+
ʕ 110
|
112 |
+
ʘ 111
|
113 |
+
ʙ 112
|
114 |
+
ʛ 113
|
115 |
+
ʜ 114
|
116 |
+
ʝ 115
|
117 |
+
ʟ 116
|
118 |
+
ʡ 117
|
119 |
+
ʢ 118
|
120 |
+
ʲ 119
|
121 |
+
ˈ 120
|
122 |
+
ˌ 121
|
123 |
+
ː 122
|
124 |
+
ˑ 123
|
125 |
+
˞ 124
|
126 |
+
β 125
|
127 |
+
θ 126
|
128 |
+
χ 127
|
129 |
+
ᵻ 128
|
130 |
+
ⱱ 129
|
vits-piper-en_US.py
CHANGED
@@ -31,6 +31,14 @@ def load_config(model):
|
|
31 |
return config
|
32 |
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
# for en_US-lessac-medium.onnx
|
35 |
# export TYPE=lessac
|
36 |
# export NAME=medium
|
@@ -49,6 +57,9 @@ def main():
|
|
49 |
|
50 |
config = load_config(f"en_US-{name}-{t}.onnx")
|
51 |
|
|
|
|
|
|
|
52 |
print("add model metadata")
|
53 |
meta_data = {
|
54 |
"model_type": "vits",
|
|
|
31 |
return config
|
32 |
|
33 |
|
34 |
+
def generate_tokens(config):
|
35 |
+
id_map = config["phoneme_id_map"]
|
36 |
+
with open("tokens.txt", "w", encoding="utf-8") as f:
|
37 |
+
for s, i in id_map.items():
|
38 |
+
f.write(f"{s} {i[0]}\n")
|
39 |
+
print("Generated tokens.txt")
|
40 |
+
|
41 |
+
|
42 |
# for en_US-lessac-medium.onnx
|
43 |
# export TYPE=lessac
|
44 |
# export NAME=medium
|
|
|
57 |
|
58 |
config = load_config(f"en_US-{name}-{t}.onnx")
|
59 |
|
60 |
+
print("generate tokens")
|
61 |
+
generate_tokens(config)
|
62 |
+
|
63 |
print("add model metadata")
|
64 |
meta_data = {
|
65 |
"model_type": "vits",
|