Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
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=
|
| 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(
|
| 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()
|