Commit
•
b67aeec
1
Parent(s):
0d4b5e7
Update app.py
Browse files
app.py
CHANGED
@@ -193,6 +193,15 @@ for lang, code in SUPPORTED_LANGS:
|
|
193 |
for n in range(10):
|
194 |
speakers_list.append(f"{code}_speaker_{n}")
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
with gr.Blocks() as demo:
|
197 |
gr.Markdown(
|
198 |
f""" # <center>🐶🎶🥳 - Bark with Voice Cloning</center>
|
@@ -220,7 +229,7 @@ with gr.Blocks() as demo:
|
|
220 |
)
|
221 |
with gr.Row().style(equal_height=True):
|
222 |
|
223 |
-
inp2 = gr.Dropdown(speakers_list, value=speakers_list[
|
224 |
|
225 |
button = gr.Button("Generate using Bark")
|
226 |
|
@@ -238,7 +247,12 @@ with gr.Blocks() as demo:
|
|
238 |
out2 = gr.Audio(label="Generated Audio in a Custom Voice")
|
239 |
|
240 |
btn.click(voice_conversion, [inp5, inp6, inp7], [out2])
|
241 |
-
|
|
|
|
|
|
|
|
|
|
|
242 |
gr.Markdown(
|
243 |
""" ### <center>NOTE: Please do not generate any audio that is potentially harmful to any person or organization❗</center>
|
244 |
|
|
|
193 |
for n in range(10):
|
194 |
speakers_list.append(f"{code}_speaker_{n}")
|
195 |
|
196 |
+
examples1 = [
|
197 |
+
|
198 |
+
["Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe.",
|
199 |
+
"Speaker 1 (en)", 0.7, 0.7]
|
200 |
+
|
201 |
+
]
|
202 |
+
|
203 |
+
examples2 = [["test.wav", "Bark.wav", "Bark.wav"]]
|
204 |
+
|
205 |
with gr.Blocks() as demo:
|
206 |
gr.Markdown(
|
207 |
f""" # <center>🐶🎶🥳 - Bark with Voice Cloning</center>
|
|
|
229 |
)
|
230 |
with gr.Row().style(equal_height=True):
|
231 |
|
232 |
+
inp2 = gr.Dropdown(speakers_list, value=speakers_list[1], label="Acoustic Prompt")
|
233 |
|
234 |
button = gr.Button("Generate using Bark")
|
235 |
|
|
|
247 |
out2 = gr.Audio(label="Generated Audio in a Custom Voice")
|
248 |
|
249 |
btn.click(voice_conversion, [inp5, inp6, inp7], [out2])
|
250 |
+
|
251 |
+
gr.Examples(examples=examples1, fn=generate_text_to_speech, inputs=[inp1, inp2, inp3, inp4],
|
252 |
+
outputs=[out1], cache_examples=True)
|
253 |
+
gr.Examples(examples=examples2, fn=voice_conversion, inputs=[inp5, inp6, inp7],
|
254 |
+
outputs=[out2], cache_examples=True)
|
255 |
+
|
256 |
gr.Markdown(
|
257 |
""" ### <center>NOTE: Please do not generate any audio that is potentially harmful to any person or organization❗</center>
|
258 |
|