ai4bharat/Kathbath
Viewer • Updated • 806k • 1.54k • 17
How to use vanshnawander/whisper-small-telugu with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="vanshnawander/whisper-small-telugu") # Load model directly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("vanshnawander/whisper-small-telugu")
model = AutoModelForSpeechSeq2Seq.from_pretrained("vanshnawander/whisper-small-telugu")This is a fine-tuned version of openai/whisper-small for Telugu automatic speech recognition (ASR).
The model was fine-tuned on the Kathbath Telugu dataset with the following configuration:
Evaluated on the Shrutilipi benchmark - a large-scale ASR dataset for Indian languages.
| Model | WER | CER | Improvement |
|---|---|---|---|
| Base (openai/whisper-small) | N/A% | N/A% | - |
| This Model | 69.7% | 28.9% |
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import librosa
# Load model and processor
processor = WhisperProcessor.from_pretrained("vanshnawander/whisper-small-telugu")
model = WhisperForConditionalGeneration.from_pretrained("vanshnawander/whisper-small-telugu")
# Load audio
audio, sr = librosa.load("audio.wav", sr=16000)
# Transcribe
input_features = processor(audio, sampling_rate=16000, return_tensors="pt").input_features
generated_ids = model.generate(input_features, language="te", task="transcribe")
transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(transcription)
from transformers import pipeline
pipe = pipeline(
"automatic-speech-recognition",
model="vanshnawander/whisper-small-telugu",
chunk_length_s=30,
)
result = pipe("audio.wav", generate_kwargs={"language": "te", "task": "transcribe"})
print(result["text"])
If you use this model, please cite:
@misc{vanshnawander_whisper_small_telugu},
author = {Vansh Nawander},
title = {vanshnawander/whisper-small-telugu},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/vanshnawander/whisper-small-telugu}
}
Base model
openai/whisper-small