Update README.md
Browse files
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
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
-
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
|
| 55 |
-
| :--- | :---
|
| 56 |
-
|
|
| 57 |
-
|
|
| 58 |
-
|
|
| 59 |
-
|
|
| 60 |
-
|
|
| 61 |
-
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
##
|
| 64 |
|
| 65 |
-
|
|
| 66 |
-
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 67 |
-
|
|
| 68 |
-
|
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
##
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
-
|
| 84 |
-
|
| 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'])
|
|
|
|
|
|
|
|
|
|
|
|