File size: 494 Bytes
cf910aa
 
0bdc801
 
 
cf910aa
0bdc801
 
 
 
 
 
 
 
 
cf910aa
0bdc801
 
 
 
 
 
cf910aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr

from en_tts import  Transcriber


def greet(name):
  return "Hello " + name + "!!"

def synt(text: str) -> str:
  transcriber = Transcriber()
  text_ipa = transcriber.transcribe_to_ipa(text)
  return text_ipa

    
example_text = "When the sunlight strikes raindrops in the air, they act as a prism and form a rainbow."

iface = gr.Interface(
  fn=synt, 
  inputs=[gr.Textbox(example_text)], 
  #outputs=[gr.Audio(type="numpy")],
  outputs=[gr.Textbox()],
)
iface.launch()