File size: 527 Bytes
feec21b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from transformers import pipeline
import gradio as gr


pipe = pipeline(model="LadislavVasina1/whisper-base-cs-cv11-timestetch02-gain01-pitch02-gaussian02-lowpass01")

def transcribe(audio):
    text = pipe(audio)["text"]
    return text

gradio_app = gr.Interface(
    fn=transcribe,
    inputs=gr.Audio(type="filepath"),
    outputs="text",
    title="Whisper Base CS",
    #description="Realtime demo for Czech speech recognition using a fine-tuned Whisper base model.",
)

if __name__ == "__main__":
    gradio_app.launch()