Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,10 +30,11 @@ Eleven Multilingual V2 is the world's best Text-to-Speech model. Features 38 voi
|
|
30 |
"""
|
31 |
|
32 |
with gr.Blocks() as block:
|
33 |
-
#gr.Markdown('[  ](https://elevenlabs.io)')
|
34 |
gr.Markdown("# <center> ElevenLabs TTS </center>")
|
35 |
gr.Markdown(description)
|
36 |
|
|
|
|
|
37 |
with gr.Row(variant='panel'):
|
38 |
input_api_key = gr.Textbox(
|
39 |
type='password',
|
@@ -41,35 +42,34 @@ with gr.Blocks() as block:
|
|
41 |
placeholder='Enter your API key',
|
42 |
elem_id="input_api_key"
|
43 |
)
|
44 |
-
|
45 |
-
input_text = gr.Textbox(
|
46 |
-
label="Input Text (4000 characters max)",
|
47 |
-
lines=2,
|
48 |
-
value="Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! Γειά σας! Здравей! வணக்கம்!",
|
49 |
-
elem_id="input_text"
|
50 |
-
)
|
51 |
|
52 |
-
all_voices = voices()
|
53 |
input_voice = gr.Dropdown(
|
54 |
[ voice.name for voice in all_voices ],
|
55 |
value="Rachel",
|
56 |
label="Voice",
|
57 |
elem_id="input_voice"
|
58 |
)
|
59 |
-
|
60 |
-
run_button = gr.Button(
|
61 |
-
text="Generate Voice",
|
62 |
-
type="button"
|
63 |
-
)
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
-
|
73 |
outputs = [out_audio]
|
74 |
|
75 |
run_button.click(
|
|
|
30 |
"""
|
31 |
|
32 |
with gr.Blocks() as block:
|
|
|
33 |
gr.Markdown("# <center> ElevenLabs TTS </center>")
|
34 |
gr.Markdown(description)
|
35 |
|
36 |
+
all_voices = voices()
|
37 |
+
|
38 |
with gr.Row(variant='panel'):
|
39 |
input_api_key = gr.Textbox(
|
40 |
type='password',
|
|
|
42 |
placeholder='Enter your API key',
|
43 |
elem_id="input_api_key"
|
44 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
|
|
46 |
input_voice = gr.Dropdown(
|
47 |
[ voice.name for voice in all_voices ],
|
48 |
value="Rachel",
|
49 |
label="Voice",
|
50 |
elem_id="input_voice"
|
51 |
)
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
input_text = gr.Textbox(
|
54 |
+
label="Input Text (4000 characters max)",
|
55 |
+
lines=2,
|
56 |
+
value="Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! Γειά σας! Здравей! வணக்கம்!",
|
57 |
+
elem_id="input_text"
|
58 |
+
)
|
59 |
+
|
60 |
+
run_button = gr.Button(
|
61 |
+
text="Generate Voice",
|
62 |
+
type="button"
|
63 |
+
)
|
64 |
+
|
65 |
+
out_audio = gr.Audio(
|
66 |
+
label="Generated Voice",
|
67 |
+
type="numpy",
|
68 |
+
elem_id="out_audio",
|
69 |
+
format="mp3"
|
70 |
+
)
|
71 |
|
72 |
+
inputs = [input_text, input_voice, input_api_key]
|
73 |
outputs = [out_audio]
|
74 |
|
75 |
run_button.click(
|