Spaces:
Runtime error
Runtime error
File size: 513 Bytes
d9d25fe c79816c d9d25fe e682a2e 9dd7b34 d9d25fe e682a2e 9dd7b34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from TTS_X.tts import generate_voice
def tts_interface(text):
audio_path = generate_voice(text)
return audio_path
with gr.Blocks() as demo:
gr.Markdown("## 🎤 Text to Speech using OpenAI TTS (Nova Voice)")
with gr.Row():
txt = gr.Textbox(label="اكتب نصك هنا")
btn = gr.Button("حوّل إلى صوت")
audio_output = gr.Audio(label="الصوت الناتج")
btn.click(fn=tts_interface, inputs=txt, outputs=audio_output)
demo.launch()
|