Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,12 @@ E2TTS_ema_model = load_model(
|
|
100 |
E2TTS_ema_model2 = load_model(
|
101 |
"Gregniuki", "F5-tts_English_German_Polish", "Polish", DiT, F5TTS_model_cfg, 500000
|
102 |
)
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
104 |
def chunk_text(text, max_chars=135):
|
105 |
"""
|
106 |
Splits the input text into chunks, each with a maximum number of characters.
|
@@ -138,6 +143,10 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
|
|
138 |
ema_model = E2TTS_ema_model
|
139 |
elif exp_name == "Deutsh":
|
140 |
ema_model = E2TTS_ema_model2
|
|
|
|
|
|
|
|
|
141 |
|
142 |
audio, sr = ref_audio
|
143 |
if audio.shape[0] > 1:
|
@@ -404,7 +413,7 @@ with gr.Blocks() as app_tts:
|
|
404 |
ref_audio_input = gr.Audio(label="Reference Audio", type="filepath")
|
405 |
gen_text_input = gr.Textbox(label="Text to Generate", lines=10)
|
406 |
model_choice = gr.Radio(
|
407 |
-
choices=["English","Polish","Deutsh"], label="Choose TTS Model", value="English"
|
408 |
)
|
409 |
generate_btn = gr.Button("Synthesize", variant="primary")
|
410 |
with gr.Accordion("Advanced Settings", open=False):
|
@@ -598,7 +607,7 @@ with gr.Blocks() as app_emotional:
|
|
598 |
|
599 |
# Model choice
|
600 |
model_choice_emotional = gr.Radio(
|
601 |
-
choices=["English","Polish","Deutsh"], label="Choose TTS Model", value="English"
|
602 |
)
|
603 |
|
604 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
100 |
E2TTS_ema_model2 = load_model(
|
101 |
"Gregniuki", "F5-tts_English_German_Polish", "Polish", DiT, F5TTS_model_cfg, 500000
|
102 |
)
|
103 |
+
E2TTS_ema_model3 = load_model(
|
104 |
+
"SWivid", "F5-TTS", "F5TTS_Base", DiT, F5TTS_model_cfg, 1200000
|
105 |
+
)
|
106 |
+
E2TTS_ema_model4 = load_model(
|
107 |
+
"SWivid", "E2-TTS", "E2TTS_Base", DiT, E2TTS_model_cfg, 1200000
|
108 |
+
)
|
109 |
def chunk_text(text, max_chars=135):
|
110 |
"""
|
111 |
Splits the input text into chunks, each with a maximum number of characters.
|
|
|
143 |
ema_model = E2TTS_ema_model
|
144 |
elif exp_name == "Deutsh":
|
145 |
ema_model = E2TTS_ema_model2
|
146 |
+
elif exp_name == "F5TTS":
|
147 |
+
ema_model = E2TTS_ema_model3
|
148 |
+
elif exp_name == "E2TTS":
|
149 |
+
ema_model = E2TTS_ema_model4
|
150 |
|
151 |
audio, sr = ref_audio
|
152 |
if audio.shape[0] > 1:
|
|
|
413 |
ref_audio_input = gr.Audio(label="Reference Audio", type="filepath")
|
414 |
gen_text_input = gr.Textbox(label="Text to Generate", lines=10)
|
415 |
model_choice = gr.Radio(
|
416 |
+
choices=["English","Polish","Deutsh","F5TTS","E2TTS"], label="Choose TTS Model", value="English"
|
417 |
)
|
418 |
generate_btn = gr.Button("Synthesize", variant="primary")
|
419 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
607 |
|
608 |
# Model choice
|
609 |
model_choice_emotional = gr.Radio(
|
610 |
+
choices=["English","Polish","Deutsh","F5TTS","E2TTS"], label="Choose TTS Model", value="English"
|
611 |
)
|
612 |
|
613 |
with gr.Accordion("Advanced Settings", open=False):
|