udesa_test / app.py
Csuarezg's picture
levantando la app en hugging face text2speech with gradio
1f16f30
raw
history blame contribute delete
385 Bytes
import tempfile
import gradio as gr
import pytesseract
from gtts import gTTS
def text_to_speech(inputs):
text = inputs
speech = gTTS(text)
speech.save("prueba.mp3")
return "prueba.mp3", text
outputs = [gr.Audio(label="Output"), "text"]
demo = gr.Interface(fn=text_to_speech,
inputs="text",
outputs=outputs,
)
demo.launch()