Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
pipe = pipeline("automatic-speech-recognition", model="FredBonux/whisper-small-it") | |
def transcribe(audio): | |
text = pipe(audio)["text"] | |
return text | |
# demo = gr.Interface.from_pipeline(pipe) | |
# demo.launch() | |
iface = gr.Interface( | |
fn=transcribe, | |
inputs=gr.Audio(sources=["microphone"], type="filepath"), | |
outputs="text", | |
title="Whisper Small Italian", | |
description="Realtime demo for Italian speech recognition using a fine-tuned Whisper small model.", | |
) | |
iface.launch() |