whisper / app.py
antfraia's picture
Update app.py
f9b726c
raw
history blame
563 Bytes
import gradio as gr
import whisper
def convert_to_text(audio_path : str) -> str:
model = whisper.load_model("base")
result = model.transcribe(audio_path)
return result["text"]
audio_input = gr.components.Audio(type="filepath")
# Interface for Gradio
iface = gr.Interface(
fn=convert_to_text,
inputs=audio_input,
outputs="text"
title="Free audio transcription",
description="Upload an audio here and get a bullet-point summary of its content.",
theme="Monochrome",
live=True,
capture_session=True,
)
iface.launch()