Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
asr_pipeline = pipeline("automatic-speech-recognition", model="ashik1104/Bengali_wav2vec2_BERT_P") | |
def transcribe(audio): | |
result = asr_pipeline(audio) | |
return result["text"] | |
gradio_app = gr.Interface( | |
fn=transcribe, | |
inputs=gr.Audio(type="filepath", label="Upload or record audio"), | |
outputs=gr.Textbox(label="Transcription"), | |
title="🎤 Automatic Speech Recognition (ASR)", | |
description="Upload a file or record your voice to get the transcription.", | |
) | |
if __name__ == "__main__": | |
gradio_app.launch() | |