About • Results • Installation • How To Use • Demo • Credits • License
This repository contains Homework 1 of HSE DLA course.
Homework was solved using Conformer based model, in particular it's small version. Model was trained on train-clean-100 partition of Librespeech Dataset, CometML report of training - report.
| Metric | test-clean | test-other |
|---|---|---|
| Argmax WER | 40.04 | 67.2 |
| Argmax CER | 13.46 | 30.73 |
| BeamSearch WER | 39.57 | 65.03 |
| BeamSearch CER | 12.67 | 29.09 |
Follow these steps to install the project:
-
(Optional) Create and activate new environment using
condaorvenv(+pyenv).a.
condaversion:# create env conda create -n project_env python=PYTHON_VERSION # activate env conda activate project_env
b.
venv(+pyenv) version:# create env ~/.pyenv/versions/PYTHON_VERSION/bin/python3 -m venv project_env # alternatively, using default python version python3 -m venv project_env # activate env source project_env/bin/activate
-
Install all required packages
pip install -r requirements.txt
-
Install
pre-commit:pre-commit install
To run inference you should download pretrained model from HuggingFace using:
huggingface-cli download artem1085715/conformer-small --local-dir DIR_TO_SAVE_MODELThere you can you use either best by WER model model_best.pth or last training checkpoint checkpoint-epoch50.pth
To train a model, run the following command:
python3 train.py -cn=CONFIG_NAME HYDRA_CONFIG_ARGUMENTSWhere CONFIG_NAME is a config from src/configs and HYDRA_CONFIG_ARGUMENTS are optional arguments.
To run inference (evaluate the model or save predictions):
python3 inference.py HYDRA_CONFIG_ARGUMENTSYou can also see Demo notebook with full installation and usage processes
This repository is based on a PyTorch Project Template.