Update app.py
Browse files
app.py
CHANGED
@@ -40,18 +40,35 @@ def generate_speech(text):
|
|
40 |
def main(config):
|
41 |
|
42 |
# Create the Gradio interface
|
43 |
-
demo = gr.Interface(
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
)
|
52 |
|
53 |
# Launch the interface
|
54 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
return 0
|
56 |
|
57 |
|
|
|
40 |
def main(config):
|
41 |
|
42 |
# Create the Gradio interface
|
43 |
+
#demo = gr.Interface(
|
44 |
+
# fn=generate_speech,
|
45 |
+
# inputs=[
|
46 |
+
# gr.Textbox(label="Enter your text")
|
47 |
+
# ],
|
48 |
+
# outputs="audio",
|
49 |
+
# title="Voice Synthesis with Coqui-XTTS",
|
50 |
+
# description="Synthesize speech using predefined target voice and language."
|
51 |
+
#)
|
52 |
|
53 |
# Launch the interface
|
54 |
+
#demo.launch()
|
55 |
+
#return 0
|
56 |
+
|
57 |
+
with gr.Blocks() as demo:
|
58 |
+
gr.Markdown("# Voice Synthesis with Coqui-XTTS")
|
59 |
+
gr.Markdown("Synthesize speech using predefined target voice and language")
|
60 |
+
|
61 |
+
textbox = gr.Textbox(label="Enter your text")
|
62 |
+
tune_btn = gr.Button("Start Fine Tuning")
|
63 |
+
|
64 |
+
tune_btn.click(fn=generate_speech,
|
65 |
+
inputs=[
|
66 |
+
textbox
|
67 |
+
],
|
68 |
+
outputs="audio")
|
69 |
+
|
70 |
+
demo.launch()
|
71 |
+
|
72 |
return 0
|
73 |
|
74 |
|