Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,12 +26,13 @@ def tts(text):
|
|
26 |
|
27 |
|
28 |
with gr.Blocks() as demo:
|
|
|
29 |
with gr.Row():
|
30 |
dd1 = gr.Dropdown(choices=['tts-1','tts-1-hd'], label='Model')
|
31 |
dd2 = gr.Dropdown(choices=['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'], label='Voice Options')
|
32 |
|
33 |
text = gr.Textbox(label="Input text")
|
34 |
-
btn = gr.Button("
|
35 |
output_audio = gr.Audio(label="Speech Output")
|
36 |
|
37 |
btn.click(fn=tts, inputs=text, outputs=output_audio, api_name="tts")
|
|
|
26 |
|
27 |
|
28 |
with gr.Blocks() as demo:
|
29 |
+
gr.Markdown("# <center> OpenAI Text-To-Speech API with Gradio </center>")
|
30 |
with gr.Row():
|
31 |
dd1 = gr.Dropdown(choices=['tts-1','tts-1-hd'], label='Model')
|
32 |
dd2 = gr.Dropdown(choices=['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'], label='Voice Options')
|
33 |
|
34 |
text = gr.Textbox(label="Input text")
|
35 |
+
btn = gr.Button("Text-To-Speech")
|
36 |
output_audio = gr.Audio(label="Speech Output")
|
37 |
|
38 |
btn.click(fn=tts, inputs=text, outputs=output_audio, api_name="tts")
|