import gradio as gr | |
import whisper | |
def transcribe_video(file): | |
model = whisper.load_model("tiny") | |
result = model.transcribe(file.name) | |
return result["text"] | |
inputs = gr.inputs.Video() | |
outputs = gr.outputs.Textbox() | |
gr.Interface(fn=transcribe_video, inputs=inputs, outputs=outputs, title="Video Transcription", description="Transcribe speech from a video.").launch() |