File size: 300 Bytes
5c34f50
37dd873
5c34f50
37dd873
5c34f50
 
37dd873
 
5c34f50
 
1
2
3
4
5
6
7
8
9
10
import gradio as gr
from transformers import pipeline

pipe = pipeline("automatic-speech-recognition", model="eolang/whisper-small-sw")

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

gr.Interface(transcribe, gr.Audio(type="filepath"), gr.Textbox()).launch()