Spaces:
Sleeping
Sleeping
File size: 385 Bytes
7a8ea90 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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()
|