WhisperSW / app.py
eolang's picture
Update app.py
37dd873 verified
raw
history blame contribute delete
300 Bytes
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()