Spaces:
Runtime error
Runtime error
File size: 426 Bytes
622f99a 8001ceb 622f99a 64aefd6 622f99a 554a6b2 ad4a7ba 622f99a 8001ceb 9a2d609 622f99a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from gtts import gTTS
import gradio as gr
import os
def text_to_audio(text):
# Generate audio from text using gTTS
tts = gTTS(text=text, lang='en', tld="co.in",slow=False)
tts.save("test.wav")
return 'test.wav'
iface = gr.Interface(fn = text_to_audio,
inputs = 'text',
outputs = 'audio',
verbose = True,
)
iface.launch() |