makaveli10 commited on
Commit
dd7add8
·
verified ·
1 Parent(s): 0827274

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -106
README.md CHANGED
@@ -1,106 +1,106 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
4
- # Whisper-Small-hindi
5
-
6
- This is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small), fine-tuned on the following datasets:
7
- - [Shrutilipi](https://ai4bharat.iitm.ac.in/datasets/shrutilipi) (AI4Bharat): Shrutilipi is a labelled ASR corpus obtained by mining parallel audio and text pairs at the document scale from All India Radio news bulletins for 12 Indian languages - Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Odia, Punjabi, Sanskrit, Tamil, Telugu, Urdu. The corpus has over 6400 hours of data across all languages. Out of which hindi is ~ 1600 hours
8
- - [IITM Madras SpringLab](https://asr.iitm.ac.in/dataset) (CC BY 4.0 License): This data was collected on payment basis using the following vendors -- Mediscribe India, Desicrew, and Crescendo. Preliminary checking of quality of transcriptions was done by our partners at KL University as well as by SPRING Lab members. The data consists mostly of mock conversations as well as monolgues on different topics.
9
-
10
- The model is trained on around 2500 hours of hindi speech & optimized for ASR tasks in hindi, with a particular focus on high-accuracy transcription.
11
-
12
- ## How to use
13
- The Whisper model is intrinsically designed to work on audio samples of up to 30s in duration. However, by using a chunking algorithm, it can be used to transcribe audio samples of up to arbitrary length. This is possible through Transformers pipeline method. Chunking is enabled by setting chunk_length_s=30 when instantiating the pipeline. With chunking enabled, the pipeline can be run with batched inference. It can also be extended to predict sequence level timestamps by passing return_timestamps=True:
14
-
15
- ```python
16
- >>> import torch
17
- >>> from transformers import pipeline
18
- >>> from datasets import load_dataset
19
-
20
- >>> device = "cuda:0" if torch.cuda.is_available() else "cpu"
21
-
22
- >>> asr_pipe = pipe(
23
- >>> "automatic-speech-recognition",
24
- >>> model="collabora/whisper-small-hindi",
25
- >>> chunk_length_s=30,
26
- >>> device=device
27
- >>> )
28
-
29
- >>> ds = load_dataset("mozilla-foundation/common_voice_11_0", "hi", split="validation")
30
- >>> sample = ds[0]["audio"]
31
- >>> prediction = asr_pipe(sample.copy(), batch_size=8, return_timestamps=True)["text"]
32
- हमने उस उम्मीदवार को चुना।
33
- ```
34
-
35
- ## Intended Use
36
- - The model is designed for high quality transcription in Hindi.
37
- - And is suitable for academic use in ASR related tasks.
38
-
39
- ## Limitations
40
- - May not perform well on noisy or low-quality audio.
41
- - Focused primarily on Hindi.
42
-
43
- ### Model Performance
44
- Whisper Normalization is counter-productive for hindi since it takes the meaning out of a sentence for e.g. consider the hindi phrase:
45
- ```
46
- 'राजनीतिज्ञों ने कहा कि उन्होंने निर्णायक मत को अनावश्यक रूप से निर्धारित करने के लिए अफगान संविधान में काफी अस्पष्टता पाई थी'
47
- ```
48
-
49
- After whisper normalization:
50
- ```
51
- 'र जन त जञ न कह क उनह न न रण यक मत क अन वशयक रप स न रध र त करन क ल ए अफग न सव ध न म क फ असपषटत प ई थ'
52
- ```
53
-
54
- So, we use [indic-normalization](https://github.com/anoopkunchukuttan/indic_nlp_library/blob/4cead0ae6c78fe9a19a51ef679f586206df9c476/indicnlp/normalize/indic_normalize.py#L325) for evaluation. Indic-norm produces the below output:
55
- ```
56
- 'राजनीतिज्ञों ने कहा कि उन्होंने निर्णायक मत को अनावश्यक रूप से निर्धारित करने के लिए अफगान संविधान में काफी अस्पष्टता पाई थी'
57
- ```
58
-
59
- `openai-whisper/small` baseline results on `google/fleurs -- hindi`:
60
- ```
61
- Word Error Rate (WER) with whisper norm: 67.37 %
62
- Word Error Rate (WER) with indic norm: 89.73 %
63
- ```
64
-
65
- The model achieves the following benchmarks on the held out test set `google/fleurs -- hindi`:
66
- ```
67
- Word Error Rate (WER) with whisper norm: 10.11 %
68
- Word Error Rate (WER) with indic norm: 17.35 %
69
- ```
70
-
71
- Indic normalization retains diacritics and complex characters in Hindi text, which can increase the Word Error Rate (WER) when compared to Whisper's default normalization but produces more semantically accurate transcriptions.
72
-
73
- ### Acknowledgments
74
-
75
- We thank the contributors and organizations behind the datasets:
76
-
77
- - [AI4Bharat](https://ai4bharat.iitm.ac.in/datasets/shrutilipi) for the Shrutilipi dataset.
78
-
79
- - [IIT Madras SpringLab](https://asr.iitm.ac.in/dataset) for their springx-hindi dataset.
80
-
81
- - [IndicNLP Library](https://github.com/anoopkunchukuttan/indic_nlp_library) by Anoop Kunchukuttan for providing normalization tools that were crucial for evaluation.
82
-
83
-
84
- ### BibTeX entry and citation info
85
-
86
- #### Model Citation
87
- ```bibtex
88
- @misc{whisper-small-hindi,
89
- title = {Whisper-Small Fine-Tuned on Hindi},
90
- author = {Collabora Ltd.},
91
- year = {2025},
92
- publisher = {Hugging Face},
93
- note = {Fine-tuned using Shrutilipi and IITM Madras SpringLab datasets},
94
- url = {https://huggingface.co/collabora/whisper-small-hindi/}
95
- }
96
- ```
97
-
98
- #### IndicNLP Library Citation
99
- ```
100
- @misc{kunchukuttan2020indicnlp,
101
- author = "Anoop Kunchukuttan",
102
- title = "{The IndicNLP Library}",
103
- year = "2020",
104
- howpublished={\url{https://github.com/anoopkunchukuttan/indic_nlp_library/blob/master/docs/indicnlp.pdf}}
105
- }
106
- ```
 
1
+ ---
2
+ license: cc-by-4.0
3
+ ---
4
+ # Whisper-Small-hindi
5
+
6
+ This is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small), fine-tuned on the following datasets:
7
+ - [Shrutilipi](https://ai4bharat.iitm.ac.in/datasets/shrutilipi) (AI4Bharat): Shrutilipi is a labelled ASR corpus obtained by mining parallel audio and text pairs at the document scale from All India Radio news bulletins for 12 Indian languages - Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Odia, Punjabi, Sanskrit, Tamil, Telugu, Urdu. The corpus has over 6400 hours of data across all languages. Out of which hindi is ~ 1600 hours
8
+ - [IITM Madras SpringLab](https://asr.iitm.ac.in/dataset) (CC BY 4.0 License): This data was collected on payment basis using the following vendors -- Mediscribe India, Desicrew, and Crescendo. Preliminary checking of quality of transcriptions was done by our partners at KL University as well as by SPRING Lab members. The data consists mostly of mock conversations as well as monolgues on different topics.
9
+
10
+ The model is trained on around 2500 hours of hindi speech & optimized for ASR tasks in hindi, with a particular focus on high-accuracy transcription.
11
+
12
+ ## How to use
13
+ The Whisper model is intrinsically designed to work on audio samples of up to 30s in duration. However, by using a chunking algorithm, it can be used to transcribe audio samples of up to arbitrary length. This is possible through Transformers pipeline method. Chunking is enabled by setting chunk_length_s=30 when instantiating the pipeline. With chunking enabled, the pipeline can be run with batched inference. It can also be extended to predict sequence level timestamps by passing return_timestamps=True:
14
+
15
+ ```python
16
+ >>> import torch
17
+ >>> from transformers import pipeline
18
+ >>> from datasets import load_dataset
19
+
20
+ >>> device = "cuda:0" if torch.cuda.is_available() else "cpu"
21
+
22
+ >>> asr_pipe = pipe(
23
+ >>> "automatic-speech-recognition",
24
+ >>> model="collabora/whisper-small-hindi",
25
+ >>> chunk_length_s=30,
26
+ >>> device=device
27
+ >>> )
28
+
29
+ >>> ds = load_dataset("mozilla-foundation/common_voice_11_0", "hi", split="validation")
30
+ >>> sample = ds[0]["audio"]
31
+ >>> prediction = asr_pipe(sample.copy(), batch_size=8, return_timestamps=True)["text"]
32
+ हमने उस उम्मीदवार को चुना।
33
+ ```
34
+
35
+ ## Intended Use
36
+ - The model is designed for high quality transcription in Hindi.
37
+ - And is suitable for academic use in ASR related tasks.
38
+
39
+ ## Limitations
40
+ - May not perform well on noisy or low-quality audio.
41
+ - Focused primarily on Hindi.
42
+
43
+ ### Model Performance
44
+ Whisper Normalization is counter-productive for hindi since it takes the meaning out of a sentence for e.g. consider the hindi phrase:
45
+ ```
46
+ 'राजनीतिज्ञों ने कहा कि उन्होंने निर्णायक मत को अनावश्यक रूप से निर्धारित करने के लिए अफगान संविधान में काफी अस्पष्टता पाई थी'
47
+ ```
48
+
49
+ After whisper normalization:
50
+ ```
51
+ 'र जन त जञ न कह क उनह न न रण यक मत क अन वशयक रप स न रध र त करन क ल ए अफग न सव ध न म क फ असपषटत प ई थ'
52
+ ```
53
+
54
+ So, we use [indic-normalization](https://github.com/anoopkunchukuttan/indic_nlp_library/blob/4cead0ae6c78fe9a19a51ef679f586206df9c476/indicnlp/normalize/indic_normalize.py#L325) for evaluation. Indic-norm produces the below output:
55
+ ```
56
+ 'राजनीतिज्ञों ने कहा कि उन्होंने निर्णायक मत को अनावश्यक रूप से निर्धारित करने के लिए अफगान संविधान में काफी अस्पष्टता पाई थी'
57
+ ```
58
+
59
+ `openai-whisper/small` baseline results on `google/fleurs -- hindi`:
60
+ ```
61
+ Word Error Rate (WER) with whisper norm: 67.37 %
62
+ Word Error Rate (WER) with indic norm: 89.73 %
63
+ ```
64
+
65
+ The model achieves the following benchmarks on the held out test set `google/fleurs -- hindi`:
66
+ ```
67
+ Word Error Rate (WER) with whisper norm: 10.11 %
68
+ Word Error Rate (WER) with indic norm: 17.35 %
69
+ ```
70
+
71
+ Indic normalization retains diacritics and complex characters in Hindi text, which can increase the Word Error Rate (WER) when compared to Whisper's default normalization but produces more semantically accurate transcriptions.
72
+
73
+ ### Acknowledgments
74
+
75
+ We thank the contributors and organizations behind the datasets:
76
+
77
+ - [AI4Bharat](https://ai4bharat.iitm.ac.in/datasets/shrutilipi) for the Shrutilipi dataset.
78
+
79
+ - [IIT Madras SpringLab](https://asr.iitm.ac.in/dataset) for their springx-hindi dataset.
80
+
81
+ - [IndicNLP Library](https://github.com/anoopkunchukuttan/indic_nlp_library) by Anoop Kunchukuttan for providing normalization tools that were crucial for evaluation.
82
+
83
+
84
+ ### BibTeX entry and citation info
85
+
86
+ #### Model Citation
87
+ ```bibtex
88
+ @misc{whisper-small-hindi,
89
+ title = {Whisper-Small Fine-Tuned on Hindi},
90
+ author = {Collabora Ltd.},
91
+ year = {2025},
92
+ publisher = {Hugging Face},
93
+ note = {Fine-tuned using Shrutilipi and IITM Madras SpringLab datasets},
94
+ howpublished = {\url{https://huggingface.co/collabora/whisper-small-hindi/}},
95
+ }
96
+ ```
97
+
98
+ #### IndicNLP Library Citation
99
+ ```
100
+ @misc{kunchukuttan2020indicnlp,
101
+ author = "Anoop Kunchukuttan",
102
+ title = "{The IndicNLP Library}",
103
+ year = "2020",
104
+ howpublished={\url{https://github.com/anoopkunchukuttan/indic_nlp_library/blob/master/docs/indicnlp.pdf}}
105
+ }
106
+ ```