updates, allow other model prefixes
Browse files- prepare_model.py +39 -39
- speakers-log.json +18 -18
- speakers.md +36 -18
prepare_model.py
CHANGED
@@ -20,24 +20,24 @@ def generate_html_output(data, repository_path):
|
|
20 |
|
21 |
# Load the data from the provided dictionary
|
22 |
data = {
|
23 |
-
"
|
24 |
-
"
|
25 |
-
"
|
26 |
-
"
|
27 |
-
"
|
28 |
-
"
|
29 |
-
"
|
30 |
-
"
|
31 |
-
"
|
32 |
-
"
|
33 |
-
"
|
34 |
-
"
|
35 |
-
"
|
36 |
-
"
|
37 |
-
"
|
38 |
-
"
|
39 |
-
"
|
40 |
-
"
|
41 |
}
|
42 |
|
43 |
# Convert the data to JSON format
|
@@ -58,29 +58,29 @@ speaker_indices = eval(output)
|
|
58 |
with open('speakers-log.json', 'r') as file:
|
59 |
speaker_ids = json.load(file)
|
60 |
|
61 |
-
# Create the speakers.md file
|
62 |
-
with open('speakers.md', 'w') as file:
|
63 |
-
for speaker_idx in speaker_indices:
|
64 |
-
# Remove the 'VCTK_' prefix
|
65 |
-
speaker_id = speaker_idx.replace('VCTK_', '')
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
continue
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
81 |
|
82 |
-
|
83 |
-
|
84 |
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
20 |
|
21 |
# Load the data from the provided dictionary
|
22 |
data = {
|
23 |
+
"VCTK_p225": {"age": 23, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
|
24 |
+
"VCTK_p228": {"age": 22, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
|
25 |
+
"VCTK_p229": {"age": 23, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
|
26 |
+
"VCTK_p230": {"age": 22, "gender": "F", "accents": "English", "region": "Stockton-on-tees", "comments": ""},
|
27 |
+
"VCTK_p231": {"age": 23, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
|
28 |
+
"VCTK_p233": {"age": 23, "gender": "F", "accents": "English", "region": "Staffordshire", "comments": ""},
|
29 |
+
"VCTK_p236": {"age": 23, "gender": "F", "accents": "English", "region": "Manchester", "comments": ""},
|
30 |
+
"VCTK_p239": {"age": 22, "gender": "F", "accents": "English", "region": "Southwest England", "comments": ""},
|
31 |
+
"VCTK_p240": {"age": 21, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
|
32 |
+
"VCTK_p244": {"age": 22, "gender": "F", "accents": "English", "region": "Manchester", "comments": ""},
|
33 |
+
"VCTK_p250": {"age": 22, "gender": "F", "accents": "English", "region": "Southeast England", "comments": ""},
|
34 |
+
"VCTK_p257": {"age": 24, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
|
35 |
+
"VCTK_p267": {"age": 23, "gender": "F", "accents": "English", "region": "Yorkshire", "comments": ""},
|
36 |
+
"VCTK_p268": {"age": 23, "gender": "F", "accents": "English", "region": "Southern England", "comments": ""},
|
37 |
+
"VCTK_p269": {"age": 20, "gender": "F", "accents": "English", "region": "Newcastle", "comments": ""},
|
38 |
+
"VCTK_p276": {"age": 24, "gender": "F", "accents": "English", "region": "Oxford", "comments": ""},
|
39 |
+
"VCTK_p277": {"age": 23, "gender": "F", "accents": "English", "region": "Northeast England", "comments": ""},
|
40 |
+
"VCTK_p282": {"age": 23, "gender": "F", "accents": "English", "region": "Newcastle", "comments": ""}
|
41 |
}
|
42 |
|
43 |
# Convert the data to JSON format
|
|
|
58 |
with open('speakers-log.json', 'r') as file:
|
59 |
speaker_ids = json.load(file)
|
60 |
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
+
for speaker_idx in speaker_indices:
|
63 |
+
# # Remove the 'VCTK_' prefix
|
64 |
+
speaker_id = speaker_idx
|
65 |
+
# speaker_id = speaker_idx.replace('VCTK_', '')
|
|
|
66 |
|
67 |
+
# Lookup the speaker ID in the loaded speaker IDs
|
68 |
+
if speaker_id in speaker_ids:
|
69 |
+
speaker_id_json = speaker_ids[speaker_id]
|
70 |
+
else:
|
71 |
+
continue
|
72 |
|
73 |
+
# # Generate the TTS command to create the audio file
|
74 |
+
# text = f"Hello, I am from {speaker_id_json['region']}. I hope that you will select my voice for your project. Thank you."
|
75 |
+
# # make samples directory if it doesn't exist
|
76 |
+
# if not os.path.exists("samples"):
|
77 |
+
# os.makedirs("samples")
|
78 |
|
79 |
+
# out_path = f"samples/{speaker_id}.wav"
|
80 |
+
# tts_command = f"tts --text \"{text}\" --model_path checkpoint_85000.pth --language_idx en --config_path config.json --speaker_idx \"VCTK_{speaker_id}\" --out_path {out_path}"
|
81 |
|
82 |
+
# Execute the TTS command
|
83 |
+
# os.system(tts_command)
|
84 |
+
|
85 |
+
# Write the speaker information to the speakers.md file
|
86 |
+
generate_html_output({speaker_id: speaker_id_json}, "https://huggingface.co/voices/VCTK_European_English_Females/resolve/main")
|
speakers-log.json
CHANGED
@@ -1,124 +1,124 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
"age": 23,
|
4 |
"gender": "F",
|
5 |
"accents": "English",
|
6 |
"region": "Southern England",
|
7 |
"comments": ""
|
8 |
},
|
9 |
-
"
|
10 |
"age": 22,
|
11 |
"gender": "F",
|
12 |
"accents": "English",
|
13 |
"region": "Southern England",
|
14 |
"comments": ""
|
15 |
},
|
16 |
-
"
|
17 |
"age": 23,
|
18 |
"gender": "F",
|
19 |
"accents": "English",
|
20 |
"region": "Southern England",
|
21 |
"comments": ""
|
22 |
},
|
23 |
-
"
|
24 |
"age": 22,
|
25 |
"gender": "F",
|
26 |
"accents": "English",
|
27 |
"region": "Stockton-on-tees",
|
28 |
"comments": ""
|
29 |
},
|
30 |
-
"
|
31 |
"age": 23,
|
32 |
"gender": "F",
|
33 |
"accents": "English",
|
34 |
"region": "Southern England",
|
35 |
"comments": ""
|
36 |
},
|
37 |
-
"
|
38 |
"age": 23,
|
39 |
"gender": "F",
|
40 |
"accents": "English",
|
41 |
"region": "Staffordshire",
|
42 |
"comments": ""
|
43 |
},
|
44 |
-
"
|
45 |
"age": 23,
|
46 |
"gender": "F",
|
47 |
"accents": "English",
|
48 |
"region": "Manchester",
|
49 |
"comments": ""
|
50 |
},
|
51 |
-
"
|
52 |
"age": 22,
|
53 |
"gender": "F",
|
54 |
"accents": "English",
|
55 |
"region": "Southwest England",
|
56 |
"comments": ""
|
57 |
},
|
58 |
-
"
|
59 |
"age": 21,
|
60 |
"gender": "F",
|
61 |
"accents": "English",
|
62 |
"region": "Southern England",
|
63 |
"comments": ""
|
64 |
},
|
65 |
-
"
|
66 |
"age": 22,
|
67 |
"gender": "F",
|
68 |
"accents": "English",
|
69 |
"region": "Manchester",
|
70 |
"comments": ""
|
71 |
},
|
72 |
-
"
|
73 |
"age": 22,
|
74 |
"gender": "F",
|
75 |
"accents": "English",
|
76 |
"region": "Southeast England",
|
77 |
"comments": ""
|
78 |
},
|
79 |
-
"
|
80 |
"age": 24,
|
81 |
"gender": "F",
|
82 |
"accents": "English",
|
83 |
"region": "Southern England",
|
84 |
"comments": ""
|
85 |
},
|
86 |
-
"
|
87 |
"age": 23,
|
88 |
"gender": "F",
|
89 |
"accents": "English",
|
90 |
"region": "Yorkshire",
|
91 |
"comments": ""
|
92 |
},
|
93 |
-
"
|
94 |
"age": 23,
|
95 |
"gender": "F",
|
96 |
"accents": "English",
|
97 |
"region": "Southern England",
|
98 |
"comments": ""
|
99 |
},
|
100 |
-
"
|
101 |
"age": 20,
|
102 |
"gender": "F",
|
103 |
"accents": "English",
|
104 |
"region": "Newcastle",
|
105 |
"comments": ""
|
106 |
},
|
107 |
-
"
|
108 |
"age": 24,
|
109 |
"gender": "F",
|
110 |
"accents": "English",
|
111 |
"region": "Oxford",
|
112 |
"comments": ""
|
113 |
},
|
114 |
-
"
|
115 |
"age": 23,
|
116 |
"gender": "F",
|
117 |
"accents": "English",
|
118 |
"region": "Northeast England",
|
119 |
"comments": ""
|
120 |
},
|
121 |
-
"
|
122 |
"age": 23,
|
123 |
"gender": "F",
|
124 |
"accents": "English",
|
|
|
1 |
{
|
2 |
+
"VCTK_p225": {
|
3 |
"age": 23,
|
4 |
"gender": "F",
|
5 |
"accents": "English",
|
6 |
"region": "Southern England",
|
7 |
"comments": ""
|
8 |
},
|
9 |
+
"VCTK_p228": {
|
10 |
"age": 22,
|
11 |
"gender": "F",
|
12 |
"accents": "English",
|
13 |
"region": "Southern England",
|
14 |
"comments": ""
|
15 |
},
|
16 |
+
"VCTK_p229": {
|
17 |
"age": 23,
|
18 |
"gender": "F",
|
19 |
"accents": "English",
|
20 |
"region": "Southern England",
|
21 |
"comments": ""
|
22 |
},
|
23 |
+
"VCTK_p230": {
|
24 |
"age": 22,
|
25 |
"gender": "F",
|
26 |
"accents": "English",
|
27 |
"region": "Stockton-on-tees",
|
28 |
"comments": ""
|
29 |
},
|
30 |
+
"VCTK_p231": {
|
31 |
"age": 23,
|
32 |
"gender": "F",
|
33 |
"accents": "English",
|
34 |
"region": "Southern England",
|
35 |
"comments": ""
|
36 |
},
|
37 |
+
"VCTK_p233": {
|
38 |
"age": 23,
|
39 |
"gender": "F",
|
40 |
"accents": "English",
|
41 |
"region": "Staffordshire",
|
42 |
"comments": ""
|
43 |
},
|
44 |
+
"VCTK_p236": {
|
45 |
"age": 23,
|
46 |
"gender": "F",
|
47 |
"accents": "English",
|
48 |
"region": "Manchester",
|
49 |
"comments": ""
|
50 |
},
|
51 |
+
"VCTK_p239": {
|
52 |
"age": 22,
|
53 |
"gender": "F",
|
54 |
"accents": "English",
|
55 |
"region": "Southwest England",
|
56 |
"comments": ""
|
57 |
},
|
58 |
+
"VCTK_p240": {
|
59 |
"age": 21,
|
60 |
"gender": "F",
|
61 |
"accents": "English",
|
62 |
"region": "Southern England",
|
63 |
"comments": ""
|
64 |
},
|
65 |
+
"VCTK_p244": {
|
66 |
"age": 22,
|
67 |
"gender": "F",
|
68 |
"accents": "English",
|
69 |
"region": "Manchester",
|
70 |
"comments": ""
|
71 |
},
|
72 |
+
"VCTK_p250": {
|
73 |
"age": 22,
|
74 |
"gender": "F",
|
75 |
"accents": "English",
|
76 |
"region": "Southeast England",
|
77 |
"comments": ""
|
78 |
},
|
79 |
+
"VCTK_p257": {
|
80 |
"age": 24,
|
81 |
"gender": "F",
|
82 |
"accents": "English",
|
83 |
"region": "Southern England",
|
84 |
"comments": ""
|
85 |
},
|
86 |
+
"VCTK_p267": {
|
87 |
"age": 23,
|
88 |
"gender": "F",
|
89 |
"accents": "English",
|
90 |
"region": "Yorkshire",
|
91 |
"comments": ""
|
92 |
},
|
93 |
+
"VCTK_p268": {
|
94 |
"age": 23,
|
95 |
"gender": "F",
|
96 |
"accents": "English",
|
97 |
"region": "Southern England",
|
98 |
"comments": ""
|
99 |
},
|
100 |
+
"VCTK_p269": {
|
101 |
"age": 20,
|
102 |
"gender": "F",
|
103 |
"accents": "English",
|
104 |
"region": "Newcastle",
|
105 |
"comments": ""
|
106 |
},
|
107 |
+
"VCTK_p276": {
|
108 |
"age": 24,
|
109 |
"gender": "F",
|
110 |
"accents": "English",
|
111 |
"region": "Oxford",
|
112 |
"comments": ""
|
113 |
},
|
114 |
+
"VCTK_p277": {
|
115 |
"age": 23,
|
116 |
"gender": "F",
|
117 |
"accents": "English",
|
118 |
"region": "Northeast England",
|
119 |
"comments": ""
|
120 |
},
|
121 |
+
"VCTK_p282": {
|
122 |
"age": 23,
|
123 |
"gender": "F",
|
124 |
"accents": "English",
|
speakers.md
CHANGED
@@ -1,18 +1,36 @@
|
|
1 |
-
<p>
|
2 |
-
<p>
|
3 |
-
<p>
|
4 |
-
<p>
|
5 |
-
<p>
|
6 |
-
<p>
|
7 |
-
<p>
|
8 |
-
<p>
|
9 |
-
<p>
|
10 |
-
<p>
|
11 |
-
<p>
|
12 |
-
<p>
|
13 |
-
<p>
|
14 |
-
<p>
|
15 |
-
<p>
|
16 |
-
<p>
|
17 |
-
<p>
|
18 |
-
<p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p>VCTK_VCTK_p225: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p225.wav" type="audio/wav"></audio> </p>
|
2 |
+
<p>VCTK_VCTK_p228: 22 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p228.wav" type="audio/wav"></audio> </p>
|
3 |
+
<p>VCTK_VCTK_p229: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p229.wav" type="audio/wav"></audio> </p>
|
4 |
+
<p>VCTK_VCTK_p230: 22 year old female, English accent (Stockton-on-tees)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p230.wav" type="audio/wav"></audio> </p>
|
5 |
+
<p>VCTK_VCTK_p231: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p231.wav" type="audio/wav"></audio> </p>
|
6 |
+
<p>VCTK_VCTK_p233: 23 year old female, English accent (Staffordshire)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p233.wav" type="audio/wav"></audio> </p>
|
7 |
+
<p>VCTK_VCTK_p236: 23 year old female, English accent (Manchester)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p236.wav" type="audio/wav"></audio> </p>
|
8 |
+
<p>VCTK_VCTK_p239: 22 year old female, English accent (Southwest England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p239.wav" type="audio/wav"></audio> </p>
|
9 |
+
<p>VCTK_VCTK_p240: 21 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p240.wav" type="audio/wav"></audio> </p>
|
10 |
+
<p>VCTK_VCTK_p244: 22 year old female, English accent (Manchester)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p244.wav" type="audio/wav"></audio> </p>
|
11 |
+
<p>VCTK_VCTK_p250: 22 year old female, English accent (Southeast England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p250.wav" type="audio/wav"></audio> </p>
|
12 |
+
<p>VCTK_VCTK_p257: 24 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p257.wav" type="audio/wav"></audio> </p>
|
13 |
+
<p>VCTK_VCTK_p267: 23 year old female, English accent (Yorkshire)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p267.wav" type="audio/wav"></audio> </p>
|
14 |
+
<p>VCTK_VCTK_p268: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p268.wav" type="audio/wav"></audio> </p>
|
15 |
+
<p>VCTK_VCTK_p269: 20 year old female, English accent (Newcastle)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p269.wav" type="audio/wav"></audio> </p>
|
16 |
+
<p>VCTK_VCTK_p276: 24 year old female, English accent (Oxford)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p276.wav" type="audio/wav"></audio> </p>
|
17 |
+
<p>VCTK_VCTK_p277: 23 year old female, English accent (Northeast England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p277.wav" type="audio/wav"></audio> </p>
|
18 |
+
<p>VCTK_VCTK_p282: 23 year old female, English accent (Newcastle)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p282.wav" type="audio/wav"></audio> </p>
|
19 |
+
<p>VCTK_VCTK_p225: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p225.wav" type="audio/wav"></audio> </p>
|
20 |
+
<p>VCTK_VCTK_p228: 22 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p228.wav" type="audio/wav"></audio> </p>
|
21 |
+
<p>VCTK_VCTK_p229: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p229.wav" type="audio/wav"></audio> </p>
|
22 |
+
<p>VCTK_VCTK_p230: 22 year old female, English accent (Stockton-on-tees)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p230.wav" type="audio/wav"></audio> </p>
|
23 |
+
<p>VCTK_VCTK_p231: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p231.wav" type="audio/wav"></audio> </p>
|
24 |
+
<p>VCTK_VCTK_p233: 23 year old female, English accent (Staffordshire)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p233.wav" type="audio/wav"></audio> </p>
|
25 |
+
<p>VCTK_VCTK_p236: 23 year old female, English accent (Manchester)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p236.wav" type="audio/wav"></audio> </p>
|
26 |
+
<p>VCTK_VCTK_p239: 22 year old female, English accent (Southwest England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p239.wav" type="audio/wav"></audio> </p>
|
27 |
+
<p>VCTK_VCTK_p240: 21 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p240.wav" type="audio/wav"></audio> </p>
|
28 |
+
<p>VCTK_VCTK_p244: 22 year old female, English accent (Manchester)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p244.wav" type="audio/wav"></audio> </p>
|
29 |
+
<p>VCTK_VCTK_p250: 22 year old female, English accent (Southeast England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p250.wav" type="audio/wav"></audio> </p>
|
30 |
+
<p>VCTK_VCTK_p257: 24 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p257.wav" type="audio/wav"></audio> </p>
|
31 |
+
<p>VCTK_VCTK_p267: 23 year old female, English accent (Yorkshire)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p267.wav" type="audio/wav"></audio> </p>
|
32 |
+
<p>VCTK_VCTK_p268: 23 year old female, English accent (Southern England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p268.wav" type="audio/wav"></audio> </p>
|
33 |
+
<p>VCTK_VCTK_p269: 20 year old female, English accent (Newcastle)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p269.wav" type="audio/wav"></audio> </p>
|
34 |
+
<p>VCTK_VCTK_p276: 24 year old female, English accent (Oxford)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p276.wav" type="audio/wav"></audio> </p>
|
35 |
+
<p>VCTK_VCTK_p277: 23 year old female, English accent (Northeast England)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p277.wav" type="audio/wav"></audio> </p>
|
36 |
+
<p>VCTK_VCTK_p282: 23 year old female, English accent (Newcastle)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Females/resolve/main/samples/VCTK_p282.wav" type="audio/wav"></audio> </p>
|