|
--- |
|
language: |
|
- zh |
|
license: apache-2.0 |
|
datasets: |
|
- mozilla-foundation/common_voice_16_0 |
|
model-index: |
|
- name: Wav2Vec2-BERT - Alvin |
|
results: |
|
- task: |
|
name: Automatic Speech Recognition |
|
type: automatic-speech-recognition |
|
dataset: |
|
name: mozilla-foundation/common_voice_16_0 yue |
|
type: mozilla-foundation/common_voice_16_0 |
|
config: yue |
|
split: test |
|
args: yue |
|
metrics: |
|
- name: Normalized CER |
|
type: cer |
|
value: 20.5 |
|
--- |
|
|
|
|
|
# Wav2Vec2-BERT - Alvin |
|
|
|
This model is a fine-tuned version of [facebook/w2v-bert-2.0](https://huggingface.co/facebook/w2v-bert-2.0). This has a CER of 20.5 |
|
|
|
## Training and evaluation data |
|
For training, three datasets were used: |
|
- Common Voice 16 `zh-HK` and `yue` Train Set |
|
- CantoMap: Winterstein, Grégoire, Tang, Carmen and Lai, Regine (2020) "CantoMap: a Hong Kong Cantonese MapTask Corpus", in Proceedings of The 12th Language Resources and Evaluation Conference, Marseille: European Language Resources Association, p. 2899-2906. |
|
- Cantonse-ASR: Yu, Tiezheng, Frieske, Rita, Xu, Peng, Cahyawijaya, Samuel, Yiu, Cheuk Tung, Lovenia, Holy, Dai, Wenliang, Barezi, Elham, Chen, Qifeng, Ma, Xiaojuan, Shi, Bertram, Fung, Pascale (2022) "Automatic Speech Recognition Datasets in Cantonese: A Survey and New Dataset", 2022. Link: https://arxiv.org/pdf/2201.02419.pdf |
|
|
|
## Code Example |
|
``` |
|
from transformers import pipeline |
|
bert_asr = pipeline( |
|
"automatic-speech-recognition", model="alvanlii/wav2vec2-BERT-cantonese", device="cuda" |
|
) |
|
text = pipe(file)["text"] |
|
``` |
|
|
|
|
|
## Training Hyperparameters |
|
- learning_rate: 1e-4 |
|
- train_batch_size: 4 (on 1 3090) |
|
- eval_batch_size: 1 |
|
- gradient_accumulation_steps: 32 |
|
- total_train_batch_size: 32x4=128 |
|
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 |
|
- lr_scheduler_warmup_steps: 500 |
|
|
|
## Training Results |
|
|
|
| Training Loss | Step | Validation Loss | CER | |
|
|:-------------:|:----:|:---------------:|:------:| |
|
|2.416|1200|1.615|0.4246 |
|
|1.313|4200|0.9049|0.2745 |
|
|1.090|7200|0.7463|0.2388 |
|
|0.907|9600|0.6820|0.2172 |