Spaces:
Build error
Build error
File size: 325 Bytes
49d138e f0d15d3 49d138e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from transformers import pipeline
p = pipeline("automatic-speech-recognition", model = 'openai/whisper-small')
import gradio as gr
def transcribe(audio):
text = p(audio)["text"]
return text
gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath"),
outputs="text").launch()
|