jbatista79's picture
Create app.py
47c7c90 verified
raw
history blame
648 Bytes
from transformers import pipeline
import gradio as gr
pipe = pipeline(model="jbatista79/whisper-jrb-small-es") # 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(source="microphone", type="filepath"),
inputs=gr.Audio(sources=["microphone"], type="filepath"),
outputs="text",
title="Whisper Small Spanish - JRB",
description="Realtime proof-of-concept demo for Spanish speech recognition using a fine-tuned Whisper small model. Created by Josué R. Batista - 2024-01-14",
)
iface.launch(share=True)