Spaces:
Sleeping

32234324 / app.py
mcgi's picture
Update app.py
ce24050 verified
Raw History Blame Contribute Delete
393 Bytes
import gradio as gr
from TTS.api import TTS
# مدل فارسی
tts = TTS("Kamtera/persian-tts-female-vits", gpu=False)
def tts_fn(text):
output_file = "output.wav"
tts.tts_to_file(text=text, file_path=output_file)
return output_file
iface = gr.Interface(
fn=tts_fn,
inputs="text",
outputs=gr.Audio(type="filepath")
)
# این خط ضروری است
iface.launch()