Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -97,6 +97,9 @@ F5TTS_ema_model = load_model(
|
|
97 |
E2TTS_ema_model = load_model(
|
98 |
"Gregniuki", "F5-tts_English_German_Polish", "Polish2", DiT, F5TTS_model_cfg, 1200000
|
99 |
)
|
|
|
|
|
|
|
100 |
|
101 |
def chunk_text(text, max_chars=135):
|
102 |
"""
|
@@ -133,6 +136,8 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
|
|
133 |
ema_model = F5TTS_ema_model
|
134 |
elif exp_name == "Polish":
|
135 |
ema_model = E2TTS_ema_model
|
|
|
|
|
136 |
|
137 |
audio, sr = ref_audio
|
138 |
if audio.shape[0] > 1:
|
@@ -399,7 +404,7 @@ with gr.Blocks() as app_tts:
|
|
399 |
ref_audio_input = gr.Audio(label="Reference Audio", type="filepath")
|
400 |
gen_text_input = gr.Textbox(label="Text to Generate", lines=10)
|
401 |
model_choice = gr.Radio(
|
402 |
-
choices=["English","Polish"], label="Choose TTS Model", value="English"
|
403 |
)
|
404 |
generate_btn = gr.Button("Synthesize", variant="primary")
|
405 |
with gr.Accordion("Advanced Settings", open=False):
|
@@ -593,7 +598,7 @@ with gr.Blocks() as app_emotional:
|
|
593 |
|
594 |
# Model choice
|
595 |
model_choice_emotional = gr.Radio(
|
596 |
-
choices=["English","Polish"], label="Choose TTS Model", value="English"
|
597 |
)
|
598 |
|
599 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
97 |
E2TTS_ema_model = load_model(
|
98 |
"Gregniuki", "F5-tts_English_German_Polish", "Polish2", DiT, F5TTS_model_cfg, 1200000
|
99 |
)
|
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 |
"""
|
|
|
136 |
ema_model = F5TTS_ema_model
|
137 |
elif exp_name == "Polish":
|
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 |
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 |
|
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):
|