--- language: - te license: apache-2.0 tags: - whisper-event metrics: - wer model-index: - name: Whisper Telugu Base - Vasista Sai Lodagala results: - task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: google/fleurs type: google/fleurs config: te_in split: test metrics: - type: wer value: 13.39 name: WER --- # Whisper Telugu Base This model is a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) on the Telugu data available from multiple publicly available ASR corpuses. It has been fine-tuned as a part of the Whisper fine-tuning sprint. **NOTE:** The code used to train this model is available for re-use in the [whisper-finetune](https://github.com/vasistalodagala/whisper-finetune) repository. ## Usage In order to evaluate this model on an entire dataset, the evaluation codes available in the [whisper-finetune](https://github.com/vasistalodagala/whisper-finetune) repository can be used. The same repository also provides the scripts for faster inference using whisper-jax. In order to infer a single audio file using this model, the following code snippet can be used: ```python >>> import torch >>> from transformers import pipeline >>> # path to the audio file to be transcribed >>> audio = "/path/to/audio.format" >>> device = "cuda:0" if torch.cuda.is_available() else "cpu" >>> transcribe = pipeline(task="automatic-speech-recognition", model="vasista22/whisper-telugu-base", chunk_length_s=30, device=device) >>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="te", task="transcribe") >>> print('Transcription: ', transcribe(audio)["text"]) ``` For faster inference of whisper models, the [whisper-jax](https://github.com/sanchit-gandhi/whisper-jax) library can be used. Please follow the necessary installation steps as mentioned [here](https://github.com/vasistalodagala/whisper-finetune#faster-evaluation-with-whisper-jax), before using the following code snippet: ```python >>> import jax.numpy as jnp >>> from whisper_jax import FlaxWhisperForConditionalGeneration, FlaxWhisperPipline >>> # path to the audio file to be transcribed >>> audio = "/path/to/audio.format" >>> transcribe = FlaxWhisperPipline("vasista22/whisper-telugu-base", batch_size=16) >>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="te", task="transcribe") >>> print('Transcription: ', transcribe(audio)["text"]) ``` ## Training and evaluation data Training Data: - [CSTD IIIT-H ASR Corpus](https://asr.iiit.ac.in/cstd_ulca/) - [ULCA ASR Corpus](https://github.com/Open-Speech-EkStep/ULCA-asr-dataset-corpus#telugu-labelled-total-duration-is-102593-hours) - [Shrutilipi ASR Corpus](https://ai4bharat.org/shrutilipi) - [Microsoft Speech Corpus (Indian Languages)](https://msropendata.com/datasets/7230b4b1-912d-400e-be58-f84e0512985e) - [Google/Fleurs Train+Dev set](https://huggingface.co/datasets/google/fleurs) - Babel ASR Corpus Evaluation Data: - [Microsoft Speech Corpus (Indian Languages) Test Set](https://msropendata.com/datasets/7230b4b1-912d-400e-be58-f84e0512985e) - [Google/Fleurs Test Set](https://huggingface.co/datasets/google/fleurs) - [OpenSLR](https://www.openslr.org/66/) - Babel Test Set ## Training hyperparameters The following hyperparameters were used during training: - learning_rate: 3.3e-05 - train_batch_size: 80 - eval_batch_size: 88 - seed: 22 - optimizer: adamw_bnb_8bit - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 15000 - training_steps: 24174 (terminated upon convergence. Initially set to 85952 steps) - mixed_precision_training: True ## Acknowledgement This work was done at [Speech Lab, IIT Madras](https://asr.iitm.ac.in/). The compute resources for this work were funded by "Bhashini: National Language translation Mission" project of the Ministry of Electronics and Information Technology (MeitY), Government of India.