This repository contains a implementation of Wav2Vec2 and also provide codes for fine-tuning on Wav2Vec2-base of Vietnamese.
Demo is available at Hugging Face
The code is fine-tunned on VLSP2020 Dataset
Since I mainly train on Google Colab, so I need to convert this dataset to Web Dataset for faster loading from Google Drive
cd finetuning
python preprocess.py --data_dir [DATA_DIR] --dest_dir [DEST_DIR]
where:
DATA_DIR
: Path of the VLSP2020 dataDEST_DIR
: The directory where data is extracted in
You can view my fine-tuning in this notebook and WandB
cd finetuning
python train.py \
--batch_size 2 \
--num_workers 2 \
--classifier_lr 1e-4 \
--wav2vec2_lr 1e-5 \
--max_epochs 3 \
--accelerator gpu
--grad_clip 1.0
--data_dir [DATA_DIR]
--ckpt_dir [CKPT_DIR]
where:
DATA_DIR
: The directory that contains extracted dataCKPT_DIR
: The directory that checkpoint would be saved
Please view this notebook