Spaces:
Sleeping
Sleeping
File size: 385 Bytes
d7aa11b 05e9e3a f3c7107 05e9e3a f3c7107 d7aa11b 05e9e3a d7aa11b f3c7107 d7aa11b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from transformers import pipeline
asr_model = pipeline("automatic-speech-recognition", model="openai/whisper-small")
def transcribe(audio_file):
transcription = asr_model(audio_file)
return transcription["text"]
iface = gr.Interface(
fn=transcribe,
inputs=gr.inputs.Audio(source="microphone", type="filepath"),
outputs="text"
)
iface.launch() |