Downloads · 30 days
9
10% of all-time downloads
pavanmantha/whisper-small-hi
whisper-small-hi is a automatic speech recognition model from pavanmantha. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
A fine-tuned version of openai/whisper-medium on the pavanmantha/indicasr dataset for Hindi automatic speech recognition (transcription).
Downloads · 30 days
9
10% of all-time downloads
All-time downloads
92
Public
Parameters
242M
2.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors967 MB · 100%
From the Hugging Face model README
A fine-tuned version of openai/whisper-medium on the pavanmantha/indic_asr dataset for Hindi automatic speech recognition (transcription).
This model is fine-tuned from OpenAI's Whisper Medium checkpoint specifically for Hindi speech transcription. It was trained on the pavanmantha/indic_asr dataset using a supervised sequence-to-sequence approach. The model takes raw audio (16 kHz) as input and outputs the corresponding Hindi transcript.
hi)This model can be used out-of-the-box for Hindi speech-to-text transcription without any additional fine-tuning. It is suitable for:
The model can be plugged into larger systems such as:
pavanmantha/indic_asr training data. Underrepresented accents, dialects, or speaking styles may see higher WER.Users should evaluate the model on their target domain (e.g., broadcast, conversational, telephony) before deployment. For production use, consider post-processing with a language model or vocabulary adaptation for domain-specific terms.
from transformers import pipeline
asr = pipeline(
"automatic-speech-recognition",
model="pavanmantha/whisper-medium-hi", # replace with your Hub model ID
generate_kwargs={"language": "hindi", "task": "transcribe"}
)
result = asr("path/to/your/hindi_audio.wav")
print(result["text"])
Or using the processor/model directly:
import torch
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import librosa
processor = WhisperProcessor.from_pretrained("pavanmantha/whisper-medium-hi")
model = WhisperForConditionalGeneration.from_pretrained("pavanmantha/whisper-medium-hi")
model.eval()
audio, sr = librosa.load("audio.wav", sr=16000)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
predicted_ids = model.generate(
inputs.input_features,
language="hindi",
task="transcribe"
)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
print(transcription[0])
The model was trained on the pavanmantha/indic_asr dataset, which contains Hindi speech-text pairs. The dataset was split 80/20 into train and test sets (seed=42):
Audio column cast)datasets Audio feature.WhisperFeatureExtractor (80-channel, 30-second context window).WhisperTokenizer with language="Hindi" and task="transcribe".DataCollatorSpeechSeq2SeqWithPadding.| Parameter | Value |
|---|---|
| Base model | openai/whisper-medium |
| Training regime | BF16 mixed precision |
| Per-device train batch size | 16 |
| Gradient accumulation steps | 4 (effective batch = 64) |
| Learning rate | 1e-5 |
| LR scheduler | Linear |
| Warmup steps | 500 |
| Epochs | 3 |
| Evaluation strategy | Every 500 steps |
| Save strategy | Every 500 steps (best model retained) |
| Generation max length | 225 tokens |
| Gradient checkpointing | Enabled |
| DataLoader workers | 4 |
| DataLoader pin memory | Enabled |
| Save total limit | 2 checkpoints |
| Metric for best model | WER (lower is better) |
Seq2SeqTrainerEvaluation was performed on the held-out 20% test split of pavanmantha/indic_asr (seed=42, same as train/test split).
Word Error Rate (WER) — the primary metric, computed using the jiwer library. WER measures the edit distance (insertions, deletions, substitutions) between predicted and reference transcripts, expressed as a percentage. Lower is better.
| Metric | Value |
|---|---|
| WER (test set) | (add your final WER here after training) |
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
forced_decoder_ids=None, language=hindi, task=transcribeSeq2SeqTrainer)If you use this model, please cite the original Whisper paper:
BibTeX:
@article{radford2023robust,
title={Robust Speech Recognition via Large-Scale Weak Supervision},
author={Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
journal={Proceedings of ICML},
year={2023}
}
Pavan Mantha