YuChing's picture
Update app.py
2d730a0
raw
history blame
No virus
455 Bytes
from transformers import pipeline
import gradio as gr
pipe=pipeline(model="YuChing/whisper-streaming2")
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()