Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from gtts import gTTS | |
| def text_to_speech(text): | |
| tts = gTTS(text) | |
| tts.save("output.mp3") | |
| return "output.mp3" | |
| iface = gr.Interface(fn=text_to_speech, inputs="text", outputs="file") | |
| iface.launch() | |