Spaces:
Runtime error
Runtime error
File size: 718 Bytes
3e533d7 ed6e5d8 3e533d7 0d5492e f9f41df cb85517 bdec318 cb85517 bdec318 cb85517 3130060 cb85517 f9f41df bdec318 ed6e5d8 bdec318 279175c cb85517 bdec318 |
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 |
from huggingface_hub import login
from diarization import start_diarization
from transcribe import start_transcribe
import ffmpeg
import gradio as gr
def prepare_input(input_file, progress=gr.Progress()):
output_file = "input.wav"
progress(0.2, desc="Preparing video")
ffmpeg.input(input_file).audio.output(
output_file, format="wav").run()
progress(0.4, desc="Acquiring diarization")
start_diarization(output_file)
progress(0.6, desc="Transcribing audio")
return start_transcribe(progress)
video_interface = gr.Interface(
fn=prepare_input,
inputs=gr.Video(type="file"),
outputs="files",
title="Test 2"
)
if __name__ == "__main__":
video_interface.launch()
|