SujanMidatani commited on
Commit
4e14dfa
·
1 Parent(s): 1924c59

update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gtts import gTTS
3
+
4
+ def text_to_speech(text):
5
+ tts = gTTS(text)
6
+ tts.save("output.mp3")
7
+
8
+ return "output.mp3"
9
+
10
+ iface = gr.Interface(fn=text_to_speech, inputs="text", outputs="file")
11
+ iface.launch()