File size: 857 Bytes
84f039a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511d2ce
 
84f039a
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
with gr.Tab("Principal"):
    video_input = gr.Video(label="Subir video")
    texto_tts = gr.Textbox(
        label="Texto para TTS",
        lines=3,
        placeholder="Escribe aquí tu texto..."
    )
    voz_seleccionada = gr.Dropdown(
        label="Voz",
        choices=["es-ES-AlvaroNeural", "es-MX-BeatrizNeural"],
        value="es-ES-AlvaroNeural"
    )
    procesar_btn = gr.Button("Generar Video")
    video_output = gr.Video(label="Video Procesado")

with gr.Accordion("Ejemplos de Uso", open=False):
    gr.Examples(
        examples=[[EJEMPLO_VIDEO, "¡Hola! Esto es una prueba. Suscríbete al canal."]],
        inputs=[video_input, texto_tts],
        label="Ejemplos"
    )

procesar_btn.click(
    procesar_video,
    inputs=[video_input, texto_tts, voz_seleccionada],
    outputs=video_output
)
if name == "main":
demo.queue().launch()