Abstract:
Humans are precise in recognizing natural languages and responding contextually unlike machines. However, speech recognition or Automatic speech recognition often refers to converting human speech or voice to textual information with the help of artificial intelligence algorithms. With the advancement of Artificial Intelligence technologies and extensive research being conducted in AI, speech recognition has received much attention and has emerged as a subset of Natural Language Processing where the advancement and accuracy in speech recognition will open many ways to provide a high standard of human-computer interaction. In this study, using the pre-trained transformer model with a transfer learning approach, the English to Python dataset was used to train the transformer model to produce syntactically correct source code in python. Additionally, the Word2Vec model was used to generate voice-to-text as input for the model. For the purpose of demonstration, a custom Python IDE is developed to generate source code from voice input. The results and findings suggest that in the transformer model, with the use of transfer learning, any dataset can be trained to produce syntactically correct source code. The model’s training loss and validation loss were below 5 and 2.1, respectively. Future research can focus on generating valid source code from any human spoken language without restricting it to English only.