kaishin08 / app.py
KaiShin1885's picture
Update app.py
57e4e8f verified
raw
history blame contribute delete
350 Bytes
import os
from gtts import gTTS
import gradio as gr
def texttospeech(text, language='ko'):
tts = gTTS(text=text, lang=language)
tts.save("output.mp3")
return "output.mp3"
iface = gr.Interface(
fn=texttospeech,
inputs="text",
outputs="audio",
title="GTTS ",
description=""
)
if __name == "__main":
iface.launch()