1from transformers import pipeline
2
3transcriber = pipeline(
4 "automatic-speech-recognition",
5 model="kingabzpro/whisper-tiny-urdu"
6)
7
8transcriber.model.generation_config.forced_decoder_ids = None
9transcriber.model.generation_config.language = "ur"
10
11transcription = transcriber("audio2.mp3")
12print(transcription){'text': 'دیکھیے پانی کب تک بہتا اور مچھلی کب تک تیرتی ہے'}| Dataset | WER (%) | CER (%) | BLEU | ChrF |
|---|---|---|---|---|
| Common Voice 17.0 (Urdu) | 46.908 | 18.543 | 32.631 | 63.988 |
| HowMannyMore/urdu-audiodataset | 51.405 | 21.830 | 31.475 | 64.204 |
| Training Loss | Epoch | Step | Validation Loss | Wer |
|---|---|---|---|---|
| 0.6808 | 1.6949 | 500 | 0.7403 | 52.6699 |
| 0.3948 | 3.3898 | 1000 | 0.6850 | 47.1247 |
| 0.2873 | 5.0847 | 1500 | 0.6994 | 48.1516 |
| 0.2024 | 6.7797 | 2000 | 0.7169 | 46.7326 |
| 0.183 | 8.4746 | 2500 | 0.7225 | 47.8529 |