Spaces:
Running
Running
app.py
Browse files- app.py +20 -0
- flagged/audio/3078fa84e061327e99b6/audio.wav +0 -0
- flagged/log.csv +2 -0
app.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
pipe = pipeline(model="asif00/whisper-bangla")
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def transcribe(audio):
|
| 8 |
+
text = pipe(audio)["text"]
|
| 9 |
+
return text
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
iface = gr.Interface(
|
| 13 |
+
fn=transcribe,
|
| 14 |
+
inputs=gr.Audio(sources="microphone", type="filepath"),
|
| 15 |
+
outputs="text",
|
| 16 |
+
title="Whisper Bangla",
|
| 17 |
+
description="Realtime demo for Bengali speech recognition using a fine-tuned Whisper small model.",
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
iface.launch()
|
flagged/audio/3078fa84e061327e99b6/audio.wav
ADDED
|
Binary file (307 kB). View file
|
|
|
flagged/log.csv
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
audio,output,flag,username,timestamp
|
| 2 |
+
flagged\audio\3078fa84e061327e99b6\audio.wav,আফনি কেমন আসেন।,,,2024-06-04 01:02:36.210092
|