All the code for my thesis on improving speech recognition systems for children. I am currently working on using Facebook AI's wav2vec 2.0.
Steps for kaldi: Make sure kaldi is installed first before proceeding.
- Download all the required datasets
- In
s5/run.shmodify [DATASET NAME]_ROOT to point to the main directory of the dataset ./run.shThis will build the HMM-GMM model- After completed successfully run
local/nnet3/run_tdnn_delta.shfor the TDNN model THe scripts5/clean.shwill remove file created from s5/run.sh so that you can train the models again.
Steps for wav2vec 2.0: [WIP] Make sure PyTorch and fairseq are installed first before proceeding.
- In
s5/wav2vec_projectsrun the variousrun_*scripts.
Install Kaldi: Refer to: https://kaldi-asr.org/doc/tutorial_setup.html
git clone https://github.com/kaldi-asr/kaldi.git- Look at the
kaldi/INSTALLfile and follow the instructions there - Download SRILM by running
kaldi/tools/install_srilm.sh
Install PyTorch & fairseq PyTorch: https://pytorch.org/get-started/locally/ fairseq: https://www.folio3.ai/blog/fairseq/
Initialising katana:
To execute the steps using the supercomputer katana.
- In Windows PuTTY: use host name = katana1.restech.unsw.edu.au and log in using zID and password
In Linux:
ssh zID@katana1.restech.unsw.edu.auin terminal. Or, use the aliaskatana. - Create a new screen using
screen -S nameOfSession(the screen I'm using is called 'thesis') - Request an interactive GPU node using
qsub -I -l select=1:ngpus=1:ncpus=8:mem=46gb,walltime=12:00:00. Once the node is ready, you are now in the node. The terminal will show (zID@kxxx), where kxxx is your node. - Now you are inside the screen, and inside the GPU node. Run whatever process you need.
- To load modules and go inside the thesis virtual environment, run
startup.sh
Note: If there is an error message saying Permission Denied when running a script, use chmod u+x -R /path/to/directory to change the permissions of all the files in the directory so that you have permission to execute.
To install any python packages not in katana, use a virtual environment: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
The virtual environment I am using currently is kaldi/egs/renee_thesis/thesis_env source thesis_env/bin/activate
To list all the packages in this virtual environment use pip list
Connecting to GitHub
-
To start a new git repository follow the instructions here: https://kbroman.org/github_tutorial/pages/init.html
-
When ready to push changes:
git add -AAdds all filesgit commit -m "Commit message here"Commits changes with a messagegit push origin masterPushes changes -
If there are
Permission Deniederrors follow the instructions here: https://gist.github.com/adamjohnson/5682757 -
To check the status use
git status
Leaving katana Asumming you are inside a screen, and inside a requested GPU node.
CtrlA Dto detach from the screen session.exitto logout of the katana session.
Returning to katana
ssh zID@katana1.restech.unsw.edu.auin terminal. Or, use the aliaskatana.- Go back to your screen
screen -r nameOfSessioneg. screen -r ogi
Useful katana screen things
- To create a new window (tab) within a screen, use
CtrlA C - To go to next and previous windows, use
CtrlA NandCtrlA Prespectively. - To check if you are in a screen, type the command
echo $TERM - To list your screen, type command
screen -list - To detach a screen remotely, find the screen name using
screen -listand thenscreen -d [name of screen]
Bash things
- Create aliases in
~./bashrcby editing~./bashrcand then runningsource ~./bashrc: https://linuxize.com/post/how-to-create-bash-aliases/ - Current aliases:
t2renee_thesist2chacmod - Screen tabs: https://unix.stackexchange.com/questions/26248/tabs-when-using-screen/319364