File size: 557 Bytes
90b4970
 
 
 
0dc0508
 
d4d8b59
 
 
90b4970
a1af285
 
f863a5a
90b4970
 
 
a1af285
90b4970
 
 
 
660ac16
90b4970
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

# gr.load("models/openai/whisper-large-v3-turbo").launch()

import gradio as gr


model = gr.load("models/openai/whisper-large-v3-turbo")

# Define a function to process the output and extract only the transcription text
def process_transcription(audio_input):
    result = model(audio_input)
    print(result)
    # Extract the transcription text directly
    transcription = result["text"]
    return transcription

# Launch the interface
gr.Interface(
    fn=process_transcription,
    inputs="audio",
    outputs="text"
).launch()