Skip to content

7embl4/asr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic Speech Recognition (ASR) with PyTorch

AboutResultsInstallationHow To UseDemoCreditsLicense

About

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.

Results

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

Installation

Follow these steps to install the project:

  1. (Optional) Create and activate new environment using conda or venv (+pyenv).

    a. conda version:

    # 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
  2. Install all required packages

    pip install -r requirements.txt
  3. Install pre-commit:

    pre-commit install

Pretrained Model

To run inference you should download pretrained model from HuggingFace using:

huggingface-cli download artem1085715/conformer-small --local-dir DIR_TO_SAVE_MODEL

There you can you use either best by WER model model_best.pth or last training checkpoint checkpoint-epoch50.pth

How To Use

To train a model, run the following command:

python3 train.py -cn=CONFIG_NAME HYDRA_CONFIG_ARGUMENTS

Where 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_ARGUMENTS

Demo

You can also see Demo notebook with full installation and usage processes

Credits

This repository is based on a PyTorch Project Template.

License

License

About

ASR Homework Of HSE DLA Course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors