Spaces:
Runtime error
Runtime error
File size: 356 Bytes
3cc08f2 3448a7c 3cc08f2 beb036f 39e6918 170edeb c132e74 3448a7c c7a64c1 3448a7c cf7f5dc c7a64c1 3cc08f2 3448a7c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
from transformers import pipeline
import numpy as np
transcriber = pipeline("automatic-speech-recognition", model="filipzawadka/whisper-small-pl-2")
def transcribe(audio):
return transcriber(audio)["text"]
demo = gr.Interface(
fn=transcribe,
inputs=gr.Audio(sources=["microphone"]),
outputs="text",
)
demo.launch()
|