Spaces:
Sleeping
Sleeping
File size: 424 Bytes
f1266ab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-small")
def process_input(audio):
transcription = pipe(audio)["text"]
return transcription
interface = gr.Interface(
fn=process_input,
inputs=gr.Audio(sources=["microphone", "upload"], type="filepath"),
outputs="text",
title="testing for data aug",
)
interface.launch()
|