Update README.md
Browse files
README.md
CHANGED
@@ -7,6 +7,7 @@ language:
|
|
7 |
license: apache-2.0
|
8 |
metrics:
|
9 |
- wer
|
|
|
10 |
tags:
|
11 |
- hf-asr-leaderboard
|
12 |
- generated_from_trainer
|
@@ -26,12 +27,9 @@ model-index:
|
|
26 |
name: Wer
|
27 |
---
|
28 |
|
29 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
30 |
-
should probably proofread and complete it, then remove this comment. -->
|
31 |
-
|
32 |
# Whisper Small Gujarati OpenSLR
|
33 |
|
34 |
-
This model is a fine-tuned version of [
|
35 |
It achieves the following results on the evaluation set:
|
36 |
- Loss: 0.0472
|
37 |
- Wer: 35.3258
|
@@ -77,3 +75,21 @@ The following hyperparameters were used during training:
|
|
77 |
- Pytorch 2.3.0+cu121
|
78 |
- Datasets 2.20.0
|
79 |
- Tokenizers 0.19.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
license: apache-2.0
|
8 |
metrics:
|
9 |
- wer
|
10 |
+
- cer
|
11 |
tags:
|
12 |
- hf-asr-leaderboard
|
13 |
- generated_from_trainer
|
|
|
27 |
name: Wer
|
28 |
---
|
29 |
|
|
|
|
|
|
|
30 |
# Whisper Small Gujarati OpenSLR
|
31 |
|
32 |
+
This model is a fine-tuned version of [vasista22/whisper-gujarati-small](https://huggingface.co/vasista22/whisper-gujarati-small) on the Gujarati OpenSLR dataset.
|
33 |
It achieves the following results on the evaluation set:
|
34 |
- Loss: 0.0472
|
35 |
- Wer: 35.3258
|
|
|
75 |
- Pytorch 2.3.0+cu121
|
76 |
- Datasets 2.20.0
|
77 |
- Tokenizers 0.19.1
|
78 |
+
|
79 |
+
## Usage
|
80 |
+
|
81 |
+
In order to infer a single audio file using this model, the following code snippet can be used:
|
82 |
+
|
83 |
+
```python
|
84 |
+
>>> import torch
|
85 |
+
>>> from transformers import pipeline
|
86 |
+
|
87 |
+
>>> # path to the audio file to be transcribed
|
88 |
+
>>> audio = "/path/to/audio.format"
|
89 |
+
>>> device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
90 |
+
|
91 |
+
>>> transcribe = pipeline(task="automatic-speech-recognition", model="1rsh/whisper-small-gu", chunk_length_s=30, device=device)
|
92 |
+
>>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="gu", task="transcribe")
|
93 |
+
|
94 |
+
>>> print('Transcription: ', transcribe(audio)["text"])
|
95 |
+
```
|