Skip to content

AntonNuzhdin/deepspeech2

Repository files navigation

Automatic Speech Recognition (ASR) with PyTorch

AboutInstallationHow To UseCreditsLicense

WanDB report

About

This repo is my own implementation of DeepSpeech2 ASR model

Installation

Follow these steps to install the project:

  1. Create and activate new environment using conda.

    a. conda version:

    # create env
    conda create -n asr python=3.11
    
    # activate env
    conda activate asr
  2. Install all required packages

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

    pre-commit install
  4. Dowload model weights:

    cd deepspeech2
    
    python download.py

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

To evaluate WER and CER on your predictions, simply run

python wer_cer_calculation.py --dir_path_gt <Path to ground truth folder with .txt> --dir_path_pred <Path to dir with predicions>

Credits

This repository is based on a PyTorch Project Template.

License

License

About

my own implementation of Conformer ASR model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages