vasista22 commited on
Commit
d415fd4
1 Parent(s): 21d1b45

inference_code_snippet_added

Browse files
Files changed (1) hide show
  1. README.md +36 -5
README.md CHANGED
@@ -31,14 +31,44 @@ should probably proofread and complete it, then remove this comment. -->
31
  This model is a fine-tuned version of [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) on the Kannada data available from multiple publicly available ASR corpuses.
32
  It has been fine-tuned as a part of the Whisper fine-tuning sprint.
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  ## Training and evaluation data
35
 
36
- Training Data: MILE ASR Corpus, ULCA ASR Corpus, Shrutilipi ASR Corpus, Google/Fleurs Train+Dev set.
37
- Evaluation Data: Google/Fleurs Test set, MILE Test set, OpenSLR.
 
 
 
38
 
39
- ## Training procedure
 
 
 
40
 
41
- ### Training hyperparameters
42
 
43
  The following hyperparameters were used during training:
44
  - learning_rate: 5e-05
@@ -52,5 +82,6 @@ The following hyperparameters were used during training:
52
  - mixed_precision_training: True
53
 
54
  ## Acknowledgement
55
- This work was done at Speech Lab, IITM.
 
56
  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.
 
31
  This model is a fine-tuned version of [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) on the Kannada data available from multiple publicly available ASR corpuses.
32
  It has been fine-tuned as a part of the Whisper fine-tuning sprint.
33
 
34
+ **NOTE:** The code used to train this model is available for re-use in the [whisper-finetune](https://github.com/vasistalodagala/whisper-finetune) repository.
35
+
36
+ ## Usage
37
+
38
+ 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.
39
+
40
+ The same repository also provides the scripts for faster inference using whisper-jax.
41
+
42
+ In order to infer a single audio file using this model, the following code snippet can be used:
43
+
44
+ ```python
45
+ >>> import torch
46
+ >>> from transformers import pipeline
47
+
48
+ >>> # path to the audio file to be transcribed
49
+ >>> audio = "/path/to/audio.format"
50
+ >>> device = "cuda:0" if torch.cuda.is_available() else "cpu"
51
+
52
+ >>> transcribe = pipeline(task="automatic-speech-recognition", model="vasista22/whisper-kannada-tiny", chunk_length_s=30, device=device)
53
+ >>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="kn", task="transcribe")
54
+
55
+ >>> print('Transcription: ', transcribe(audio)["text"])
56
+ ```
57
+
58
  ## Training and evaluation data
59
 
60
+ Training Data:
61
+ - [IISc-MILE Kannada ASR Corpus](https://www.openslr.org/126/)
62
+ - [ULCA ASR Corpus](https://github.com/Open-Speech-EkStep/ULCA-asr-dataset-corpus#kannada-labelled-total-duration-is-60891-hours)
63
+ - [Shrutilipi ASR Corpus](https://ai4bharat.org/shrutilipi)
64
+ - [Google/Fleurs Train+Dev set](https://huggingface.co/datasets/google/fleurs)
65
 
66
+ Evaluation Data:
67
+ - [Google/Fleurs Test Set](https://huggingface.co/datasets/google/fleurs)
68
+ - [IISc-MILE Test Set](https://www.openslr.org/126/)
69
+ - [OpenSLR](https://www.openslr.org/79/)
70
 
71
+ ## Training hyperparameters
72
 
73
  The following hyperparameters were used during training:
74
  - learning_rate: 5e-05
 
82
  - mixed_precision_training: True
83
 
84
  ## Acknowledgement
85
+ This work was done at [Speech Lab, IIT Madras](https://asr.iitm.ac.in/).
86
+
87
  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.