Code Monkey home page Code Monkey logo

dla_project1's Introduction

ASR project

Installation guide

First of all you need to download the repository:

git clone https://github.com/retir/dla_project1
cd dla_project1

Then install necessary dependencies:

pip install -r ./requirements.txt
pip install https://github.com/kpu/kenlm/archive/master.zip

If you want to use pretrained model, you can load it as follow:

python3 downloader.py

Нou can download only the files you need by listing them via , in flag --files (as example --files='bpe_token_500,arpa_5_gram'). Also you can rewrite already loaded files using flag --hard, in other case loading such a files will be skipped.

To calculate metrics use follows:

python3 calc_metr.py -r path/to/model.pt -c path/to/config.json

where model.pt means pretrained model, and config.json is a config with datasets, metrics and beam search parameters in it (you can find example at hw_asr/configs/eval.json). It is necessary that the folder with the model contains the config.json file - the config on which the model was trained.

Pretrained model from downloader.py was learnd with config deepspeech.json (hw_asr/configs/deepspeech.json). To learn model use follow:

python3 train.py -c path/to/config.json

You can find more detailed report about experiments at wandb report

Credits

This repository is based on a heavily modified fork of pytorch-template repository.

Docker

You can use this project with docker. Quick start:

docker build -t my_hw_asr_image . 
docker run \
   --gpus '"device=0"' \
   -it --rm \
   -v /path/to/local/storage/dir:/repos/asr_project_template/data/datasets \
   -e WANDB_API_KEY=<your_wandb_api_key> \
	my_hw_asr_image python -m unittest 

Notes:

  • -v /out/of/container/path:/inside/container/path -- bind mount a path, so you wouldn't have to download datasets at the start of every docker run.
  • -e WANDB_API_KEY=<your_wandb_api_key> -- set envvar for wandb (if you want to use it). You can find your API key here: https://wandb.ai/authorize

dla_project1's People

Contributors

retir avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.