Merge branch 'main' of https://huggingface.co/tensorops/whisper-medium-th-combined-v2 into main
Browse files
README.md
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- th
|
4 |
+
license: apache-2.0
|
5 |
+
tags:
|
6 |
+
- whisper-event
|
7 |
+
- generated_from_trainer
|
8 |
+
datasets:
|
9 |
+
- mozilla-foundation/common_voice_11_0
|
10 |
+
metrics:
|
11 |
+
- wer
|
12 |
+
model-index:
|
13 |
+
- name: Whisper Medium Thai Combined V2 - biodatlab
|
14 |
+
results:
|
15 |
+
- task:
|
16 |
+
name: Automatic Speech Recognition
|
17 |
+
type: automatic-speech-recognition
|
18 |
+
dataset:
|
19 |
+
name: mozilla-foundation/common_voice_11_0 th
|
20 |
+
type: mozilla-foundation/common_voice_11_0
|
21 |
+
config: th
|
22 |
+
split: test
|
23 |
+
args: th
|
24 |
+
metrics:
|
25 |
+
- name: Wer
|
26 |
+
type: wer
|
27 |
+
value: 13.03
|
28 |
+
---
|
29 |
+
|
30 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
31 |
+
should probably proofread and complete it, then remove this comment. -->
|
32 |
+
|
33 |
+
# Whisper Medium (Thai): Combined V2
|
34 |
+
|
35 |
+
This model is a fine-tuned version of [biodatlab/whisper-medium-th-1000iter](https://huggingface.co/biodatlab/whisper-medium-th-1000iter) on the mozilla-foundation/common_voice_11_0 th dataset.
|
36 |
+
It achieves the following results on the evaluation set:
|
37 |
+
- Loss: 0.1475
|
38 |
+
- WER: 13.03
|
39 |
+
|
40 |
+
## Model description
|
41 |
+
|
42 |
+
Use the model with huggingface's `transformers` as follows:
|
43 |
+
|
44 |
+
```py
|
45 |
+
from transformers import pipeline
|
46 |
+
|
47 |
+
MODEL_NAME = "biodatlab/whisper-medium-th-combined-v2" # specify the model name
|
48 |
+
lang = "th" # change to Thai langauge
|
49 |
+
|
50 |
+
device = 0 if torch.cuda.is_available() else "cpu"
|
51 |
+
|
52 |
+
pipe = pipeline(
|
53 |
+
task="automatic-speech-recognition",
|
54 |
+
model=MODEL_NAME,
|
55 |
+
chunk_length_s=30,
|
56 |
+
device=device,
|
57 |
+
)
|
58 |
+
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(
|
59 |
+
language=lang,
|
60 |
+
task="transcribe"
|
61 |
+
)
|
62 |
+
text = pipe("audio.mp3")["text"] # give audio mp3 and transcribe text
|
63 |
+
```
|
64 |
+
|
65 |
+
|
66 |
+
## Intended uses & limitations
|
67 |
+
|
68 |
+
More information needed
|
69 |
+
|
70 |
+
## Training and evaluation data
|
71 |
+
|
72 |
+
More information needed
|
73 |
+
|
74 |
+
## Training procedure
|
75 |
+
|
76 |
+
### Training hyperparameters
|
77 |
+
|
78 |
+
The following hyperparameters were used during training:
|
79 |
+
- learning_rate: 1e-05
|
80 |
+
- train_batch_size: 32
|
81 |
+
- eval_batch_size: 32
|
82 |
+
- seed: 42
|
83 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
84 |
+
- lr_scheduler_type: linear
|
85 |
+
- lr_scheduler_warmup_steps: 500
|
86 |
+
- training_steps: 5000
|
87 |
+
- mixed_precision_training: Native AMP
|
88 |
+
|
89 |
+
### Training results
|
90 |
+
|
91 |
+
| Training Loss | Epoch | Step | Validation Loss | Wer |
|
92 |
+
|:-------------:|:-----:|:----:|:---------------:|:-------:|
|
93 |
+
| 0.0679 | 2.09 | 5000 | 0.1475 | 13.03 |
|
94 |
+
|
95 |
+
|
96 |
+
### Framework versions
|
97 |
+
|
98 |
+
- Transformers 4.26.0.dev0
|
99 |
+
- Pytorch 1.13.0
|
100 |
+
- Datasets 2.7.1
|
101 |
+
- Tokenizers 0.13.2
|