Logo Lanfrica

yonas-g/Kinyarwanda_ASR

Domaine:

natural language processing

Type de record:

model
Créateur:
yon
Hôte:
# Kinyarwanda STT, Fairforward AI ## Monolingual Data Preparation - Convert the mp3 files to wav with sample rate of 16000 - Prepare JSON manifest file for NeMo training - clean the characters - remove audio files with word rate greater than 3 ## Multilinguage Data Creation Please refere to this link ## Tokenization NeMo provides a code to get the tokens as follows ```shell python ${NEMO_ROOT}/scripts/tokenizers/process_asr_text_tokenizer.py \ --manifest=dev_decoded_processed.json,train_decoded_processed.json \ --vocab_size=1024 \ --data_root=tokenizer_bpe_maxlen_4 \ --tokenizer="spe" \ --spe_type=bpe \ --spe_character_coverage=1.0 \ --spe_max_sentencepiece_length=4 \ --log ``` ## Tarring To make the training faster, we can tar the dataset. This creates a new data where the sample are concatenated. Please refer to the link attached below for more information on how to tar your dataset ## Training One the preprocessing and tokenization is done, we can train our model as follows ```shell TOKENIZER=tokenizers/tokenizer_spe_bpe_v1024_max_4/ TRAIN_MANIFEST=data/train_tarred_1bk/tarred_audio_manifest.json TRAIN_FILEPATHS=data/train_tarred_1bk/audio__OP_0..1023_CL_.tar VAL_MANIFEST=data/dev_decoded_processed.json TEST_MANIFEST=data/test_decoded_processed.json python ${NEMO_ROOT}/examples/asr/asr_ctc/speech_to_text_ctc_bpe.py \ --config-path=../conf/conformer/ \ --config-name=conformer_ctc_bpe \ exp_manager.name="Some name of our experiment" \ exp_manager.resume_if_exists=true \ exp_manager.resume_ignore_no_checkpoint=true \ exp_manager.exp_dir=results/ \ model.tokenizer.dir=$TOKENIZER \ model.train_ds.is_tarred=true \ model.train_ds.tarred_audio_filepaths=$TRAIN_FILEPATHS \ model.train_ds.manifest_filepath=$TRAIN_MANIFEST \ model.validation_ds.manifest_filepath=$VAL_MANIFEST \ model.test_ds.manifest_filepath=$TEST_MANIFEST ``` The scripts used for training the model are found under run scripts. ### Finetuning pretrained model To finetune the available model, you'v …