Downloads · 30 days
0
Fardeen9065/whisper-bangla-asr
whisper-bangla-asr is a automatic speech recognition model from Fardeen9065. Use it when you need speech turned into text. The card lists the license as mit.
An inference and evaluation pipeline for Bangla and Banglish (code-mixed Bangla-English) automatic speech recognition, built on top of bengaliAI/tugstugibengaliai-asrwhisper-medium.
Downloads · 30 days
0
Access
Public
Updated Sep 3, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py14.5 KB · 64%
From the Hugging Face model README
An inference and evaluation pipeline for Bangla and Banglish (code-mixed
Bangla-English) automatic speech recognition, built on top of
bengaliAI/tugstugi_bengaliai-asr_whisper-medium.
run.py — a single script that transcribes any .flac/.wav audio
file and evaluates WER/CER against a local labeled dataset. No terminal
commands needed beyond running the file.asr_bengali files without requiring an internet download of the dataset.| Property | Value |
|---|---|
| Architecture | Whisper-medium |
| Parameters | ~769M |
| Base model | bengaliAI/tugstugi_bengaliai-asr_whisper-medium |
| Target language | Bangla (bn) + code-mixed Bangla-English |
| Task | Transcription |
Evaluated on a local subset of the bengaliAI/asr_bengali dataset using
jiwer via run.py.
| Model | Test set | Examples | WER | CER |
|---|---|---|---|---|
bengaliAI/tugstugi_bengaliai-asr_whisper-medium (base, used by this pipeline) | asr_bengali | 10 | 25.81% | 8.56% |
| This pipeline on Banglish data | coming soon | — | — | — |
Note: The WER/CER above are for the underlying base model evaluated using this pipeline's silence-aware chunking on a 10-example subset of
asr_bengali. A Banglish-specific benchmark is in progress — see Roadmap.
Edit the CONFIG section at the top of run.py:
AUDIO_FILE = r"path\to\your_audio.flac"
ASR_BENGALI_DATA_DIR = r"path\to\asr_bengali\data"
REFERENCES_TSV = r"path\to\asr_bengali\utt_spk_text.tsv"
MODEL_ID = "bengaliAI/tugstugi_bengaliai-asr_whisper-medium"
CACHE_DIR = r"path\to\cache"
EVAL_LIMIT = 10
Then simply run the file. It will:
transcription_result.txtevaluation_results.csvtransformers directlyimport torch
import librosa
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor
model_id = "bengaliAI/tugstugi_bengaliai-asr_whisper-medium"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id)
audio, sr = librosa.load("your_audio.flac", sr=16000)
inputs = processor(audio, sampling_rate=sr, return_tensors="pt")
with torch.no_grad():
predicted_ids = model.generate(
inputs.input_features,
language="bn",
task="transcribe",
)
transcript = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
print(transcript)
For audio longer than 30 seconds, use
run.pywhich handles silence-aware chunking automatically.
Contributions welcome. If you have labeled Banglish recordings, please open an issue or pull request — this is an underserved gap in Bengali ASR and community contributions would be valuable.
run.py includes silence detection to reduce
this.MIT License — consistent with openai/whisper-medium and
bengaliAI/tugstugi_bengaliai-asr_whisper-medium. See LICENSE for full
text. Please retain attribution to OpenAI Whisper and the bengaliAI base
checkpoint when redistributing.
bengaliAI/tugstugi_bengaliai-asr_whisper-medium — base model this pipeline is built onopenai/whisper-medium — original Whisper architecture