karimouda commited on
Commit
70968b9
·
verified ·
1 Parent(s): cb38314

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -7,8 +7,6 @@ from silma_tts.api import SilmaTTS
7
  print("Loading SILMA TTS model...", flush=True)
8
  silma_tts = SilmaTTS()
9
 
10
- current_dir = os.path.dirname(os.path.abspath(__file__))
11
- ref_audio_dir = os.path.join(current_dir, "infer", "ref_audio_samples")
12
 
13
  def do_inference(ref_audio, ref_text, gen_text):
14
  if not ref_audio:
@@ -36,7 +34,7 @@ with gr.Blocks() as demo:
36
  ref_audio_input = gr.Audio(
37
  label="Reference Audio",
38
  type="filepath",
39
- value=ref_audio_dir+"/ar.ref.24k.wav"
40
  )
41
  ref_text_input = gr.Textbox(
42
  label="Reference Text",
@@ -73,7 +71,7 @@ I am the new SILMA model for converting text to speech, I can speak Arabic with
73
  def main():
74
  print("Starting app...")
75
 
76
- demo.queue().launch(server_name="0.0.0.0", server_port=7860, allowed_paths=[ref_audio_dir])
77
 
78
  if __name__ == "__main__":
79
  main()
 
7
  print("Loading SILMA TTS model...", flush=True)
8
  silma_tts = SilmaTTS()
9
 
 
 
10
 
11
  def do_inference(ref_audio, ref_text, gen_text):
12
  if not ref_audio:
 
34
  ref_audio_input = gr.Audio(
35
  label="Reference Audio",
36
  type="filepath",
37
+ value="ar.ref.24k.wav"
38
  )
39
  ref_text_input = gr.Textbox(
40
  label="Reference Text",
 
71
  def main():
72
  print("Starting app...")
73
 
74
+ demo.queue().launch(ssr_mode=False)
75
 
76
  if __name__ == "__main__":
77
  main()