Spaces:
Runtime error
Runtime error
Download app.py from SujanMidatani/TextToSpeech: direct link, hf CLI and curl.
- Browser
- Download file 229 Bytes
-
https://huggingface.co/spaces/SujanMidatani/TextToSpeech/resolve/main/app.py
- Command line
-
hf download hf://spaces/SujanMidatani/TextToSpeech/app.py
-
curl -L -o app.py https://huggingface.co/spaces/SujanMidatani/TextToSpeech/resolve/main/app.py
229 Bytes
| 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() | |