stefantaubert commited on
Commit
0bdc801
·
1 Parent(s): cf910aa
Files changed (3) hide show
  1. Pipfile +13 -0
  2. Pipfile.lock +0 -0
  3. app.py +18 -2
Pipfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [[source]]
2
+ url = "https://pypi.org/simple"
3
+ verify_ssl = false
4
+ name = "pip_conf_index_global"
5
+
6
+ [packages]
7
+ gradio = "*"
8
+ en-tts = "*"
9
+
10
+ [dev-packages]
11
+
12
+ [requires]
13
+ python_version = "3.11"
Pipfile.lock ADDED
The diff for this file is too large to render. See raw diff
 
app.py CHANGED
@@ -1,7 +1,23 @@
1
  import gradio as gr
2
 
 
 
 
3
  def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
 
 
 
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
7
  iface.launch()
 
1
  import gradio as gr
2
 
3
+ from en_tts import Transcriber
4
+
5
+
6
  def greet(name):
7
+ return "Hello " + name + "!!"
8
+
9
+ def synt(text: str) -> str:
10
+ transcriber = Transcriber()
11
+ text_ipa = transcriber.transcribe_to_ipa(text)
12
+ return text_ipa
13
+
14
+
15
+ example_text = "When the sunlight strikes raindrops in the air, they act as a prism and form a rainbow."
16
 
17
+ iface = gr.Interface(
18
+ fn=synt,
19
+ inputs=[gr.Textbox(example_text)],
20
+ #outputs=[gr.Audio(type="numpy")],
21
+ outputs=[gr.Textbox()],
22
+ )
23
  iface.launch()