Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -255,36 +255,44 @@ with gr.Blocks(css=css) as demo:
|
|
255 |
with gr.Column(elem_id="col-container"):
|
256 |
gr.Markdown("# Hibiki ")
|
257 |
gr.Markdown("This is a simple demo for Kyutai's Hibiki translation models • Currently supports French to English only.")
|
258 |
-
|
259 |
-
audio_input = gr.Audio(label="Audio IN", type="filepath")
|
260 |
-
submit_btn = gr.Button("Generate translations")
|
261 |
-
output_result = gr.Audio(label="Translated result")
|
262 |
-
|
263 |
-
with gr.Row():
|
264 |
-
dropdown_wav_selector = gr.Dropdown(
|
265 |
-
label="Pick a generated audio to load",
|
266 |
-
value = None,
|
267 |
-
visible=False,
|
268 |
-
scale=2
|
269 |
-
)
|
270 |
-
choose_this_btn = gr.Button("Apply this one as translated audio overlay", scale=1, visible=False)
|
271 |
with gr.Row():
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
audio_input.upload(
|
290 |
fn = clean_previous_video_input,
|
|
|
255 |
with gr.Column(elem_id="col-container"):
|
256 |
gr.Markdown("# Hibiki ")
|
257 |
gr.Markdown("This is a simple demo for Kyutai's Hibiki translation models • Currently supports French to English only.")
|
258 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
with gr.Row():
|
260 |
+
with gr.Column():
|
261 |
+
video_input = gr.Video(label="Video IN (Optional)")
|
262 |
+
audio_input = gr.Audio(label="Audio IN", type="filepath")
|
263 |
+
submit_btn = gr.Button("Generate translations")
|
264 |
+
|
265 |
+
gr.Examples(
|
266 |
+
examples = [
|
267 |
+
"./examples/sample_fr_hibiki_intro.mp3",
|
268 |
+
"./examples/sample_fr_hibiki_crepes.mp3",
|
269 |
+
"./examples/sample_fr_hibiki_monologue_otis.mp3"
|
270 |
+
],
|
271 |
+
inputs = [audio_input]
|
272 |
+
)
|
273 |
+
|
274 |
+
with gr.Column():
|
275 |
+
output_result = gr.Audio(label="Translated result")
|
276 |
+
|
277 |
+
with gr.Row():
|
278 |
+
dropdown_wav_selector = gr.Dropdown(
|
279 |
+
label="Pick a generated translated audio to load",
|
280 |
+
value = None,
|
281 |
+
visible=False,
|
282 |
+
scale=2
|
283 |
+
)
|
284 |
+
choose_this_btn = gr.Button("Apply and check this one as translated audio overlay", scale=1, visible=False)
|
285 |
+
|
286 |
+
with gr.Row():
|
287 |
+
volume_reduction = gr.Slider(label="Original audio Volume reduction", minimum=0, maximum=60, step=1, value=30, visible=False)
|
288 |
+
cut_start = gr.Slider(label="Reduce translator delay (seconds)", minimum=0.0, maximum=4.0, step=0.1, value=2.0, visible=False)
|
289 |
+
|
290 |
+
combined_output = gr.Audio(label="Combinated Audio", type="filepath", visible=False, show_download_button=True)
|
291 |
+
apply_to_video_btn = gr.Button("Apply this combination to your video", visible=False)
|
292 |
+
|
293 |
+
final_video_out = gr.Video(label="Video + Translated Audio", visible=False)
|
294 |
+
with gr.Accordion("Downloadable audio Output list", open=False, visible=False) as result_accordion:
|
295 |
+
wav_list = gr.Files(label="Output Audio List", visible=False)
|
296 |
|
297 |
audio_input.upload(
|
298 |
fn = clean_previous_video_input,
|