KandirResearch/DarijaTTS-clean
Viewer • Updated • 21k • 105 • 1
How to use KandirResearch/Whisper-Small-Darija with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="KandirResearch/Whisper-Small-Darija") # Load model directly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("KandirResearch/Whisper-Small-Darija")
model = AutoModelForSpeechSeq2Seq.from_pretrained("KandirResearch/Whisper-Small-Darija")This is a fine-tuned version of OpenAI's whisper-small model on the DarijaTTS-clean dataset. The goal of this project is to improve automatic speech recognition (ASR) for Moroccan Darija (ary).
Lyte/Whisper-Small-Darijaopenai/whisper-smallLyte/DarijaTTS-cleanTraining was started but interrupted. The training will be resumed from step 600. Below is the progress so far:
| Step | Training Loss | Validation Loss | WER |
|---|---|---|---|
| 200 | 1.0142 | 1.0804 | 129.35 |
| 400 | 0.8288 | 0.9905 | 72.44 |
| 600 | 0.7618 | 0.9656 | 70.41 |
You can use this model with Hugging Face's transformers library:
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import torch
model_id = "Lyte/whisper-small-darija"
processor = WhisperProcessor.from_pretrained(model_id)
model = WhisperForConditionalGeneration.from_pretrained(model_id)
# Load an audio file and preprocess
input_features = processor("path_to_audio.wav", return_tensors="pt").input_features
generated_ids = model.generate(input_features)
predicted_text = processor.batch_decode(generated_ids, skip_special_tokens=True)
print(predicted_text)
Special thanks to OpenAI for Whisper and Hugging Face for their amazing platform. This model is built as part of my ongoing research in ASR for Darija.
For updates and more details, stay tuned to this repository!
Base model
openai/whisper-small