whisper / app.py
pierrelf's picture
Update model in app.py
e236aca
raw
history blame
558 Bytes
from transformers import pipeline
import gradio as gr
# pipe = pipeline(model="openai/whisper-small")
pipe = pipeline(model="pierrelf/whisper-small-sv") # change to "your-username/the-name-you-picked"
def transcribe(audio):
text = pipe(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(sources=['upload', 'microphone'], type="filepath"),
outputs="text",
title="Whisper Swedish",
description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
)
iface.launch()