import gradio as gr
markdown_description = """## Instructions:
1. Enter the text you want to synthesize.
2. Upload a 4-5 seconds audio file of the speaker you want to clone.
3. Click on the "Generate" button.
"""
with gr.Blocks(title="EGTTS") as app:
gr.HTML("
Moroccan-Darija-TTS
")
gr.Markdown(markdown_description)
with gr.Row():
with gr.Column():
text = gr.Textbox(label="Text to synthesize", value="السلام عليكم ورحمة الله", text_align="right", lines=3)
speaker_refrence = gr.Audio(label="Speaker reference", type="filepath")
temperature = gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, value=0.75, step=0.05)
generate_btn = gr.Button(value="Generate", variant="primary")
output = gr.Audio(label="Synthesized audio")
generate_btn.click(lambda x, y, z: None, inputs=[text, speaker_refrence, temperature], outputs=output)
app.launch()