SaladSlayer00's picture
the app
0a6a4fd
raw
history blame
642 Bytes
from transformers import pipeline
import gradio as gr
pipe = pipeline(model="SaladSlayer00/another_local")
def transcribe(rec=None, file=None):
if rec is not None:
audio = rec
elif file is not None:
audio = file
else:
return "Provide a recording or a file."
text = pipe(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=[
gr.Audio(type="filepath")
],
outputs="text",
title="Whisper Small Italian",
description="Realtime demo for Italian speech recognition using a fine-tuned Whisper model.",
)
iface.launch()