# An Automatic Pronunciation Error Detection and Correction Mechanism in English Teaching Based on an Improved Random Forest Model

Authors: Yuhua Dai
Journal: Journal of Electrical and Computer Engineering
 (2022)

---

## Abstract

Teachers in traditional English classes focus more on writing and grammar instruction, while oral language instruction is neglected. In exam-oriented education, most Chinese students can master English written test skills, but only a few students can communicate effectively in English daily. People are progressively realizing that language is a tool for communication and communication in recent years, as the frequency of international exchanges has increased and that language learning should focus on oral language education. However, there are numerous issues with teaching oral English. When students perform individual oral practice after class, for example, they are unable to determine whether their pronunciation is correct. As a result, a computer-assisted study into automatic pronunciation of spoken English has become a viable solution to these issues. However, the present spoken English pronunciation mistake correction model’s accuracy and stability have not yet reached an optimal level. Based on this background, this work provides an enhanced random forest model and uses it to detect and correct automatic pronunciation errors in English classes. The improved random forest (RF) algorithm is used to classify and detect whether the learner’s pronunciation is correct. Mel cepstral coefficient (MFCC) is used for feature extraction, and principal component analysis (PCA) is used for dimensionality reduction of feature data. The experimental structure demonstrates that by using a combination classification framework based on MFCC, PCA, and RF, the learner’s pronunciation difficulty may be resolved. This allows for different error categories to receive feedback corrections.


---

## Body

## 1. Introduction

With the growing trend of globalization, English, as the most widely used language, has gotten a lot of attention. Every student in English learning must do a lot of oral practice, which is an essential part of developing oral ability. Simultaneously, during the practice process, there must be timely and appropriate corrective feedback. Chinese students usually practice their pronunciation by listening to a recording, reading it, and imitating it, such as by using a widely used language repeater. Because students received no feedback during the practice period, it was difficult to determine the relationship between the machine’s speech and the students’ reading. Even with teachers’ guidance, it is difficult in the classroom to provide real-time and accurate guidance to students’ voices, so that students can immediately understand where the problem lies. As a result, there is an urgent need for beneficial and convenient tools that can effectively assist learners. Computer-aided teaching has become an important aspect of the application of modern educational technology in the field of education as a result of the development and popularization of computer technology. Many computer-aided language learning software programs currently focus on training language application ability and pronunciation comprehension ability. Relatively speaking, little attention has been paid to the training of verbal skills of language. The learning of spoken language is generally divided into two parts: grammar, structure, idioms, and so on, and pronunciation. Only correct pronunciation can assist users in correctly expressing their opinions. As a result, oral language learning is primarily manifested in the acquisition of pronunciation. Speech recognition technology’s ongoing maturation can effectively assist learners in pronouncing correctly and fluently.Students who want their pronunciation to be corrected by non-native speakers must spend excessive tuition rates if there are no smart goods available. Automated pronunciation error detection and correction systems have been developed as a result of the surge in popularity of online language learning on the Internet. Pronunciation aids are few and far between now, and those that do exist tend to have basic features. The technology plays the recording first, and then, the student reads the audio and video learning materials. In terms of speech recognition software, there are only a few options. In order to meet the most pressing concerns of oral language learners, these products’ feedback functions are woefully inadequate. An important aspect of the automatic method for detecting and correcting pronunciation errors is the speed and efficiency with which students can identify and rectify their own pronunciation issues. With the popularity of the Internet electronic teaching method in recent years, a real-time and efficient automatic pronunciation error detection and correction system is being researched using the Internet electronic teaching method. This is critical for improving the quality of English learners’ oral pronunciation and hastening the transformation and upgrading of English teaching methods. The computer-assisted language instruction system [1, 2] inspired automatic pronunciation error detection, and the computer-aided pronunciation training (CAPT) system is an important component of the computer-assisted language learning system. The CAPT system’s main modules are oral language assessment, pronunciation error detection, and corrective feedback. The two core modules of the CAPT system are automatic pronunciation error detection and correction feedback. Hamada was one of the first researchers to investigate automatic pronunciation error detection. In Reference [3], it used vector quantization (VQ) and dynamic time warping (DTW) methods to detect pronunciation errors. Its research was able to quantify the degree of distinction between standard and nonstandard pronunciation of individual words. In general, the current state of research at home and abroad can be divided into two categories: linguistic knowledge, discriminative feature method, and statistical speech recognition method based on pronunciation error detection.The L1-L2MAP tool was invented in 2001 in Reference [4], taking advantage of differences in phoneme pronunciation between different language families. The tool requires manual phoneme data input and generates a list of expected pronunciation errors based on that data. When a learner is learning Norwegian, the error list is used to detect possible pronunciation errors. Reference [5] investigated common phonemic errors in Vietnamese and English pronunciation in 2005. Reference [6] investigated the discriminative characteristics of flat tongue and warped tongue in Chinese in 2006. The results show that the spectral energy peak segments differ significantly between them. According to existing research, the pronunciation error detection method based on linguistics and discriminative features performs well in the error detection of language learners from various language families. This is primarily due to the common errors made by learners when learning a second language, which are caused by large pronunciation differences between regions and languages. These types of errors are extremely rare. When using this method to detect pronunciation issues, learners must create a library of error types and include the expected error types in the library. However, due to the uncertainty of pronunciation error types, the error type library established by the pronunciation error detection method based on discriminative features cannot cover all types of the same pronunciation error, and generalization to the detection of all phonemes is extremely difficult.With the advancement of speech recognition technology in recent years, its application in language learning has received a lot of attention. The confidence levels derived by the speech recognition system based on hidden Markov models are used to detect pronunciation errors at the phoneme level (HMM). For example, Reference [7] has begun to investigate various types of confidence. The most well known is Witt’s Goodness of Pronunciation (GOP) [8]. HMM is used in this study to train native speaker pronunciation data. The other is a forced alignment-based extended recognition network method [9]. The basic idea behind this method is to first extend the phoneme recognition network by including common pronunciation error patterns and then build a pronunciation error extension recognition network with two sets of phoneme-based acoustic models. The first is about the native language, and the second is about the non-native language, and you can convert between them. Furthermore, Reference [10] improved the extended recognition network further in 2010. The improved method, in addition to identifying pronunciation errors during language learning, also supports diagnostic feedback for pronunciation errors. Deep learning techniques have also been used in speech recognition [11]. Reference [12] overcomes the difficulties encountered by existing extended recognition networks by employing a multidistributed neural network for pronunciation error detection and diagnostic feedback. Reference [13] investigated the use of a deep learning framework for automatic speech scoring, constructing an ASR system from a large corpus of English with non-native vocabulary words over the course of 800 hours. Reference [14] investigated the use of DNN-based speech feature modeling in the detection of pronunciation errors in order to improve error detection accuracy. Reference [15] compared and summarized the advantages and disadvantages of several different methods currently used in pronunciation error detection systems in the second year. These methods are as follows: the GOP algorithm, the decision tree algorithm, the linear discriminant analysis method with acoustic-speech features, and the linear discriminant analysis method with MFCC. A multilingual learning method was proposed in Reference [16] in 2016. Multilingual and multitask learning methods produce good results in native speech attribute classification and non-native speech pronunciation error detection.We discovered that the accuracy of pronunciation error correction and the timeliness of feedback need to be improved after reviewing related research on automatic pronunciation error detection. However, current research frequently focuses on one aspect while ignoring the other. This study will investigate how to improve the accuracy of pronunciation error correction as well as the timeliness of error correction feedback. Based on these constraints, this article proposes an improved random forest algorithm for detecting and correcting errors in spoken English pronunciation. The improved RF optimizes RF parameter optimization by incorporating the firework algorithm, which is combined with an improved MFCC feature extraction method. The experimental results show that the method used in this paper can improve the rate of pronunciation error detection, which is useful for pronunciation correction during the English teaching process.


## 2. Background Knowledge of Speech Recognition

### 2.1. Speech Production and Mathematical Expression

The human vocal organ is divided into three sections: the larynx, the vocal tract, and the mouth. The vocal tract is the transmission channel that connects the throat to the mouth or nasal cavity and then radiates outward from the mouth or nostrils. Air normally enters the lungs via the normal breathing mechanism. When gas is expelled from the lungs via the trachea, the vocal cords in the tense larynx are affected by the airflow and vibrate. The airflow also produces a quasiperiodic pulse that is tuned to a specific frequency as it passes through the pharynx, oral cavity, and even the nasal cavity. Different sounds are produced as a result of the different positions of the vocal organs, such as the jaw, tongue, and lips. As a result, during the human pronunciation process, the lungs and their associated muscle excitation sources pass through various articulator filters to produce the final sound. This process can correspond to spectral signals one to one. Figure1 depicts the specific relationship.Figure 1
Correspondence between pronunciation process and spectrum.The speech signal can be viewed as the output of a linear time-varying system excited by random noise and a quasiperiodic pulse sequence and passing through a filter from the standpoint of signal processing. The mathematical model of the speech signal is obtained using this method, as shown in Figure2.Figure 2
Mathematical expression of the pronunciation process.


### 2.2. Features of English Pronunciation

Voice is distinct from sound in that it is the sound of people communicating information to one another and is an audio form of language. As a result, speech is a synthesis of acoustics and language. English phonetics can be defined as follows based on the above analysis. It is a series of sounds that make up the English sound. As a sound wave, English speech contains Tmber, Pitch, Intensity, and Length. Tmber is the content of the sound, which is the primary feature that distinguishes one sound from another. Pitch is the level of sound that is determined by the frequency of the sound waves. Intensity is the strength of the sound, which is determined by the vibration amplitude of the sound wave. The length of the sound is referred to as length, and it is determined by how long it takes to pronounce.Languages each have their own characteristics. In spoken English, a sentence is delivered all at once. Each sentence has a distinct emphasis and is clearly perceived as a speech segment known as a syllable. A syllable can be made up of one or more Phonemes. The smallest unit of English pronunciation is the phoneme. Phonemes are classified into two types: vowels and consonants. The former is that when sound air flow from the vibration of the vocal cords enters the oral cavity and exits from the lip cavity via the larynx cavity and pharynx cavity, these acoustic cavities are completely open and the air flow flows smoothly. This open sound is known as a vowel. The latter is the exhalation sound flow. Because a portion of the passage is closed or blocked, airflow is obstructed and cannot be restored, and the phoneme produced by overcoming the obstruction of the vocal organ is referred to as consonant. The vibration of the vocal cords when making consonants determines whether a consonant is voiced or unvoiced. Vocal cords vibrate in response to voiced sounds but not in response to unvoiced sounds. Although the vocal tract is essentially unobstructed for some phonemes, the vocal tract is relatively narrow somewhere, resulting in a slight fricative known as a semi-vowel. Vowels are the subject of a syllable, and they take up most of a syllable in terms of length and energy. Consonants appear only at the beginning, end, or both ends of syllables, and their duration and energy are low in comparison with vowels. Figure3 depicts the author’s pronunciation waveform for the word “North.” We can see that the vowel part is the most important part of the syllable, and its speech waveform part is a regular vibration, whereas the consonant part’s speech waveform is chaotic.Figure 3
The pronunciation waveform of the word North.


### 2.3. Speech Signal Processing Method

There are many categories of speech recognition systems based on different classifications, such as isolated word or continuous speech recognition, speaker-specific and speaker-nonspecific speech recognition, small, medium, large, and unlimited vocabulary speech recognition systems. Wait. Despite their differences in classification, speech recognition systems in practical applications all include key modules such as speech signal analysis, feature extraction, language model creation, acoustic model training, and recognition process. The success of application system identification is directly affected by the realization of each functional module. Figure4 depicts the speech recognition framework.Figure 4
Speech recognition framework.The foundation of speech signal processing is speech signal analysis. First and foremost, the parameters that can represent the essential characteristics of the speech signal must be analyzed, and these parameters must then be used for efficient recognition processing. The effect of speech recognition is directly affected by the quality of speech signal processing. Speech signal analysis is the process of preprocessing a speech signal using an effective method, converting it into a signal form that can be extracted by a computer system and finally obtaining the extraction result of the speech signal feature sequence.The speech signal is a time-domain signal, and its time-domain waveform changes dramatically over time, resulting in a sawtooth shape on the waveform diagram. In modern speech recognition technology, the most used processing method is to truncate such signals in the effective time domain of the signal using different window functions such as rectangular window, Hanning window, and hamming window and then process them in segments to analyze the speech segment by segment. The signal’s characteristic parameters. The goal is to fully exploit the speech signal’s short-term stationary effect, and the characteristic parameters in each relatively stationary signal tend to be stable, making it easier for the system to analyze and extract these characteristic parameters. There is frequency-domain analysis of speech signals in addition to time-domain analysis. The use of frequency-domain analysis can effectively reduce the influence of noise in speech signals while also improving the accuracy of feature parameter analysis and extraction. To summarize, whether performing time-domain or frequency-domain analysis, accurate analysis of speech signals can be performed first in order to achieve efficient extraction of feature parameters.


## 2.1. Speech Production and Mathematical Expression

The human vocal organ is divided into three sections: the larynx, the vocal tract, and the mouth. The vocal tract is the transmission channel that connects the throat to the mouth or nasal cavity and then radiates outward from the mouth or nostrils. Air normally enters the lungs via the normal breathing mechanism. When gas is expelled from the lungs via the trachea, the vocal cords in the tense larynx are affected by the airflow and vibrate. The airflow also produces a quasiperiodic pulse that is tuned to a specific frequency as it passes through the pharynx, oral cavity, and even the nasal cavity. Different sounds are produced as a result of the different positions of the vocal organs, such as the jaw, tongue, and lips. As a result, during the human pronunciation process, the lungs and their associated muscle excitation sources pass through various articulator filters to produce the final sound. This process can correspond to spectral signals one to one. Figure1 depicts the specific relationship.Figure 1
Correspondence between pronunciation process and spectrum.The speech signal can be viewed as the output of a linear time-varying system excited by random noise and a quasiperiodic pulse sequence and passing through a filter from the standpoint of signal processing. The mathematical model of the speech signal is obtained using this method, as shown in Figure2.Figure 2
Mathematical expression of the pronunciation process.


## 2.2. Features of English Pronunciation

Voice is distinct from sound in that it is the sound of people communicating information to one another and is an audio form of language. As a result, speech is a synthesis of acoustics and language. English phonetics can be defined as follows based on the above analysis. It is a series of sounds that make up the English sound. As a sound wave, English speech contains Tmber, Pitch, Intensity, and Length. Tmber is the content of the sound, which is the primary feature that distinguishes one sound from another. Pitch is the level of sound that is determined by the frequency of the sound waves. Intensity is the strength of the sound, which is determined by the vibration amplitude of the sound wave. The length of the sound is referred to as length, and it is determined by how long it takes to pronounce.Languages each have their own characteristics. In spoken English, a sentence is delivered all at once. Each sentence has a distinct emphasis and is clearly perceived as a speech segment known as a syllable. A syllable can be made up of one or more Phonemes. The smallest unit of English pronunciation is the phoneme. Phonemes are classified into two types: vowels and consonants. The former is that when sound air flow from the vibration of the vocal cords enters the oral cavity and exits from the lip cavity via the larynx cavity and pharynx cavity, these acoustic cavities are completely open and the air flow flows smoothly. This open sound is known as a vowel. The latter is the exhalation sound flow. Because a portion of the passage is closed or blocked, airflow is obstructed and cannot be restored, and the phoneme produced by overcoming the obstruction of the vocal organ is referred to as consonant. The vibration of the vocal cords when making consonants determines whether a consonant is voiced or unvoiced. Vocal cords vibrate in response to voiced sounds but not in response to unvoiced sounds. Although the vocal tract is essentially unobstructed for some phonemes, the vocal tract is relatively narrow somewhere, resulting in a slight fricative known as a semi-vowel. Vowels are the subject of a syllable, and they take up most of a syllable in terms of length and energy. Consonants appear only at the beginning, end, or both ends of syllables, and their duration and energy are low in comparison with vowels. Figure3 depicts the author’s pronunciation waveform for the word “North.” We can see that the vowel part is the most important part of the syllable, and its speech waveform part is a regular vibration, whereas the consonant part’s speech waveform is chaotic.Figure 3
The pronunciation waveform of the word North.


## 2.3. Speech Signal Processing Method

There are many categories of speech recognition systems based on different classifications, such as isolated word or continuous speech recognition, speaker-specific and speaker-nonspecific speech recognition, small, medium, large, and unlimited vocabulary speech recognition systems. Wait. Despite their differences in classification, speech recognition systems in practical applications all include key modules such as speech signal analysis, feature extraction, language model creation, acoustic model training, and recognition process. The success of application system identification is directly affected by the realization of each functional module. Figure4 depicts the speech recognition framework.Figure 4
Speech recognition framework.The foundation of speech signal processing is speech signal analysis. First and foremost, the parameters that can represent the essential characteristics of the speech signal must be analyzed, and these parameters must then be used for efficient recognition processing. The effect of speech recognition is directly affected by the quality of speech signal processing. Speech signal analysis is the process of preprocessing a speech signal using an effective method, converting it into a signal form that can be extracted by a computer system and finally obtaining the extraction result of the speech signal feature sequence.The speech signal is a time-domain signal, and its time-domain waveform changes dramatically over time, resulting in a sawtooth shape on the waveform diagram. In modern speech recognition technology, the most used processing method is to truncate such signals in the effective time domain of the signal using different window functions such as rectangular window, Hanning window, and hamming window and then process them in segments to analyze the speech segment by segment. The signal’s characteristic parameters. The goal is to fully exploit the speech signal’s short-term stationary effect, and the characteristic parameters in each relatively stationary signal tend to be stable, making it easier for the system to analyze and extract these characteristic parameters. There is frequency-domain analysis of speech signals in addition to time-domain analysis. The use of frequency-domain analysis can effectively reduce the influence of noise in speech signals while also improving the accuracy of feature parameter analysis and extraction. To summarize, whether performing time-domain or frequency-domain analysis, accurate analysis of speech signals can be performed first in order to achieve efficient extraction of feature parameters.


## 3. Pronunciation Error Detection Based on Improved Random Forest Model

### 3.1. Pronunciation Error Detection Process Based on This Method

The execution flow of the pronunciation error detection model based on the method in this article is shown in Figure5.Figure 5
Pronunciation error detection process based on this method.The left border of Figure5 shows the data collection and feature extraction process. The left frame is the model training optimization process. The steps of the pronunciation error detection model based on the method in this article are as follows:The first step is data preprocessing. Preprocessing mainly includes forced text-to-speech alignment and phoneme separation of speech data. The data obtained from the speech corpus are the whole sentence audio data file, and a tool like the Hidden Markov Model Toolkit [17] is used to force the alignment of the audio file with the reference text. Speech is aligned to sentences, words, and phonemes. Using the forced alignment method, obtain the phoneme’s alignment time information. To obtain phoneme data, the phoneme is cut based on the phoneme alignment time information obtained in the previous step.The next step is to extract features. The first step’s phoneme data are used to extract the MFCC acoustic features. In this article, 15-dimensional MFCCs are extracted and combined with 15-dimensional first-order difference and 15-dimensional second-order difference coefficients to form a 45-dimensional MFCC coefficient.Preprocessing datasets is the third step. This step consists primarily of dividing the acquired feature dataset into a training dataset and a test dataset, and then normalizing them. Normalization is the process of limiting the data from the automatic pronunciation error detection feature to a specific range. The goal is to reduce the data difference by lowering the discrete degree of the automatic pronunciation error detection feature data, so that the data fluctuation is limited within a certain range. The normalization operation has no effect on the data’s original distribution.The fourth step is to input the 45-dimensional feature vector obtained in the previous step into the improved random forest model for training. During training, cross-validation is used to tune various parameters of the model.The fifth step is to test the model. Use the test set to test the pronunciation error detection classification model established by this method. The accuracy of pronunciation misclassification detection is obtained. The performance of the model is further verified by evaluation indicators.The sixth step is to calculate the evaluation index and dynamically adjust the model parameters based on the calculation result of the evaluation index.


### 3.2. Improved Random Forest Model

SethX,θn,n=1,2,…,N is a random forest classification model, and θn represents the nth decision tree classifier. For a given dataset D = {X, Y}, set a marginal function, as shown in the following equation:(1)FX,Y=avkZhkX=Y−maxavkZj≠YhkX=j,where Z∗ is an indicator function that counts how many times the condition ∗ is satisfied. The marginal function is used to determine how much the average of correct votes for all samples in dataset X exceeds the average of incorrect votes. The higher the value of mg, the better the model’s classification accuracy. The following equation is used to calculate the generalization error:(2)E˜=PX,YFX,Y0,where F(X, Y) < 0 means that the classifier misclassifies a sample. PX, Y represents the proportion of misclassified samples in the total samples.Breiman [18] observed that when there are enough subtrees in the random forest, the generalization error will converge to a fixed value due to the law of large numbers. However, in real-world production, if the random forest has infinite subtrees, a lot of computing resources and time will be wasted. If the subtree training samples are insufficient, the base classifier will fail to achieve classification ability. If the sample size is too large, the similarity between the base classifiers increases, and the integration goal is not met. To address the issues, this article employs the firework algorithm [19] to determine the best random forest parameter combination and obtains an ideal random forest classification model in a limited number of iterations.As demonstrated in the following equation, a random forest classification accuracy model must first be built before the fireworks method can optimize the random forest:(3)fA,B=ABtrueABall,where f(A, B) represents the accuracy of the random forest classification model. TSture represents the number of correctly classified samples in the dataset, and ABall represents the total number of training samples.The goal behind the fireworks method is to count the amount of kid combinations that are created with each explosion in order to arrive at the best possible answer. It can be seen in the following equation:(4)SSi=S˜∗ymax−A,Bi+δ∑i=1Nymax−A,Bi+δ,where ymax=maxfA,B, S˜ represents a constant, and N is the number of possible initialization parameter combinations. The number of next-generation parameter combinations generated by the ith parameter max combination is represented by SSi.In the fireworks algorithm, the random forest parameter combination is updated based on the explosion mode of ordinary individuals. The newly generated explosion combination is referred to as the explosion combination, and the calculation method for the newly generated explosion combination is shown in the following equations:(5)Aij=Aij+Gaussian0,1∗Ai−Abest,(6)Bij=Bij+Gaussian0,1∗Bi−Bbest,where (A, B)i represents the ith common individual combination. (A, B)ij represents the jth explosive combination generated by the ith common individual combination explosion. (A, B)best represents the base with the highest accuracy. The parameter combination is corresponding to the classifier.The parameter combination of the random forest is updated according to the mutation method in the fireworks algorithm, and the combination generated by this method is called the mutation combination. The calculation method of the newly generated mutation combination is shown in the following equation:(7)Ai=Ai∗τ1+e1−fbestt/fbestt,(8)Bi=Bi∗τ1+e1−fbesteval/fbesteval−1,where fbest(t) represents the t-th optimal fitness function set. Here is a brief overview of how the improved RF algorithm is implemented:Algorithm 1:The process of the optimal classification model.
Input: Dataset DOutput: optimal classification model and highest accuracyStep 1: Initialize N parameter combinations;Step 2: To identify the best classification model, repeat the following steps (1) to (13) in a loop until the termination condition is met.(1)
While (the maximum number of iterations)(2)
Fori = l: N(3)
Determine the number of offspring combinations SSi produced by each parameter combination using equation (4).(4)
Forj = 1: SSi(5)
To update the optimal classification model, equations (5) and (6) are used to update the explosion combination and the classification accuracy.(6)
End for(7)
End for(8)
M combinations are chosen at random from a set of N.(9)
Fork = 1: M(10)
To update the optimal classification model, equations (7) and (8) are used to update the mutation combination and the classification accuracy.(11)
End for(12)
Choose from the next generation of explosive combos.(13)
End whileStep 3: Return the best classification model with the best accuracy.


## 3.1. Pronunciation Error Detection Process Based on This Method

The execution flow of the pronunciation error detection model based on the method in this article is shown in Figure5.Figure 5
Pronunciation error detection process based on this method.The left border of Figure5 shows the data collection and feature extraction process. The left frame is the model training optimization process. The steps of the pronunciation error detection model based on the method in this article are as follows:The first step is data preprocessing. Preprocessing mainly includes forced text-to-speech alignment and phoneme separation of speech data. The data obtained from the speech corpus are the whole sentence audio data file, and a tool like the Hidden Markov Model Toolkit [17] is used to force the alignment of the audio file with the reference text. Speech is aligned to sentences, words, and phonemes. Using the forced alignment method, obtain the phoneme’s alignment time information. To obtain phoneme data, the phoneme is cut based on the phoneme alignment time information obtained in the previous step.The next step is to extract features. The first step’s phoneme data are used to extract the MFCC acoustic features. In this article, 15-dimensional MFCCs are extracted and combined with 15-dimensional first-order difference and 15-dimensional second-order difference coefficients to form a 45-dimensional MFCC coefficient.Preprocessing datasets is the third step. This step consists primarily of dividing the acquired feature dataset into a training dataset and a test dataset, and then normalizing them. Normalization is the process of limiting the data from the automatic pronunciation error detection feature to a specific range. The goal is to reduce the data difference by lowering the discrete degree of the automatic pronunciation error detection feature data, so that the data fluctuation is limited within a certain range. The normalization operation has no effect on the data’s original distribution.The fourth step is to input the 45-dimensional feature vector obtained in the previous step into the improved random forest model for training. During training, cross-validation is used to tune various parameters of the model.The fifth step is to test the model. Use the test set to test the pronunciation error detection classification model established by this method. The accuracy of pronunciation misclassification detection is obtained. The performance of the model is further verified by evaluation indicators.The sixth step is to calculate the evaluation index and dynamically adjust the model parameters based on the calculation result of the evaluation index.


## 3.2. Improved Random Forest Model

SethX,θn,n=1,2,…,N is a random forest classification model, and θn represents the nth decision tree classifier. For a given dataset D = {X, Y}, set a marginal function, as shown in the following equation:(1)FX,Y=avkZhkX=Y−maxavkZj≠YhkX=j,where Z∗ is an indicator function that counts how many times the condition ∗ is satisfied. The marginal function is used to determine how much the average of correct votes for all samples in dataset X exceeds the average of incorrect votes. The higher the value of mg, the better the model’s classification accuracy. The following equation is used to calculate the generalization error:(2)E˜=PX,YFX,Y0,where F(X, Y) < 0 means that the classifier misclassifies a sample. PX, Y represents the proportion of misclassified samples in the total samples.Breiman [18] observed that when there are enough subtrees in the random forest, the generalization error will converge to a fixed value due to the law of large numbers. However, in real-world production, if the random forest has infinite subtrees, a lot of computing resources and time will be wasted. If the subtree training samples are insufficient, the base classifier will fail to achieve classification ability. If the sample size is too large, the similarity between the base classifiers increases, and the integration goal is not met. To address the issues, this article employs the firework algorithm [19] to determine the best random forest parameter combination and obtains an ideal random forest classification model in a limited number of iterations.As demonstrated in the following equation, a random forest classification accuracy model must first be built before the fireworks method can optimize the random forest:(3)fA,B=ABtrueABall,where f(A, B) represents the accuracy of the random forest classification model. TSture represents the number of correctly classified samples in the dataset, and ABall represents the total number of training samples.The goal behind the fireworks method is to count the amount of kid combinations that are created with each explosion in order to arrive at the best possible answer. It can be seen in the following equation:(4)SSi=S˜∗ymax−A,Bi+δ∑i=1Nymax−A,Bi+δ,where ymax=maxfA,B, S˜ represents a constant, and N is the number of possible initialization parameter combinations. The number of next-generation parameter combinations generated by the ith parameter max combination is represented by SSi.In the fireworks algorithm, the random forest parameter combination is updated based on the explosion mode of ordinary individuals. The newly generated explosion combination is referred to as the explosion combination, and the calculation method for the newly generated explosion combination is shown in the following equations:(5)Aij=Aij+Gaussian0,1∗Ai−Abest,(6)Bij=Bij+Gaussian0,1∗Bi−Bbest,where (A, B)i represents the ith common individual combination. (A, B)ij represents the jth explosive combination generated by the ith common individual combination explosion. (A, B)best represents the base with the highest accuracy. The parameter combination is corresponding to the classifier.The parameter combination of the random forest is updated according to the mutation method in the fireworks algorithm, and the combination generated by this method is called the mutation combination. The calculation method of the newly generated mutation combination is shown in the following equation:(7)Ai=Ai∗τ1+e1−fbestt/fbestt,(8)Bi=Bi∗τ1+e1−fbesteval/fbesteval−1,where fbest(t) represents the t-th optimal fitness function set. Here is a brief overview of how the improved RF algorithm is implemented:Algorithm 1:The process of the optimal classification model.
Input: Dataset DOutput: optimal classification model and highest accuracyStep 1: Initialize N parameter combinations;Step 2: To identify the best classification model, repeat the following steps (1) to (13) in a loop until the termination condition is met.(1)
While (the maximum number of iterations)(2)
Fori = l: N(3)
Determine the number of offspring combinations SSi produced by each parameter combination using equation (4).(4)
Forj = 1: SSi(5)
To update the optimal classification model, equations (5) and (6) are used to update the explosion combination and the classification accuracy.(6)
End for(7)
End for(8)
M combinations are chosen at random from a set of N.(9)
Fork = 1: M(10)
To update the optimal classification model, equations (7) and (8) are used to update the mutation combination and the classification accuracy.(11)
End for(12)
Choose from the next generation of explosive combos.(13)
End whileStep 3: Return the best classification model with the best accuracy.


## 4. Analysis of Experimental Results

### 4.1. Evaluation Indicators

The evaluation indicators in this article are calculated based on the confusion matrix. Pronunciation error detection can produce the following types of results: CC represents the number of correct pronunciations that were judged to be correct. CD represents the number of correct pronunciations judged to be correct. DC stands for the number of mispronunciations judged to be correct. DD represents the number of mispronunciations judged as mispronunciations.(1)
Accuracy. It is the degree of accuracy with which the pronunciation type is correctly judged in the sample:(9)Accuracy=CCCC+CD.(2)
Recall rate. The probability that the current mispronunciation type is correctly judged as the current mispronunciation type:(10)Recall=CCCC+DD.


### 4.2. Experiment Data

The Arctic Corpus is an American English-spoken corpus. This article begins by removing sentences from the Arctic corpus that contain complete phonemes. Then, 48 college students were invited to read 16 sentences aloud. When reading aloud, students must read at a normal speaking rate, with their pronunciation as clear and fluent as possible. Because each student’s spoken English level varies, the recordings include a cross section of students with varying levels of pronunciation quality ranging from poor to fair to excellent. This corpus contains samples with varying degrees of pronunciation quality. Students who participate in reading aloud do not know which reading texts they will be assigned ahead of time. This ensures that the pronunciation reflects the student’s pronunciation level and errors as accurately as possible. The sampling rate is 16 kHz, and the recording is done in mono. After recording, the audio is saved as a wav file. A small corpus of 800 samples, all of which were reading data samples, was recorded in a noise-free recording classroom.


### 4.3. Experimental Results

The random forest algorithm used to build the automatic pronunciation classification error detection model requires the maximum number of random forest features, the maximum depth of the decision tree, and the forest density, or the number of decision trees. The dimension of the feature vector is related to the maximum number of features and the maximum depth of the decision tree in the training of the input random forest model for the automatic pronunciation error detection feature dataset. In this article, the dimension of the feature vector is 45, and the maximum number of features is generally equal to the dimension of the feature vector, which is 45. In this study, the dimension of the feature vector is moderate, and the decision tree does not need to limit the depth of the subtree when building the subtree, so the decision tree’s maximum depth is set to the default value. The classification accuracy can be used to calculate forest density. In general, classification accuracy increases as the number of decision trees increases. When using cross-validation to evaluate a model, however, the computational complexity increases exponentially as the number of decision trees increases. As a result, when determining the number of decision trees, consider the classification accuracy, time required, and complexity of cross-validation calculations, and then, choose the best.The test set is used to put the trained FWA-RF model to the test. The test set experimental results show that when the number of decision trees in the forest exceeds 18, the growth rate of classification error detection accuracy tends to be flat. As a result, the number of subtrees in the FWA-RF method is set to 18 in this article. Figure6 depicts the test set’s classification error detection accuracy results.Figure 6
Changes in accuracy with the number of subtrees.Adaboost [20], decision tree (DT) [21], support vector machine (SVM) [22], logistic regression (LR) [23], and random forest (RF) were the comparative classifiers used in the experimental section. MFCC, wavelet packet coefficient (WPC) [24], and Fourier transform (FP) [25] are the most common feature extraction and comparison algorithms. PCA [26] is used in this article to reduce the dimensionality of feature data. The no-comparison models are iterated 50 times, the RF algorithm is set to 100 trees, and the training-to-test sample ratio is 0.7. Tables 1 and 2 display the experimental results obtained on the test set by various classifiers combined with various feature extraction methods.Table 1
Accuracy obtained by each classifier combined with different feature extraction methods.
Classifier feature extractionAdaboostDTSVMLRRFFWA-RFMFCC0.7250.6930.6550.6670.7130.747WPC0.7310.6890.6480.6720.7040.725FP0.7010.6620.6310.6480.6820.718Table 2
The recall rate obtained by each classifier combined with different feature extraction methods.
Classifier feature extractionAdaboostDTSVMLRRFFWA-RFMFCC0.7120.6730.6500.6540.7020.732WPC0.7280.6790.6120.6440.6880.725FP0.6830.6520.6050.6270.6620.711The experimental data in Table1 show that the WPC feature extraction method has the highest classification accuracy when the Adaboost and LR classifiers classify the dataset. When classifying the dataset, DT, SVM, and RF predict that the four FWA-RF classifiers will have the highest classification accuracy based on the MFCC feature extraction method. Therefore, the MFCC method was chosen for feature extraction in this article. Furthermore, the classification accuracy is 0.747 based on the experimental results obtained by 5 different classifiers and 3 different feature extraction methods, indicating that the combination of FWA-RF classifier and MFCC feature extraction method has the best classification effect. Figure 7 intuitively shows that most classifiers can achieve the highest accuracy when using the MFCC feature extraction method. The accuracy rates obtained by the three different feature extraction methods of MFCC, WPC, and FP when using the FWA-RF model for classification are the highest based on MFCC. They are 3.34 percent and 4.39 percent higher than WPC and FP, respectively.Figure 7
Accuracy comparison.The ideal accuracy rate does not explain the superiority of the classification method; only high accuracy and recall rate can explain this method’s superiority. Based on this concept, Table2 displays the recall rates obtained by each classifier using various feature extraction algorithms. Figure 8 shows the recall comparison of each model.Figure 8
Comparison of recall.By comparing Figures7 and 8, we can see that the precision and recall are consistent with the results of various classifiers and feature extraction algorithms. When the three feature extraction algorithms are compared, the recall rates obtained by the MFCC and WPC methods are both good. On the four algorithms of SVM, LR, RF, and FWA-RF, MFCC has the highest recall rate, while WPC only has the highest recall rate on Adaboost and DT. From the classifier level, we see that no matter which feature extraction method is used, the FWA-RF classifier has the highest recall rate, indicating that the performance of the classifier used in this article is superior. When compared to the other classifiers used in this study, SVM produced the worst results. The classification performance of the Adaboost classifier is slightly lower than that of the classifier used in this article, indicating that the Adaboost classifier’s performance is also good. This also demonstrates that implementing the basic strategy can improve classification performance.


## 4.1. Evaluation Indicators

The evaluation indicators in this article are calculated based on the confusion matrix. Pronunciation error detection can produce the following types of results: CC represents the number of correct pronunciations that were judged to be correct. CD represents the number of correct pronunciations judged to be correct. DC stands for the number of mispronunciations judged to be correct. DD represents the number of mispronunciations judged as mispronunciations.(1)
Accuracy. It is the degree of accuracy with which the pronunciation type is correctly judged in the sample:(9)Accuracy=CCCC+CD.(2)
Recall rate. The probability that the current mispronunciation type is correctly judged as the current mispronunciation type:(10)Recall=CCCC+DD.


## 4.2. Experiment Data

The Arctic Corpus is an American English-spoken corpus. This article begins by removing sentences from the Arctic corpus that contain complete phonemes. Then, 48 college students were invited to read 16 sentences aloud. When reading aloud, students must read at a normal speaking rate, with their pronunciation as clear and fluent as possible. Because each student’s spoken English level varies, the recordings include a cross section of students with varying levels of pronunciation quality ranging from poor to fair to excellent. This corpus contains samples with varying degrees of pronunciation quality. Students who participate in reading aloud do not know which reading texts they will be assigned ahead of time. This ensures that the pronunciation reflects the student’s pronunciation level and errors as accurately as possible. The sampling rate is 16 kHz, and the recording is done in mono. After recording, the audio is saved as a wav file. A small corpus of 800 samples, all of which were reading data samples, was recorded in a noise-free recording classroom.


## 4.3. Experimental Results

The random forest algorithm used to build the automatic pronunciation classification error detection model requires the maximum number of random forest features, the maximum depth of the decision tree, and the forest density, or the number of decision trees. The dimension of the feature vector is related to the maximum number of features and the maximum depth of the decision tree in the training of the input random forest model for the automatic pronunciation error detection feature dataset. In this article, the dimension of the feature vector is 45, and the maximum number of features is generally equal to the dimension of the feature vector, which is 45. In this study, the dimension of the feature vector is moderate, and the decision tree does not need to limit the depth of the subtree when building the subtree, so the decision tree’s maximum depth is set to the default value. The classification accuracy can be used to calculate forest density. In general, classification accuracy increases as the number of decision trees increases. When using cross-validation to evaluate a model, however, the computational complexity increases exponentially as the number of decision trees increases. As a result, when determining the number of decision trees, consider the classification accuracy, time required, and complexity of cross-validation calculations, and then, choose the best.The test set is used to put the trained FWA-RF model to the test. The test set experimental results show that when the number of decision trees in the forest exceeds 18, the growth rate of classification error detection accuracy tends to be flat. As a result, the number of subtrees in the FWA-RF method is set to 18 in this article. Figure6 depicts the test set’s classification error detection accuracy results.Figure 6
Changes in accuracy with the number of subtrees.Adaboost [20], decision tree (DT) [21], support vector machine (SVM) [22], logistic regression (LR) [23], and random forest (RF) were the comparative classifiers used in the experimental section. MFCC, wavelet packet coefficient (WPC) [24], and Fourier transform (FP) [25] are the most common feature extraction and comparison algorithms. PCA [26] is used in this article to reduce the dimensionality of feature data. The no-comparison models are iterated 50 times, the RF algorithm is set to 100 trees, and the training-to-test sample ratio is 0.7. Tables 1 and 2 display the experimental results obtained on the test set by various classifiers combined with various feature extraction methods.Table 1
Accuracy obtained by each classifier combined with different feature extraction methods.
Classifier feature extractionAdaboostDTSVMLRRFFWA-RFMFCC0.7250.6930.6550.6670.7130.747WPC0.7310.6890.6480.6720.7040.725FP0.7010.6620.6310.6480.6820.718Table 2
The recall rate obtained by each classifier combined with different feature extraction methods.
Classifier feature extractionAdaboostDTSVMLRRFFWA-RFMFCC0.7120.6730.6500.6540.7020.732WPC0.7280.6790.6120.6440.6880.725FP0.6830.6520.6050.6270.6620.711The experimental data in Table1 show that the WPC feature extraction method has the highest classification accuracy when the Adaboost and LR classifiers classify the dataset. When classifying the dataset, DT, SVM, and RF predict that the four FWA-RF classifiers will have the highest classification accuracy based on the MFCC feature extraction method. Therefore, the MFCC method was chosen for feature extraction in this article. Furthermore, the classification accuracy is 0.747 based on the experimental results obtained by 5 different classifiers and 3 different feature extraction methods, indicating that the combination of FWA-RF classifier and MFCC feature extraction method has the best classification effect. Figure 7 intuitively shows that most classifiers can achieve the highest accuracy when using the MFCC feature extraction method. The accuracy rates obtained by the three different feature extraction methods of MFCC, WPC, and FP when using the FWA-RF model for classification are the highest based on MFCC. They are 3.34 percent and 4.39 percent higher than WPC and FP, respectively.Figure 7
Accuracy comparison.The ideal accuracy rate does not explain the superiority of the classification method; only high accuracy and recall rate can explain this method’s superiority. Based on this concept, Table2 displays the recall rates obtained by each classifier using various feature extraction algorithms. Figure 8 shows the recall comparison of each model.Figure 8
Comparison of recall.By comparing Figures7 and 8, we can see that the precision and recall are consistent with the results of various classifiers and feature extraction algorithms. When the three feature extraction algorithms are compared, the recall rates obtained by the MFCC and WPC methods are both good. On the four algorithms of SVM, LR, RF, and FWA-RF, MFCC has the highest recall rate, while WPC only has the highest recall rate on Adaboost and DT. From the classifier level, we see that no matter which feature extraction method is used, the FWA-RF classifier has the highest recall rate, indicating that the performance of the classifier used in this article is superior. When compared to the other classifiers used in this study, SVM produced the worst results. The classification performance of the Adaboost classifier is slightly lower than that of the classifier used in this article, indicating that the Adaboost classifier’s performance is also good. This also demonstrates that implementing the basic strategy can improve classification performance.


## 5. Conclusion

English, as a common grammar used by people all over the world to communicate, necessitates excellent listening, speaking, reading, and writing abilities. Speaking is the most important language ability among them. This article proposes an improved random forest model and applies it to pronunciation error detection and correction in English teaching in order to use artificial intelligence technology to assist learners in detecting and correcting errors in spoken English pronunciation. The detection framework in this article primarily employs MFCC for feature extraction, while PCA is employed for feature data dimensionality reduction. When learners pronounce, the improved RF algorithm classifies and detects pronunciation errors caused by nonstandard position, action, and pronunciation duration of pronunciation-related organs. The experimental design demonstrates that a combined classification framework based on MFCC, PCA, and RF can clarify the learner’s pronunciation problem, making it possible to provide feedback and correction opinions for various error types. During the experiment, we discovered that the method of multifeature fusion may improve feature extraction performance, because the feature extraction effect of WPC is also very good. Further research in this study will focus on the fusion of multifeature methods.



---

*Source: 6011993-2022-05-29.xml*