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()