File size: 334 Bytes
3beddc0
18488b9
3beddc0
18488b9
 
 
 
3beddc0
8835a28
66e8d64
3beddc0
1
2
3
4
5
6
7
8
9
10
11
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")
iface = gr.Interface(fn=convert_to_text, inputs=audio_input, outputs="text")
iface.launch()