Update app.py
Browse files
app.py
CHANGED
@@ -66,6 +66,7 @@ F5TTS_ema_model = load_f5tts()
|
|
66 |
def infer(
|
67 |
ref_audio_orig, ref_text, gen_text, remove_silence, cross_fade_duration=0.15, speed=1, nfe=32, show_info=gr.Info
|
68 |
):
|
|
|
69 |
ref_audio, ref_text = preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=show_info)
|
70 |
ema_model = F5TTS_ema_model
|
71 |
final_wave, final_sample_rate, combined_spectrogram = infer_process(
|
@@ -141,14 +142,7 @@ with gr.Blocks(css=custom_css) as app:
|
|
141 |
step=0.1,
|
142 |
info="Ajuste a velocidade do áudio.",
|
143 |
)
|
144 |
-
|
145 |
-
label="NFE Step",
|
146 |
-
minimum=16,
|
147 |
-
maximum=64,
|
148 |
-
value=32,
|
149 |
-
step=1,
|
150 |
-
info="Ajuste a velocidade do áudio.",
|
151 |
-
)
|
152 |
cross_fade_duration_slider = gr.Slider(
|
153 |
label="Duração do Cross-fade (s)",
|
154 |
minimum=0.0,
|
@@ -165,6 +159,14 @@ with gr.Blocks(css=custom_css) as app:
|
|
165 |
step=1,
|
166 |
info="Defina quantas sentenças serão processadas em cada chunk.",
|
167 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
|
170 |
|
@@ -234,6 +236,7 @@ with gr.Blocks(css=custom_css) as app:
|
|
234 |
remove_silence,
|
235 |
cross_fade_duration_slider,
|
236 |
speed_slider,
|
|
|
237 |
chunk_size_slider,
|
238 |
],
|
239 |
outputs=[
|
|
|
66 |
def infer(
|
67 |
ref_audio_orig, ref_text, gen_text, remove_silence, cross_fade_duration=0.15, speed=1, nfe=32, show_info=gr.Info
|
68 |
):
|
69 |
+
print(nfe)
|
70 |
ref_audio, ref_text = preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=show_info)
|
71 |
ema_model = F5TTS_ema_model
|
72 |
final_wave, final_sample_rate, combined_spectrogram = infer_process(
|
|
|
142 |
step=0.1,
|
143 |
info="Ajuste a velocidade do áudio.",
|
144 |
)
|
145 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
cross_fade_duration_slider = gr.Slider(
|
147 |
label="Duração do Cross-fade (s)",
|
148 |
minimum=0.0,
|
|
|
159 |
step=1,
|
160 |
info="Defina quantas sentenças serão processadas em cada chunk.",
|
161 |
)
|
162 |
+
nfe_slider = gr.Slider(
|
163 |
+
label="NFE",
|
164 |
+
minimum=16,
|
165 |
+
maximum=64,
|
166 |
+
value=32,
|
167 |
+
step=1,
|
168 |
+
info="Ajuste NFE Step.",
|
169 |
+
)
|
170 |
|
171 |
|
172 |
|
|
|
236 |
remove_silence,
|
237 |
cross_fade_duration_slider,
|
238 |
speed_slider,
|
239 |
+
nfe_slider,
|
240 |
chunk_size_slider,
|
241 |
],
|
242 |
outputs=[
|