About • Installation • How To Use • Credits • License
This repository contains a solution for solving ASR task with PyTorch
See the task assignment here.
Follow these steps to install the project:
-
(Optional) Create and activate new environment using
conda.a.
condaversion:# create env conda create -n hifi_gan python=3.11 # activate env conda activate hifi_gan
-
Install all required packages
pip install uv uv sync
-
Install
pre-commit:pre-commit install
To download models checkpoints and test dataset run following:
!uv run scripts/download_gdrive.py
To train best model, run the following commands:
uv run train.py HYDRA_CONFIG_ARGUMENTS -cn=train_clean_360_1and then to finetune afterwards:
uv run train.py +trainer.from_pretrained=PREV_CHECKPOINT OTHER_HYDRA_CONFIG_ARGUMENTS -cn=train_other_500_2To evaluate the model run:
!uv run inference.py \
inferencer.from_pretrained={model_path} text_encoder=CTCEncoder \
inferencer.save_path={output_dir} text_encoder.beam_size=100 \
-cn=inference_all_metricsTo save predictions run:
!uv run inference.py dataloader=onebatchtest \
inferencer.dataset_dir={dataset_dir} \
inferencer.from_pretrained={model_path} \
inferencer.save_path={gt_name} \
text_encoder=CTCEncoder -cn=inference
This repository is based on a PyTorch Project Template.