thantzinphyo commited on
Commit
22bf210
ยท
verified ยท
1 Parent(s): 8ecfccc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -54
README.md CHANGED
@@ -9,9 +9,6 @@ tags:
9
  - wav2vec2
10
  - wav2vec2-xls-r
11
  - burmese
12
- - myanmar
13
- - ctc
14
- - hf-asr-leaderboard
15
  datasets:
16
  - custom
17
  metrics:
@@ -19,70 +16,97 @@ metrics:
19
  - wer
20
  - chrf
21
  pipeline_tag: automatic-speech-recognition
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ---
23
 
24
- # Wav2Vec2 XLS-R (300M) โ€” Burmese Speech Recognition
25
 
26
- Fine-tuned **facebook/wav2vec2-xls-r-300m** (~317M parameters) with a Connectionist Temporal Classification (CTC) head on a curated 22.38-hour Burmese speech corpus.
27
 
28
- - **Base Model:** facebook/wav2vec2-xls-r-300m
29
- - **Language:** Burmese (Myanmar / my)
30
- - **Architecture:** Acoustic Transformer with Linear CTC Output Head
31
- - **Target Vocabulary:** 64 character tokens
32
- - **License:** Apache 2.0
33
 
34
- ## Benchmark Results
 
 
 
 
 
35
 
36
- ### Evaluation Progression (Validation Set)
37
 
38
- | Step | Training Loss | Validation Loss | CER (%) | WER (%) | chrF |
39
- | :---: | :---: | :---: | :---: | :---: | :---: |
40
- | Baseline | - | - | 113.39 | 100.00 | 0.55 |
41
- | 250 | 13.05 | 1.16 | 17.40 | 72.71 | 66.26 |
42
- | 500 | 3.28 | 0.42 | 7.33 | 39.69 | 87.39 |
43
- | 750 | 1.68 | 0.31 | 5.68 | 33.10 | 91.12 |
44
- | 1000 | 1.12 | 0.29 | 4.68 | 29.82 | 92.75 |
45
- | 1250 | 0.75 | 0.25 | 4.08 | 27.96 | 93.58 |
46
- | 1500 | 0.35 | 0.27 | 3.81 | 25.96 | 94.43 |
47
- | 1750 | 0.13 | 0.31 | 3.67 | 25.18 | 94.70 |
48
- | 2000 | 0.05 | 0.31 | 3.53 | 24.25 | 94.97 |
49
 
50
- ### Generalization on Held-Out Unseen Speakers (Test Set)
 
 
 
 
 
 
51
 
52
- Evaluated on 1,561 test samples (1.69 hours) from 2 speakers (Gita and Nanda) held out completely from training and validation:
53
 
54
- | Metric | Baseline (Untrained) | Fine-Tuned (Step 2000) | Absolute Improvement |
55
- | :--- | :---: | :---: | :---: |
56
- | CER (%) | 113.39 | 6.58 | +106.81% |
57
- | WER (%) | 100.00 | 33.24 | +66.76% |
58
- | chrF | 0.55 | 87.69 | +87.14 |
59
- | SER (%) | 100.00 | 91.35 | +8.65% |
60
- | DER (%) | 85.06 | 5.87 | +79.19% |
61
- | IER (%) | 0.00 | 2.57 | -2.57% |
 
 
62
 
63
- ### Comparative Benchmark Across Models
64
 
65
- | Model | Parameters | Training Steps | Val CER (%) | Val WER (%) | Val chrF | Test CER (%) | Test WER (%) | Test chrF |
66
- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
67
- | Whisper Tiny | 39M | 1,500 | 4.47 | 25.21 | 92.91 | 11.69 | 42.29 | 79.82 |
68
- | Whisper Base | 74M | 2,000 | 4.43 | 26.55 | 91.94 | 8.55 | 36.29 | 83.71 |
69
- | Wav2Vec2 XLS-R | 317M | 2,000 | 3.53 | 24.25 | 94.97 | 6.58 | 33.24 | 87.69 |
 
 
 
 
 
 
 
70
 
71
- ## Dataset Specifications
72
 
73
- - **Total Audio Files:** 24,560 WAV recordings (22.38 hours)
74
- - **Audio Format:** 16,000 Hz, 16-bit Mono WAV
75
- - **Speakers:** 13 native Burmese speakers (5 female, 8 male)
76
- - **Split Distribution:**
77
- - Train: 20,699 samples (18.61 hours)
78
- - Validation: 2,300 samples (2.08 hours)
79
- - Test: 1,561 samples (1.69 hours) โ€” 2 unseen held-out speakers (Gita & Nanda)
80
 
81
- ## Training Hyperparameters
 
 
 
 
82
 
83
- - **Base Architecture:** facebook/wav2vec2-xls-r-300m
84
- - **Max Steps:** 2,000
85
- - **Effective Batch Size:** 32 (per_device=4, gradient_accumulation_steps=8)
86
- - **Learning Rate:** 3e-4 (Linear warmup 200 steps)
87
- - **Precision:** BF16
88
- - **Gradient Checkpointing:** Enabled (enable_input_require_grads)
 
9
  - wav2vec2
10
  - wav2vec2-xls-r
11
  - burmese
 
 
 
12
  datasets:
13
  - custom
14
  metrics:
 
16
  - wer
17
  - chrf
18
  pipeline_tag: automatic-speech-recognition
19
+ model-index:
20
+ - name: Wav2Vec2-XLS-R-300M-ASR
21
+ results:
22
+ - task:
23
+ type: automatic-speech-recognition
24
+ name: Automatic Speech Recognition
25
+ metrics:
26
+ - name: Validation CER
27
+ type: cer
28
+ value: 3.53
29
+ - name: Validation WER
30
+ type: wer
31
+ value: 24.25
32
+ - name: Validation chrF
33
+ type: chrf
34
+ value: 94.97
35
+ - name: Test CER (Unseen Speakers)
36
+ type: cer
37
+ value: 6.58
38
+ - name: Test WER (Unseen Speakers)
39
+ type: wer
40
+ value: 33.24
41
+ - name: Test chrF (Unseen Speakers)
42
+ type: chrf
43
+ value: 87.69
44
  ---
45
 
46
+ # Wav2Vec2-XLS-R-300M-ASR ( Burmese )
47
 
48
+ This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) for Automatic Speech Recognition (ASR) in Burmese .
49
 
50
+ ## Model Overview
 
 
 
 
51
 
52
+ - **Architecture:** Wav2Vec2 XLS-R (300M)
53
+ - **Parameters:** ~317M
54
+ - **Task:** Automatic Speech Recognition (ASR)
55
+ - **Language:** Burmese (`my`)
56
+ - **Sampling Rate:** 16,000 Hz (Mono)
57
+ - **Tokenizer / Vocab:** 64 Burmese Character Tokens (CTC Head)
58
 
59
+ ## Dataset Details
60
 
61
+ The model was trained on a standardized, high-quality Burmese speech corpus:
 
 
 
 
 
 
 
 
 
 
62
 
63
+ - **Total Duration:** ~22 Hours of audio
64
+ - **Total Utterances:** 24,560 WAV files (16 kHz, 16-bit PCM, Mono)
65
+ - **Total Speakers:** 13 Synthetic Burmese Speakers
66
+ - **Speakers:** แ€•แ€ฎแ€š แŠ แ€แ€ซแ€…แ€ฌ แŠ แ€žแ€ฎแ€›แ€ญ แŠ แ€’แ€ฎแ€• แŠ แ€กแ€€แ€นแ€แ€›แ€ฌ แŠ แ€žแ€’แ€นแ€’แ€ซ แŠ แ€žแ€› แŠ แ€แ€ฌแ€›แ€ฌ แŠ แ€€แ€แ€ญ แŠ แ€žแ€ฏแ€ แŠ แ€•แ€žแ€ฌแ€’ แŠ แ€‚แ€ฎแ€ แŠ แ€”แ€”แ€นแ€’
67
+ - **Training & Validation:** 11 speakers (20,699 train utterances, 2,300 validation utterances)
68
+ - **Test Set (Held-Out):** 2 unseen speakers ( แ€‚แ€ฎแ€ & แ€”แ€”แ€นแ€’ , 1,561 utterances )
69
+ - **Text Preprocessing:** Standardized Myanmar Unicode (`\u1000-\u109F`) with unified word segmentation and punctuation removal. The held-out test split evaluates zero-shot acoustic generalization across completely unseen voices.
70
 
71
+ ## Training Configuration
72
 
73
+ | Parameter | Value |
74
+ | :--- | :--- |
75
+ | Effective Batch Size | 32 (4 per device x 8 gradient accumulation) |
76
+ | Peak Learning Rate | 3.0e-4 |
77
+ | Learning Rate Scheduler | Linear |
78
+ | Warmup Steps | 200 |
79
+ | Total Steps | 2,000 (~6 Epochs) |
80
+ | Mixed Precision | BF16 |
81
+ | Gradient Checkpointing | Enabled (Input Require Grads) |
82
+ | Augmentation | None |
83
 
84
+ ## Evaluation Results
85
 
86
+ | Stage / Evaluation | Step | Train Loss | Val Loss | WER (%) | CER (%) | SER (%) | DER (%) | IER (%) | chrF |
87
+ | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
88
+ | Baseline (Untrained) | 0 | - | - | 100.00 | 113.39 | 100.00 | 85.06 | 0.00 | 0.55 |
89
+ | Validation Set | 250 | 13.0478 | 1.1601 | 72.71 | 17.40 | 99.78 | 13.98 | 3.03 | 66.26 |
90
+ | Validation Set | 500 | 3.2769 | 0.4160 | 39.69 | 7.33 | 87.70 | 6.37 | 3.16 | 87.39 |
91
+ | Validation Set | 750 | 1.6812 | 0.3104 | 33.10 | 5.68 | 83.43 | 3.66 | 4.38 | 91.12 |
92
+ | Validation Set | 1000 | 1.1205 | 0.2926 | 29.82 | 4.68 | 78.35 | 5.50 | 2.43 | 92.75 |
93
+ | Validation Set | 1250 | 0.7550 | 0.2558 | 27.96 | 4.08 | 75.09 | 5.15 | 2.70 | 93.58 |
94
+ | Validation Set | 1500 | 0.3550 | 0.2688 | 25.96 | 3.81 | 71.17 | 4.16 | 3.21 | 94.43 |
95
+ | Validation Set | 1750 | 0.1300 | 0.3087 | 25.18 | 3.67 | 70.57 | 4.77 | 2.47 | 94.70 |
96
+ | Validation Set | 2000 | 0.0465 | 0.3125 | 24.25 | 3.53 | 69.13 | 3.77 | 3.07 | 94.97 |
97
+ | **UNSEEN TEST (Final)** | **Final** | **-** | **-** | **33.24** | **6.58** | **91.35** | **5.87** | **2.57** | **87.69** |
98
 
99
+ ## Usage
100
 
101
+ ```python
102
+ import torch
103
+ from transformers import pipeline
 
 
 
 
104
 
105
+ pipe = pipeline(
106
+ 'automatic-speech-recognition',
107
+ model='thantzinphyo/Wav2Vec2-XLS-R-300M-ASR',
108
+ device='cuda:0' if torch.cuda.is_available() else 'cpu',
109
+ )
110
 
111
+ output = pipe('audio.wav')
112
+ print(output['text'])