Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import gradio as gr
|
|
| 8 |
CONFIG_URL = 'https://huggingface.co/medmac01/darija_xtt_2.0/resolve/main/config.json'
|
| 9 |
VOCAB_URL = 'https://huggingface.co/medmac01/darija_xtt_2.0/resolve/main/vocab.json'
|
| 10 |
MODEL_URL = 'https://huggingface.co/medmac01/darija_xtt_2.0/resolve/main/model_2.1.pth'
|
| 11 |
-
SPEAKER_AUDIO_URL = 'https://huggingface.co/medmac01/
|
| 12 |
|
| 13 |
base_path = Path(__file__).parent
|
| 14 |
|
|
@@ -64,14 +64,14 @@ markdown_description = """## Instructions:
|
|
| 64 |
3. Click on the "Generate" button.
|
| 65 |
|
| 66 |
"""
|
| 67 |
-
with gr.Blocks(title="
|
| 68 |
gr.HTML("<center><h1>Moroccan-Darija-TTS </h1></center>")
|
| 69 |
gr.Markdown(markdown_description)
|
| 70 |
with gr.Row():
|
| 71 |
with gr.Column():
|
| 72 |
-
text = gr.Textbox(label="Text to synthesize", value="
|
| 73 |
speaker_refrence = gr.Audio(label="Speaker reference", value=speaker_audio_path, type="filepath")
|
| 74 |
-
temperature = gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, value=0.
|
| 75 |
generate_btn = gr.Button(value="Generate", variant="primary")
|
| 76 |
output = gr.Audio(label="Synthesized audio")
|
| 77 |
|
|
|
|
| 8 |
CONFIG_URL = 'https://huggingface.co/medmac01/darija_xtt_2.0/resolve/main/config.json'
|
| 9 |
VOCAB_URL = 'https://huggingface.co/medmac01/darija_xtt_2.0/resolve/main/vocab.json'
|
| 10 |
MODEL_URL = 'https://huggingface.co/medmac01/darija_xtt_2.0/resolve/main/model_2.1.pth'
|
| 11 |
+
SPEAKER_AUDIO_URL = 'https://huggingface.co/medmac01/darija_xtt_2.0/resolve/main/speaker_ref.wav'
|
| 12 |
|
| 13 |
base_path = Path(__file__).parent
|
| 14 |
|
|
|
|
| 64 |
3. Click on the "Generate" button.
|
| 65 |
|
| 66 |
"""
|
| 67 |
+
with gr.Blocks(title="MATTS") as app:
|
| 68 |
gr.HTML("<center><h1>Moroccan-Darija-TTS </h1></center>")
|
| 69 |
gr.Markdown(markdown_description)
|
| 70 |
with gr.Row():
|
| 71 |
with gr.Column():
|
| 72 |
+
text = gr.Textbox(label="Text to synthesize", value="ู
ููู ููุช ุตุบูุฑุ ููุช ููู
ุดู ุนูุฏ ุฌุฏูุชู ูุงูุฏููุงุฑุ ููุงูุช ูุชุนุงูุฏ ููุง ูุตุต ุนูู ุงููุงุณ ุงููุฏุงู
ูุนูู ูููุงุด ูุงููุง ููุชุนุงูููุง ูุงูุญูุงุฉ ุงูููู
ูุฉ.", rtl=True, text_align="right", lines=3)
|
| 73 |
speaker_refrence = gr.Audio(label="Speaker reference", value=speaker_audio_path, type="filepath")
|
| 74 |
+
temperature = gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, value=0.65, step=0.05)
|
| 75 |
generate_btn = gr.Button(value="Generate", variant="primary")
|
| 76 |
output = gr.Audio(label="Synthesized audio")
|
| 77 |
|