Instructions to use cheetos18/whisper-small-roman-urdu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cheetos18/whisper-small-roman-urdu with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="cheetos18/whisper-small-roman-urdu")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("cheetos18/whisper-small-roman-urdu") model = AutoModelForSpeechSeq2Seq.from_pretrained("cheetos18/whisper-small-roman-urdu", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Whisper Small fine-tuned for Roman-Urdu
This model is a fine-tuned version of openai/whisper-small for Roman-Urdu transcription.
Usage
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import torch, librosa
model_id = "cheetos18/whisper-small-roman-urdu"
processor = WhisperProcessor.from_pretrained(model_id)
model = WhisperForConditionalGeneration.from_pretrained(model_id)
audio, sr = librosa.load("sample.wav", sr=16000)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
ids = model.generate(inputs.input_features)
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
- Downloads last month
- 56