Casper / app.py
MaximilianChen's picture
Update app.py
9d3afd7
raw
history blame
547 Bytes
from transformers import pipeline
import gradio as gr
pipe = pipeline(model="MaximilianChen/Casper")
def transcribe(audio):
text = pipe(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=[
gr.Audio(label="Upload Speech", source="upload", type="numpy"),
gr.Audio(label="Record Speech", source="microphone", type="numpy"),
],
outputs="text",
title="Casper",
description="Realtime demo for Catalan speech recognition using a fine-tuned Whisper small model.",
)
iface.launch()