Upload fine-tuned Wav2Vec2BERT CTC model for Czech ASR
Browse files
README.md
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- cs
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- audio
|
7 |
+
- automatic-speech-recognition
|
8 |
+
- ctc
|
9 |
+
- wav2vec2-bert
|
10 |
+
- czech
|
11 |
+
license: mit
|
12 |
+
datasets:
|
13 |
+
- common-voice
|
14 |
+
metric:
|
15 |
+
- wer
|
16 |
+
---
|
17 |
+
|
18 |
+
# mitkaj/w2v2BERT-CZ-CV-17.0
|
19 |
+
|
20 |
+
This is a fine-tuned Wav2Vec2BERT model for Czech Automatic Speech Recognition (ASR) using CTC loss.
|
21 |
+
|
22 |
+
## Model Details
|
23 |
+
|
24 |
+
- **Base Model**: facebook/w2v-bert-2.0
|
25 |
+
- **Architecture**: Wav2Vec2BertForCTC
|
26 |
+
- **Training**: Fine-tuned on Czech Common Voice dataset
|
27 |
+
- **Loss Function**: CTC (Connectionist Temporal Classification)
|
28 |
+
- **Vocab Size**: 51 tokens
|
29 |
+
|
30 |
+
## Training Summary
|
31 |
+
|
32 |
+
- **Training Epochs**: 19.97
|
33 |
+
- **Final Training Loss**: 0.0305
|
34 |
+
- **Final Evaluation Loss**: 0.1450
|
35 |
+
- **Final WER**: 0.0583 (5.83%)
|
36 |
+
- **Total Training Time**: 5.1 hours
|
37 |
+
- **Total FLOPS**: 79819834495052513280 GF
|
38 |
+
|
39 |
+
## Usage
|
40 |
+
|
41 |
+
```python
|
42 |
+
from transformers import AutoProcessor, AutoModelForCTC
|
43 |
+
import torch
|
44 |
+
|
45 |
+
# Load model and processor
|
46 |
+
processor = AutoProcessor.from_pretrained("mitkaj/w2v2BERT-CZ-CV-17.0")
|
47 |
+
model = AutoModelForCTC.from_pretrained("mitkaj/w2v2BERT-CZ-CV-17.0")
|
48 |
+
|
49 |
+
# Process audio
|
50 |
+
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
|
51 |
+
|
52 |
+
# Get logits
|
53 |
+
with torch.no_grad():
|
54 |
+
logits = model(**inputs).logits
|
55 |
+
|
56 |
+
# Decode
|
57 |
+
predicted_ids = torch.argmax(logits, dim=-1)
|
58 |
+
transcription = processor.batch_decode(predicted_ids)
|
59 |
+
```
|
60 |
+
|
61 |
+
## Training
|
62 |
+
|
63 |
+
This model was trained using the CTC approach on Czech speech data.
|
64 |
+
|
65 |
+
## Performance
|
66 |
+
|
67 |
+
The model was evaluated on Czech test data using WER (Word Error Rate) metric.
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
## Citation
|
72 |
+
|
73 |
+
If you use this model, please cite the original Wav2Vec2BERT paper and this fine-tuned version.
|