File size: 1,735 Bytes
dcb7873 03f5253 dcb7873 03f5253 dcb7873 03f5253 dcb7873 03f5253 dcb7873 03f5253 0a6971a 03f5253 d231732 dcb7873 03f5253 dcb7873 03f5253 dcb7873 03f5253 dcb7873 03f5253 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | ---
language:
- bn
tags:
- whisper
- automatic-speech-recognition
- bengali
license: apache-2.0
metrics:
- wer
pipeline_tag: automatic-speech-recognition
---
# Whisper Small Bengali
This is a fine-tuned Whisper Small model for Bengali (Bangla) speech recognition.
## Model Details
- **Base Model**: openai/whisper-small
- **Language**: Bengali (bn)
- **Training Steps**: 2000
- **Final Training Loss**: N/A
## Usage
```python
from transformers import WhisperProcessor, WhisperForConditionalGeneration, WhisperTokenizer
import torch
import librosa
# Load model and tokenizer
model = WhisperForConditionalGeneration.from_pretrained("Noobbbbb/whisper-small-bn")
tokenizer = WhisperTokenizer.from_pretrained("Noobbbbb/whisper-small-bn")
processor = WhisperProcessor.from_pretrained("Noobbbbb/whisper-small-bn")
# Load audio (must be 16kHz)
audio, sr = librosa.load("audio.wav", sr=16000)
# Extract features
input_features = processor.feature_extractor(
audio,
sampling_rate=16000,
return_tensors="pt"
).input_features
# Generate transcription
with torch.no_grad():
generated_ids = model.generate(input_features, max_length=448)
# Decode
transcription = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
print(transcription)
```
## Training Details
- **Training Data**: openslr37
- **Language**: Bengali (bn)
- **Training Steps**: 2000
- **Batch Size**: 4
- **Learning Rate**: 1e-05
- **Optimizer**: AdamW
- **eval_wer**: 0.3080158337456705
## Limitations
- Optimized for Bengali speech only
- Works best with clear audio at 16kHz sampling rate
- May not perform well on heavily accented or noisy audio
## Acknowledgments
Based on OpenAI's Whisper model: https://github.com/openai/whisper
|