NeonBohdan
commited on
Commit
โข
b28fa4b
1
Parent(s):
2c967e5
Demo moved to Blocks
Browse files
README.md
CHANGED
@@ -4,6 +4,7 @@ emoji: ๐ธ
|
|
4 |
colorFrom: green
|
5 |
colorTo: green
|
6 |
sdk: gradio
|
|
|
7 |
app_file: app.py
|
8 |
pinned: false
|
9 |
license: apache-2.0
|
|
|
4 |
colorFrom: green
|
5 |
colorTo: green
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
app.py
CHANGED
@@ -11,6 +11,12 @@ LANGUAGES = [
|
|
11 |
"uk",
|
12 |
]
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
coquiTTS = CoquiTTS()
|
15 |
|
16 |
|
@@ -23,22 +29,33 @@ def tts(text: str, language: str):
|
|
23 |
|
24 |
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
)
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
)
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
"uk",
|
12 |
]
|
13 |
|
14 |
+
title = "๐ธ๐ฌ - NeonAI Coqui AI TTS Plugin"
|
15 |
+
description = "๐ธ๐ฌ - a deep learning toolkit for Text-to-Speech, battle-tested in research and production"
|
16 |
+
info = "more info at [Neon Coqui TTS Plugin](https://github.com/NeonGeckoCom/neon-tts-plugin-coqui), [Coqui TTS](https://github.com/coqui-ai/TTS)"
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
coquiTTS = CoquiTTS()
|
21 |
|
22 |
|
|
|
29 |
|
30 |
|
31 |
|
32 |
+
with gr.Blocks() as blocks:
|
33 |
+
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>"
|
34 |
+
+ title
|
35 |
+
+ "</h1>")
|
36 |
+
gr.Markdown(description)
|
37 |
+
with gr.Row():# equal_height=False
|
38 |
+
with gr.Column():# variant="panel"
|
39 |
+
textbox = gr.Textbox(
|
40 |
+
label="Input",
|
41 |
+
value="Hello, how are you?",
|
42 |
+
max_lines=3,
|
43 |
+
)
|
44 |
+
radio = gr.Radio(
|
45 |
+
label="Language",
|
46 |
+
choices=LANGUAGES,
|
47 |
+
)
|
48 |
+
with gr.Row():# mobile_collapse=False
|
49 |
+
submit = gr.Button("Submit", variant="primary")
|
50 |
+
audio = gr.Audio(label="Output", interactive=False)
|
51 |
+
gr.Markdown(info)
|
52 |
+
|
53 |
+
# actions
|
54 |
+
submit.click(
|
55 |
+
tts,
|
56 |
+
[textbox, radio],
|
57 |
+
[audio],
|
58 |
+
)
|
59 |
+
|
60 |
+
|
61 |
+
blocks.launch()
|