AI_Application / app.py
Antoniskaraolis's picture
Update app.py
5046c96
raw
history blame
339 Bytes
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="audio",
outputs="text"
)
iface.launch()