hivecorp commited on
Commit
63e7c55
·
verified ·
1 Parent(s): 1ac291f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -13
app.py CHANGED
@@ -2,7 +2,6 @@ import tempfile
2
 
3
  import edge_tts
4
  import gradio as gr
5
- from gradio_client import Client
6
  import pyarabic.araby as araby
7
 
8
  language_dict = {
@@ -442,16 +441,9 @@ language_dict = {
442
  }
443
  }
444
 
445
- client = Client("MohamedRashad/arabic-auto-tashkeel")
446
 
447
  async def text_to_speech_edge(text, language_code, speaker, tashkeel_checkbox=False):
448
-
449
- # Remove diacritics from Arabic text then add tashkeel
450
- if language_code == "Arabic" and tashkeel_checkbox:
451
- text = client.predict(
452
- input_text=araby.strip_diacritics(text),
453
- api_name="/infer_shakkala"
454
- )
455
 
456
  # Get the voice for the selected language and speaker
457
  voice = language_dict[language_code][speaker]
@@ -472,10 +464,13 @@ def get_speakers(language):
472
  default_language = None
473
  default_speaker = None
474
  with gr.Blocks(title="Multilingual TTS") as demo:
475
- gr.HTML("<center><h1>Multilingual TTS (Edge TTS)</h1></center>")
476
- gr.HTML(f"<h2 style='color:Tomato;'> {len(language_dict)} languages supported</h3>")
477
- gr.HTML(f"<p> {', '.join(language_dict.keys())} </h3>")
478
- gr.Markdown("**Note:** A special feature is added for Arabic language only.")
 
 
 
479
  with gr.Row():
480
  with gr.Column():
481
  input_text = gr.Textbox(lines=5, label="Input Text", placeholder="Enter text to convert to speech")
 
2
 
3
  import edge_tts
4
  import gradio as gr
 
5
  import pyarabic.araby as araby
6
 
7
  language_dict = {
 
441
  }
442
  }
443
 
 
444
 
445
  async def text_to_speech_edge(text, language_code, speaker, tashkeel_checkbox=False):
446
+
 
 
 
 
 
 
447
 
448
  # Get the voice for the selected language and speaker
449
  voice = language_dict[language_code][speaker]
 
464
  default_language = None
465
  default_speaker = None
466
  with gr.Blocks(title="Multilingual TTS") as demo:
467
+ gr.HTML(" ")
468
+ gr.HTML(f"<h2 style='color:Tomato;'> 🎥 **Exciting News: 60+ Minutes File Creation is also Free !!** 🎥 </h3>")
469
+
470
+ gr.Markdown(" Features:
471
+ • Convert text to speech with 60+ audio files.
472
+ • Choose from 40+ languages.
473
+ • Its Free 😍")
474
  with gr.Row():
475
  with gr.Column():
476
  input_text = gr.Textbox(lines=5, label="Input Text", placeholder="Enter text to convert to speech")