File size: 563 Bytes
1ecbd6e
4e86b8c
59d8ead
cd06e6a
4e86b8c
 
 
0d5a69e
cd06e6a
f9b726c
 
 
 
 
 
 
 
 
 
 
 
 
cd06e6a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()