SlangLab-NU / torgo_inference

0 stars 2 forks source link

Torgo_Testing/Torgo Inference:

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.

General Guidelines:

Automatic Speech Recognition Training:

  1. Basic understanding of wav2vec2 (will need to have a Huggingface and Google Collab account):
  2. Work with Torgo dataset:
  3. Adding a language model: https://colab.research.google.com/drive/1AIgP6lc7BZTDrlU5yu83R05QDesWv4mw
  4. All the ASR models are available on Huggingface under Ian Yip's repository (https://huggingface.co/yip-i)

Files inside the Data Preparation folder:

Running the script to prepare data for spelling correction using machine translation techniques:

  1. All files can be found inside the Data Preparation folder.

  2. 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.

  3. Inside the virtual environment, run the file data_prep_spell_correction.py.

  4. 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.

    • Need to create a folder called content to store the Torgo files
  5. There are two types of files:

    • speaker_ID.json represents the transcripts for the specific speaker
    • ID_other_speakers.json represents the transcripts for all the speakers except for the speaker ID mentioned in the file name.

Spelling correction using machine translation techniques:

  1. The script for machine translation can be found in the Machine Translation folder

  2. Files inside the folder:

    • Machine_Translation_F01.ipynb: script with all the training, evaluation and testing code for speaker F01
    • Spell_Correction_Training_Script_Machine_Translation.ipynb: script for training the machine translation model
    • Spell_Correction_Evaluation_and_Testing_Script_Machine_Translation.ipynb: script for testing the machine translation model
    • machine_translation_tutorial.ipynb: script for machine translation tutorial from HuggingFace
  3. Links:

  4. All the Spelling correction models are available on Huggingface under Monideep Chakraborti's repository (https://huggingface.co/monideep2255)