About • Installation • How To Use • Credits • License
This repo is my own implementation of DeepSpeech2 ASR model
Follow these steps to install the project:
-
Create and activate new environment using
conda
.a.
conda
version:# create env conda create -n asr python=3.11 # activate env conda activate asr
-
Install all required packages
cd deepspeech2 pip install -r requirements.txt
-
Install
pre-commit
:pre-commit install
-
Dowload model weights:
cd deepspeech2 python download.py
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>
This repository is based on a PyTorch Project Template.