File size: 519 Bytes
f4b1aae
fadabd2
fa3081f
f4b1aae
 
a489845
fadabd2
f4b1aae
 
 
 
f80512e
f4b1aae
 
a489845
f4b1aae
b7ed6ad
f4b1aae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Imports
import gradio as gr
import whisper

#Loading the model from openai Whisper
model = whisper.load_model("base")

# Defining the transcription function
def transcribing(audio):
    text = model.transcribe(audio)["text"]
    return text

# Defining the audio filepaths
audio = gr.inputs.Audio(type="filepath")

# Loading the gradio framwork
iface = gr.Interface(fn=transcribing,inputs=audio, outputs="text", title="Transcribe.AI", description="Transcribe audiofiles with artificial intelligence.")
iface.launch()