whisper / app.py
puyao's picture
Update app.py
91f5cfd
raw
history blame contribute delete
455 Bytes
from transformers import pipeline
import gradio as gr
pipe = pipeline(model="Puyao/whisper-small-hi")
def transcribe(audio):
text = pipe(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(sources=["microphone"],type="filepath"),
outputs="text",
title="Whisper Small Chinese",
description="Realtime demo for Chinese speech recognition using a fine-tuned Whisper small model.",
)
iface.launch()