Spaces:
Running
Running
replaced id with domain voice
Browse files- app.py +2 -3
- voice_description_indian.json +235 -197
app.py
CHANGED
@@ -23,7 +23,7 @@ def load_voice_descriptions(file_path):
|
|
23 |
def get_audio(input_text, voice_description_id):
|
24 |
try:
|
25 |
# Find the selected voice description
|
26 |
-
selected_description = next((desc for desc in voice_descriptions if desc['
|
27 |
|
28 |
if selected_description:
|
29 |
voice_description = selected_description['voice_description']
|
@@ -76,7 +76,7 @@ def get_audio(input_text, voice_description_id):
|
|
76 |
voice_descriptions = load_voice_descriptions('voice_description_indian.json')
|
77 |
|
78 |
# Extract IDs and descriptions for dropdown menu
|
79 |
-
dropdown_choices = [(
|
80 |
|
81 |
# Define the Gradio interface
|
82 |
with gr.Blocks() as demo:
|
@@ -113,4 +113,3 @@ try:
|
|
113 |
demo.launch()
|
114 |
except Exception as e:
|
115 |
logger.error(f"Failed to launch Gradio demo: {e}")
|
116 |
-
|
|
|
23 |
def get_audio(input_text, voice_description_id):
|
24 |
try:
|
25 |
# Find the selected voice description
|
26 |
+
selected_description = next((desc for desc in voice_descriptions if desc['userdomain_voice'] == voice_description_id), None)
|
27 |
|
28 |
if selected_description:
|
29 |
voice_description = selected_description['voice_description']
|
|
|
76 |
voice_descriptions = load_voice_descriptions('voice_description_indian.json')
|
77 |
|
78 |
# Extract IDs and descriptions for dropdown menu
|
79 |
+
dropdown_choices = [(desc['userdomain_voice'], f"{desc['userdomain_voice']}: {desc['voice_description'][:50]}...") for desc in voice_descriptions]
|
80 |
|
81 |
# Define the Gradio interface
|
82 |
with gr.Blocks() as demo:
|
|
|
113 |
demo.launch()
|
114 |
except Exception as e:
|
115 |
logger.error(f"Failed to launch Gradio demo: {e}")
|
|
voice_description_indian.json
CHANGED
@@ -1,198 +1,236 @@
|
|
1 |
[
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
[
|
2 |
+
{
|
3 |
+
"id": 1,
|
4 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his very low-pitched voice with crisp clarity.",
|
5 |
+
"output_file_name": "male_indian_very_low_pitch.mp3",
|
6 |
+
"userdomain_voice": "male_indian_very_low_pitch"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"id": 2,
|
10 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her quite low-pitched voice with crisp clarity.",
|
11 |
+
"output_file_name": "female_indian_quite_low_pitch.mp3",
|
12 |
+
"userdomain_voice": "female_indian_quite_low_pitch"
|
13 |
+
},
|
14 |
+
{
|
15 |
+
"id": 3,
|
16 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his fairly low-pitched voice with crisp clarity.",
|
17 |
+
"output_file_name": "male_indian_fairly_low_pitch.mp3",
|
18 |
+
"userdomain_voice": "male_indian_fairly_low_pitch"
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"id": 4,
|
22 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her slightly low-pitched voice with crisp clarity.",
|
23 |
+
"output_file_name": "female_indian_slightly_low_pitch.mp3",
|
24 |
+
"userdomain_voice": "female_indian_slightly_low_pitch"
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"id": 5,
|
28 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her slightly high-pitched voice with crisp clarity.",
|
29 |
+
"output_file_name": "female_indian_slightly_high_pitch.mp3",
|
30 |
+
"userdomain_voice": "female_indian_slightly_high_pitch"
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"id": 6,
|
34 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his fairly high-pitched voice with crisp clarity.",
|
35 |
+
"output_file_name": "male_indian_fairly_high_pitch.mp3",
|
36 |
+
"userdomain_voice": "male_indian_fairly_high_pitch"
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"id": 7,
|
40 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her quite high-pitched voice with crisp clarity.",
|
41 |
+
"output_file_name": "female_indian_quite_high_pitch.mp3",
|
42 |
+
"userdomain_voice": "female_indian_quite_high_pitch"
|
43 |
+
},
|
44 |
+
{
|
45 |
+
"id": 8,
|
46 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his very high-pitched voice with crisp clarity.",
|
47 |
+
"output_file_name": "male_indian_very_high_pitch.mp3",
|
48 |
+
"userdomain_voice": "male_indian_very_high_pitch"
|
49 |
+
},
|
50 |
+
{
|
51 |
+
"id": 9,
|
52 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. Her tone is very monotone.",
|
53 |
+
"output_file_name": "female_indian_monotone.mp3",
|
54 |
+
"userdomain_voice": "female_indian_monotone"
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"id": 10,
|
58 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. Her tone is quite monotone.",
|
59 |
+
"output_file_name": "female_indian_quite_monotone.mp3",
|
60 |
+
"userdomain_voice": "female_indian_quite_monotone"
|
61 |
+
},
|
62 |
+
{
|
63 |
+
"id": 11,
|
64 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity. His tone is fairly monotone.",
|
65 |
+
"output_file_name": "male_indian_fairly_monotone.mp3",
|
66 |
+
"userdomain_voice": "male_indian_fairly_monotone"
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"id": 12,
|
70 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. Her tone is slightly monotone.",
|
71 |
+
"output_file_name": "female_indian_slightly_monotone.mp3",
|
72 |
+
"userdomain_voice": "female_indian_slightly_monotone"
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"id": 13,
|
76 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity. His tone is slightly expressive and animated.",
|
77 |
+
"output_file_name": "male_indian_slightly_expressive.mp3",
|
78 |
+
"userdomain_voice": "male_indian_slightly_expressive"
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"id": 14,
|
82 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. Her tone is fairly expressive and animated.",
|
83 |
+
"output_file_name": "female_indian_fairly_expressive.mp3",
|
84 |
+
"userdomain_voice": "female_indian_fairly_expressive"
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"id": 15,
|
88 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity. His tone is quite expressive and animated.",
|
89 |
+
"output_file_name": "male_indian_quite_expressive.mp3",
|
90 |
+
"userdomain_voice": "male_indian_quite_expressive"
|
91 |
+
},
|
92 |
+
{
|
93 |
+
"id": 16,
|
94 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. Her tone is very expressive and animated.",
|
95 |
+
"output_file_name": "female_indian_very_expressive.mp3",
|
96 |
+
"userdomain_voice": "female_indian_very_expressive"
|
97 |
+
},
|
98 |
+
{
|
99 |
+
"id": 17,
|
100 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity. He reads the book very slowly.",
|
101 |
+
"output_file_name": "male_indian_very_slow.mp3",
|
102 |
+
"userdomain_voice": "male_indian_very_slow"
|
103 |
+
},
|
104 |
+
{
|
105 |
+
"id": 18,
|
106 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. She reads the book quite slowly.",
|
107 |
+
"output_file_name": "female_indian_quite_slow.mp3",
|
108 |
+
"userdomain_voice": "female_indian_quite_slow"
|
109 |
+
},
|
110 |
+
{
|
111 |
+
"id": 19,
|
112 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity. He reads the book fairly slowly.",
|
113 |
+
"output_file_name": "male_indian_fairly_slow.mp3",
|
114 |
+
"userdomain_voice": "male_indian_fairly_slow"
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"id": 20,
|
118 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. She reads the book slightly slowly.",
|
119 |
+
"output_file_name": "female_indian_slightly_slow.mp3",
|
120 |
+
"userdomain_voice": "female_indian_slightly_slow"
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"id": 21,
|
124 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity. He reads the book slightly quickly.",
|
125 |
+
"output_file_name": "male_indian_slightly_quick.mp3",
|
126 |
+
"userdomain_voice": "male_indian_slightly_quick"
|
127 |
+
},
|
128 |
+
{
|
129 |
+
"id": 22,
|
130 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. She reads the book fairly quickly.",
|
131 |
+
"output_file_name": "female_indian_fairly_quick.mp3",
|
132 |
+
"userdomain_voice": "female_indian_fairly_quick"
|
133 |
+
},
|
134 |
+
{
|
135 |
+
"id": 23,
|
136 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity. He reads the book quite quickly.",
|
137 |
+
"output_file_name": "male_indian_quite_quick.mp3",
|
138 |
+
"userdomain_voice": "male_indian_quite_quick"
|
139 |
+
},
|
140 |
+
{
|
141 |
+
"id": 24,
|
142 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity. She reads the book very quickly.",
|
143 |
+
"output_file_name": "female_indian_very_quick.mp3",
|
144 |
+
"userdomain_voice": "female_indian_very_quick"
|
145 |
+
},
|
146 |
+
{
|
147 |
+
"id": 25,
|
148 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The recording is very bad, and the speaker's voice is very distant-sounding and noisy.",
|
149 |
+
"output_file_name": "male_indian_bad_recording.mp3",
|
150 |
+
"userdomain_voice": "male_indian_bad_recording"
|
151 |
+
},
|
152 |
+
{
|
153 |
+
"id": 26,
|
154 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is quite close-sounding but very noisy.",
|
155 |
+
"output_file_name": "female_indian_noisy.mp3",
|
156 |
+
"userdomain_voice": "female_indian_noisy"
|
157 |
+
},
|
158 |
+
{
|
159 |
+
"id": 27,
|
160 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is close-sounding but fairly noisy.",
|
161 |
+
"output_file_name": "male_indian_fairly_noisy.mp3",
|
162 |
+
"userdomain_voice": "male_indian_fairly_noisy"
|
163 |
+
},
|
164 |
+
{
|
165 |
+
"id": 28,
|
166 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is fairly distant-sounding.",
|
167 |
+
"output_file_name": "male_indian_fairly_distant.mp3",
|
168 |
+
"userdomain_voice": "male_indian_fairly_distant"
|
169 |
+
},
|
170 |
+
{
|
171 |
+
"id": 29,
|
172 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is slightly distant-sounding.",
|
173 |
+
"output_file_name": "female_indian_slightly_distant.mp3",
|
174 |
+
"userdomain_voice": "female_indian_slightly_distant"
|
175 |
+
},
|
176 |
+
{
|
177 |
+
"id": 30,
|
178 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is fairly close-sounding.",
|
179 |
+
"output_file_name": "male_indian_fairly_close.mp3",
|
180 |
+
"userdomain_voice": "male_indian_fairly_close"
|
181 |
+
},
|
182 |
+
{
|
183 |
+
"id": 31,
|
184 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is quite close-sounding and quite clean.",
|
185 |
+
"output_file_name": "male_indian_quite_clean.mp3",
|
186 |
+
"userdomain_voice": "male_indian_quite_clean"
|
187 |
+
},
|
188 |
+
{
|
189 |
+
"id": 32,
|
190 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding and clean, and the recording is excellent, capturing her voice with crisp clarity.",
|
191 |
+
"output_file_name": "female_indian_clean.mp3",
|
192 |
+
"userdomain_voice": "female_indian_clean"
|
193 |
+
},
|
194 |
+
{
|
195 |
+
"id": 33,
|
196 |
+
"voice_description": "A male voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity.",
|
197 |
+
"output_file_name": "male_indian_accent.mp3",
|
198 |
+
"userdomain_voice": "male_indian_accent"
|
199 |
+
},
|
200 |
+
{
|
201 |
+
"id": 34,
|
202 |
+
"voice_description": "A male voice with an English accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity.",
|
203 |
+
"output_file_name": "male_english_accent.mp3",
|
204 |
+
"userdomain_voice": "male_english_accent"
|
205 |
+
},
|
206 |
+
{
|
207 |
+
"id": 35,
|
208 |
+
"voice_description": "A male voice with a Pakistani accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity.",
|
209 |
+
"output_file_name": "male_pakistani_accent.mp3",
|
210 |
+
"userdomain_voice": "male_pakistani_accent"
|
211 |
+
},
|
212 |
+
{
|
213 |
+
"id": 36,
|
214 |
+
"voice_description": "A female voice with an Italian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity.",
|
215 |
+
"output_file_name": "female_italian_accent.mp3",
|
216 |
+
"userdomain_voice": "female_italian_accent"
|
217 |
+
},
|
218 |
+
{
|
219 |
+
"id": 37,
|
220 |
+
"voice_description": "A male voice with a South African accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity.",
|
221 |
+
"output_file_name": "male_south_african_accent.mp3",
|
222 |
+
"userdomain_voice": "male_south_african_accent"
|
223 |
+
},
|
224 |
+
{
|
225 |
+
"id": 38,
|
226 |
+
"voice_description": "A male voice with a Canadian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing his voice with crisp clarity.",
|
227 |
+
"output_file_name": "male_canadian_accent.mp3",
|
228 |
+
"userdomain_voice": "male_canadian_accent"
|
229 |
+
},
|
230 |
+
{
|
231 |
+
"id": 39,
|
232 |
+
"voice_description": "A female voice with an Indian accent enunciates every word with precision. The speaker's voice is very close-sounding, and the recording is excellent, capturing her voice with crisp clarity.",
|
233 |
+
"output_file_name": "female_indian_accent.mp3",
|
234 |
+
"userdomain_voice": "female_indian_accent"
|
235 |
+
}
|
236 |
+
]
|