Spaces:
Runtime error
Runtime error
File size: 455 Bytes
3d8ac06 48142a3 5fa23e5 f75e9df 2d730a0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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()
|