inference_code_snippet_added
Browse files
README.md
CHANGED
@@ -29,16 +29,52 @@ should probably proofread and complete it, then remove this comment. -->
|
|
29 |
# Whisper Kannada Base
|
30 |
|
31 |
This model is a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) 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:
|
37 |
-
|
|
|
|
|
|
|
38 |
|
39 |
-
|
|
|
|
|
|
|
40 |
|
41 |
-
|
42 |
|
43 |
The following hyperparameters were used during training:
|
44 |
- learning_rate: 3.3e-05
|
@@ -52,5 +88,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.
|
|
|
29 |
# Whisper Kannada Base
|
30 |
|
31 |
This model is a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) 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 |
+
|
51 |
+
>>> device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
52 |
+
|
53 |
+
>>> transcribe = pipeline(
|
54 |
+
task="automatic-speech-recognition",
|
55 |
+
model="vasista22/whisper-kannada-base",
|
56 |
+
chunk_length_s=30,
|
57 |
+
device=device,
|
58 |
+
)
|
59 |
+
|
60 |
+
>>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="kn", task="transcribe")
|
61 |
+
>>> print('Transcription: ', transcribe(audio)["text"])
|
62 |
+
```
|
63 |
|
64 |
## Training and evaluation data
|
65 |
|
66 |
+
Training Data:
|
67 |
+
- [IISc-MILE Kannada ASR Corpus](https://www.openslr.org/126/)
|
68 |
+
- [ULCA ASR Corpus](https://github.com/Open-Speech-EkStep/ULCA-asr-dataset-corpus#kannada-labelled-total-duration-is-60891-hours)
|
69 |
+
- [Shrutilipi ASR Corpus](https://ai4bharat.org/shrutilipi)
|
70 |
+
- [Google/Fleurs Train+Dev set](https://huggingface.co/datasets/google/fleurs)
|
71 |
|
72 |
+
Evaluation Data:
|
73 |
+
- [Google/Fleurs Test Set](https://huggingface.co/datasets/google/fleurs)
|
74 |
+
- [IISc-MILE Test Set](https://www.openslr.org/126/)
|
75 |
+
- [OpenSLR](https://www.openslr.org/79/)
|
76 |
|
77 |
+
## Training hyperparameters
|
78 |
|
79 |
The following hyperparameters were used during training:
|
80 |
- learning_rate: 3.3e-05
|
|
|
88 |
- mixed_precision_training: True
|
89 |
|
90 |
## Acknowledgement
|
91 |
+
This work was done at [Speech Lab, IITM](https://asr.iitm.ac.in/).
|
92 |
+
|
93 |
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.
|