File size: 493 Bytes
3e533d7
 
 
0d5492e
3e533d7
0d5492e
3e533d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from huggingface_hub import login
from diarization import startDiarization
import ffmpeg
import gradio as gr
import os

# Get video & convert it
inputs_interface = gr.inputs.Video(label="Insert video")
in_file = ffmpeg.input(inputs_interface).audio
out_file = ffmpeg.output(in_file, "input.wav", f="wav").run()


def prepareInput():
    return startDiarization(out_file)


gr.Interface(
    prepareInput,
    inputs=inputs_interface,
    outputs="text",
    title="Get Diarization"
).launch()