This repository contains files related to running ASR training to post-processing the ASR transcripts using spelling correction. Follow the files below to understand the whole process.
Finetuning wav2vec tutorial
: https://huggingface.co/blog/fine-tune-wav2vec2-englishData Preparation
folder:asr_testing_jonatas.ipynb
: Collab script with ASR testing with model available in research community (jonatasgrosman)asr_testing_jonatas.py
: Python script for the asr_testing_jonatas.ipynb
fileasr_testing_lm.py
: Python script with ASR testing with language modelcorrection_algo_prep.py and correction_data_demo
: base data preparation file and demo file for data_prep_spell_correction.py
filedata_prep_spell_correction.py
: data preparation for spelling correctionoutput_og.csv and output.csv
: datasets for ASR trainingAll files can be found inside the Data Preparation
folder.
Create a virtual environment and install the requirements.txt file for all the libraries. Please make sure that the Python version is between 3.7 to 3.10. Some libraries are not compatible yet with the higher versions.
Inside the virtual environment, run the file data_prep_spell_correction.py
.
The way the code is setup, the Torgo audio files are accessed from content/downloads/Torgo. Please make sure to download the Torgo speakers locally or mount in Google Drive if running on Google Collab.
There are two types of files:
speaker_ID.json
represents the transcripts for the specific speakerID_other_speakers.json
represents the transcripts for all the speakers except for the speaker ID mentioned in the file name.The script for machine translation can be found in the Machine Translation
folder
Files inside the folder:
Machine_Translation_F01.ipynb
: script with all the training, evaluation and testing code for speaker F01Spell_Correction_Training_Script_Machine_Translation.ipynb
: script for training the machine translation modelSpell_Correction_Evaluation_and_Testing_Script_Machine_Translation.ipynb
: script for testing the machine translation modelmachine_translation_tutorial.ipynb
: script for machine translation tutorial from HuggingFaceLinks:
All the Spelling correction models are available on Huggingface under Monideep Chakraborti's repository (https://huggingface.co/monideep2255)