wedyanessam's picture
Update app.py
c79816c verified
raw
history blame
617 Bytes
import gradio as gr
from TTS_X.tts import generate_voice
# نحدد المسار الثابت للصوت الجاهز
DEFAULT_SPEAKER_WAV = "TTS_xtts/IMG_6935.wav"
def inference(text):
output_path = generate_voice(text, DEFAULT_SPEAKER_WAV, language="ar")
return "تم التحويل بنجاح", output_path
gr.Interface(
fn=inference,
inputs=gr.Textbox(label="النص العربي"),
outputs=[
gr.Textbox(label="النتيجة"),
gr.Audio(label="الصوت الناتج")
],
title="🔊 تحويل نص إلى صوت بصوت محدد مسبقاً (XTTS)"
).launch()