Package: okwugbe
OkwugbeAutomatic Speech Recognition Library for (low-resource) African LanguagesMotivationOur aim is to foster ASR for African languages by making the whole process--from dataset gathering and preprocessing to training--as easy as possible. This library follows our workOkwugbéon ASR for Fon and Igbo. Based on the architecture of the network described in our
paper, it aims at easing the training process of ASR for other languages.
The primary targets are African languages, but it supports other languages as wellUsagepip install okwugbe#Import the trainer instancefromtrain_evalimportTrain_Okwugbetrain_path='/path/to/training_file.csv'test_path='/path/to/testing_file.csv'characters_set='/path/to/character_set.txt'"""/path/to/training_file.csv and /path/to/testing_file.csv are meant to be csv files with two columns:the first one containing the full paths to audio wav filesthe second one containing the textual transcription of audio contents"""#Initialize the trainer instancetrain=Train_Okwugbe(train_path,test_path,characters_set)#Start the trainingtrain.run()ParametersHere are the parameters for the package, as well as their default values.The default values have been chosen so that you only have to make minimal changes to get a good ASR model going.ParameterDescriptiondefaultuse_common_voiceWhether or not to use common voiceFalselanglanguage to use from Common Voice. Must be specified ifuse_common_voiceis set to True.Nonernn_dimRNN Dimension & Hidden Size512num_layersNumber of Layers1n_cnnNumber of CNN components5n_rnnNumber of RNN components3n_featsNumber of features for the ResCNN128in_channelsNumber of input channels of the ResCNN1out_channelsNumber of output channels of the ResCNN32kernelKernel Size for the ResCNN3strideStride Size for the ResCNN2paddingPadding Size for the ResCNN1dropoutDropout (kept unique for all components)0.1with_attentionTrue to use attention mechanism, False elseFalsebatch_multiplierBatch multiplier for Gradient Accumulation)1 (no Gradient Accumulation)grad_accGradient Accumulation OptionFalsemodel_pathPath for the saved model'./okwugbe_model'characters_setPath to the .txt file containing unique charactersrequiredvalidation_setValidation set size0.2train_pathPath to training setrequiredtest_pathPath to testing setrequiredlearning_rateLearning rate3e-5batch_sizeBatch Size20patienceEarly Stopping Patience20epochsTraining epochs500optimizerOptimizer'adamw'freq_maskfrequency masking (for speech augmentation)30time_masktime masking (for speech augmentation)100display_plotwhether or not to plot metrics during trainingTrueIntegration with Common VoiceeYou easily train onCommon Voicedata set with Okwugbe by specifyinguse_common_voice=Trueand settinglangto the language code of your choice. This language must be hosted on Common Voice.#Initialize the trainer instancetrain=Train_Okwugbe(use_common_voice=True,lang='mn')# for mongolian#Start the trainingtrain.run()Here is the list of our current supported languages in Common Voice.ttendefrcybrcvtrkyga-IEkabcazh-TWslitnlcnheoetfapteueszh-CNmnsahdvrwsv-SEruidartaialvjavotabzh-HKrm-sursilvtatarenglishgermanfrenchwelshbretonchuvashturkishkyrgyzirishkabylecatalantaiwaneseslovenianitaliandutchhakha chinesperantoestonianpersianportuguesebasquespanishchinesemongoliansakhadhivehikinyarwandaswedishrussianindonesianarabictamilinterlingualatvianjapanesevoticabkhazcantoneseromansh sursilvanTutorialson using OkwuGbeon using OkwuGbe with Common VoiceASR Data for African languagesWondering where to find dataset for your African language? Here are some resources to check:OpenSLRMozilla Common VoiceAfricaNLP-Public-DatasetsDebuggingis strictly for debugging!CitationPlease cite our paper using the citation below if you use our work in anyway:@inproceedings{dossou-emezue-2021-okwugbe,
    title = "{O}kwu{G}b{\'e}: End-to-End Speech Recognition for {F}on and {I}gbo",
    author = "Dossou, Bonaventure F. P.  and
      Emezue, Chris Chinenye",
    booktitle = "Proceedings of the Fifth Workshop on Widening Natural Language Processing",
    month = nov,
    year = "2021",
    address = "Punta Cana, Dominican Republic",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.winlp-1.1",
    pages = "1--4",
    abstract = "Language is a fundamental component of human communication. African low-resourced languages have recently been a major subject of research in machine translation, and other text-based areas of NLP. However, there is still very little comparable research in speech recognition for African languages. OkwuGb{\'e} is a step towards building speech recognition systems for African low-resourced languages. Using Fon and Igbo as our case study, we build two end-to-end deep neural network-based speech recognition models. We present a state-of-the-art automatic speech recognition (ASR) model for Fon, and a benchmark ASR model result for Igbo. Our findings serve both as a guide for future NLP research for Fon and Igbo in particular, and the creation of speech recognition models for other African low-resourced languages in general. The Fon and Igbo models source code have been made publicly available. Moreover, Okwugbe, a python library has been created to make easier the process of ASR model building and training.",
}```