A speech recognition method, apparatus and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2026-08-11
AI Technical Summary
然而,传统的交互方式(例如按钮和旋钮)需要司机手动操作,这会影响驾驶员的注意力和反应时间,从而增加了交通事故的风险
[0053]与现有技术相比,本发明公开的语音的识别方法、装置和设备,通过采集待识别的语音信号,对所述语音信号进行特征提取操作,得到所述语音信号的特征向量;将所述语音信号的特征向量输入至预先训练完成的语音识别模型中,以使所述语音识别模型对所述语音信号的特征向量进行识别,生成语音识别结果;其中,所述语音识别模型为极限学习机分类器,且在训练所述语音识别模型的过程中,所述语音识别模型的权重矩阵和偏置向量是根据训练样本的预测结果生成的。采用本发明的技术手段,对语音识别模型的训练过程进行了优化,相比于传统的神经网络算法需要逐层训练,需要大量的计算资源和时间,本发明实施例采用极限学习机分类器对语音特征进行分类,能够有效节省计算资源,提高语音识别效率,并且,相对于传统的极限学习机算法采用随机生成输入层到隐藏层的权重和偏置的方式,本发明实施例采用改进的极限学习机算法,引入了负反馈机制,通过监督学习的方式更新分类器的权重矩阵和偏置向量,能够有效提高语音识别模型的稳定性和准确性。
Smart Images

Figure CN116705006B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of speech recognition technology, and in particular to a speech recognition method, apparatus, and device. Background Technology
[0002] Over the past few decades, in-vehicle transportation has become increasingly important in people's daily lives. People use vehicles to complete daily work, shopping, and entertainment activities, thus in-vehicle transportation needs to provide a better user experience and higher safety performance. Inside the car, drivers need to control the vehicle through interactive methods, such as controlling audio equipment, navigation systems, air conditioning, etc. However, traditional interaction methods (such as buttons and knobs) require manual operation by the driver, which can affect the driver's attention and reaction time, thereby increasing the risk of traffic accidents.
[0003] In recent years, the development of artificial intelligence technology has provided new options for interaction methods in in-vehicle vehicles, especially voice recognition technology. In-vehicle vehicles can use voice recognition technology to recognize the driver's voice commands and execute corresponding operations, improving driver safety and convenience. However, the in-vehicle environment is complex, with factors such as in-vehicle noise and the driver's accent and speech rate affecting the accuracy and performance of voice recognition systems. Therefore, improving the accuracy and performance of voice recognition systems has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide a speech recognition method, apparatus, and device that can effectively improve the accuracy and efficiency of speech recognition.
[0005] To achieve the above objectives, embodiments of the present invention provide a speech recognition method, comprising:
[0006] Collect the speech signal to be recognized;
[0007] Perform feature extraction on the speech signal to obtain the feature vector of the speech signal;
[0008] The feature vector of the speech signal is input into a pre-trained speech recognition model so that the speech recognition model can recognize the feature vector of the speech signal and generate a speech recognition result.
[0009] The speech recognition model is an extreme learning machine classifier, and during the training of the speech recognition model, the weight matrix and bias vector of the speech recognition model are generated based on the prediction results of the training samples.
[0010] As a preferred embodiment, the speech recognition model is trained in the following manner:
[0011] A training sample set and a neural network model for an extreme learning machine classifier are obtained; wherein the training sample set includes several training samples; and the neural network model includes an input layer, a hidden layer, and an output layer.
[0012] Perform feature extraction on the training samples to obtain the feature vector of the training samples;
[0013] The feature vectors of the training samples are input into the neural network model for recognition to obtain the prediction results of the training samples; wherein, the prediction results include the predicted value and the prediction error;
[0014] Based on the predicted value and the prediction error of each training sample, the weight matrix and bias vector of the neural network model are iteratively updated repeatedly to train the neural network model and obtain a trained speech recognition model.
[0015] In a preferred embodiment, the objective function of the speech recognition model is:
[0016]
[0017] Where N is the number of training samples in the training sample set, and Y is the true value of the training sample. λ represents the predicted value of the training sample, W is the weight matrix from the input layer to the hidden layer, and λ represents the regularization parameter.
[0018] In a preferred embodiment, the step of inputting the feature vector of the training sample into the neural network model for recognition to obtain the prediction result of the training sample specifically involves:
[0019] The feature vectors of the training samples are input into the neural network model for recognition, and the predicted values of the training samples are obtained as follows:
[0020]
[0021] Where, x i Let i be the feature vector of the i-th training sample. Let W be the predicted value of the i-th training sample, b be the weight matrix from the input layer to the hidden layer, b be the bias vector from the input layer to the hidden layer, V be the weight matrix of the output layer, and σ(·) represent the activation function.
[0022] Based on the predicted value and the true value corresponding to the training sample, the prediction error is calculated as follows:
[0023]
[0024] Where, δ iLet y be the prediction error of the i-th training sample. i Let be the true value of the i-th training sample.
[0025] In a preferred embodiment, the step of iteratively updating the weight matrix and bias vector of the neural network model based on the predicted value and prediction error of each training sample to train the neural network model and obtain a trained speech recognition model specifically involves:
[0026] Based on the predicted values and prediction errors of the training samples, the weight matrix W1 and bias vector b1 are calculated as follows:
[0027] W1=W-ηδ i σ′(x i W+b)V T +ηλW;
[0028] b1=b-ηδ i σ′(x i W+b);
[0029] Where η represents the learning rate, and σ′(·) represents the derivative of the activation function;
[0030] Based on the calculated weight matrix W1 and bias vector b1, update the current weight matrix W and bias vector b from the input layer to the hidden layer;
[0031] Based on the weight matrix W from the input layer to the hidden layer and the bias vector b, the weight matrix from the hidden layer to the output layer is calculated using the least squares method as follows:
[0032]
[0033] H = σ(XW + b);
[0034] in, This represents the Moore-Penrose pseudoinverse of H, where H is the output value of the hidden layer.
[0035] The neural network model is trained by iteratively updating the weight matrix and bias vector from the input layer to the hidden layer and from the hidden layer to the output layer, thereby obtaining a trained speech recognition model.
[0036] In a preferred embodiment, the feature extraction operation on the speech signal to obtain the feature vector of the speech signal specifically involves:
[0037] The Mel frequency cepstral coefficient method is used to perform feature extraction on the speech signal to obtain the feature vector of the speech signal.
[0038] In a preferred embodiment, the step of using the Mel-frequency cepstral coefficient method to perform feature extraction on the speech signal to obtain the feature vector of the speech signal specifically involves:
[0039] The speech signal is preprocessed to obtain time-frequency spectrum data;
[0040] The time-frequency spectrum data is passed through the Mel filter bank to obtain the Mel frequency spectrum;
[0041] The Mel frequency spectrum is subjected to discrete cosine transformation to obtain the Mel frequency cepstral coefficients, which are used as the feature vector of the speech signal.
[0042] This invention provides a speech recognition device, comprising:
[0043] The voice signal acquisition module is used to acquire the voice signal to be recognized;
[0044] The feature extraction module is used to perform feature extraction operations on the speech signal to obtain the feature vector of the speech signal;
[0045] The speech recognition module is used to input the feature vector of the speech signal into a pre-trained speech recognition model, so that the speech recognition model can recognize the feature vector of the speech signal and generate a speech recognition result.
[0046] The speech recognition model is an Extreme Learning Machine (ELM) classifier, and during the training of the ELM classifier, the weight matrix and bias vector from the input layer to the hidden layer of the ELM classifier are generated based on the prediction results of the training samples.
[0047] As a preferred embodiment, the speech recognition model is trained in the following manner:
[0048] Obtain a training sample set and a neural network model for an extreme learning machine classifier; wherein the training sample set includes several training samples; the neural network model includes an input layer, a hidden layer, and an output layer, and the initial weight matrix and bias vector from the input layer to the hidden layer are randomly generated;
[0049] Perform feature extraction on the training samples to obtain the feature vector of the training samples;
[0050] The feature vectors of the training samples are input into the neural network model for recognition to obtain the prediction results of the training samples; wherein, the prediction results include the predicted value and the prediction error;
[0051] Based on the predicted value and the prediction error of each training sample, the weight matrix and bias vector of the neural network model from the input layer to the hidden layer are iteratively updated repeatedly to train the neural network model and obtain the trained speech recognition model.
[0052] This invention also provides a speech recognition device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a speech recognition method as described in any of the preceding embodiments.
[0053] Compared with existing technologies, the speech recognition method, apparatus, and device disclosed in this invention acquire a speech signal to be recognized, perform feature extraction on the speech signal to obtain a feature vector of the speech signal, and input the feature vector of the speech signal into a pre-trained speech recognition model so that the speech recognition model can recognize the feature vector of the speech signal and generate a speech recognition result. The speech recognition model is an Extreme Learning Machine (ELM) classifier, and during the training of the speech recognition model, the weight matrix and bias vector of the speech recognition model are generated based on the prediction results of the training samples. The technical means of this invention optimize the training process of the speech recognition model. Compared with traditional neural network algorithms that require layer-by-layer training and a large amount of computing resources and time, this embodiment of the invention uses an ELM classifier to classify speech features, which can effectively save computing resources and improve speech recognition efficiency. Furthermore, compared with the traditional ELM algorithm that randomly generates weights and biases from the input layer to the hidden layer, this embodiment of the invention uses an improved ELM algorithm that introduces a negative feedback mechanism to update the weight matrix and bias vector of the classifier through supervised learning, which can effectively improve the stability and accuracy of the speech recognition model. Attached Figure Description
[0054] Figure 1 This is a schematic flowchart of a speech recognition method provided in an embodiment of the present invention;
[0055] Figure 2 This is a schematic diagram of the training process of the speech recognition model in an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the structure of a speech recognition device provided in an embodiment of the present invention;
[0057] Figure 4 This is a schematic diagram of the structure of a speech recognition device provided in an embodiment of the present invention. Detailed Implementation
[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] See Figure 1 This is a flowchart illustrating a speech recognition method provided in an embodiment of the present invention. The embodiment of the present invention provides a speech recognition method, which is executed through the following steps S11 to S13:
[0060] S11. Acquire the speech signal to be recognized;
[0061] S12. Perform feature extraction on the speech signal to obtain the feature vector of the speech signal;
[0062] S13. Input the feature vector of the speech signal into a pre-trained speech recognition model so that the speech recognition model can recognize the feature vector of the speech signal and generate a speech recognition result.
[0063] The speech recognition model is an extreme learning machine classifier, and during the training of the speech recognition model, the weight matrix and bias vector of the speech recognition model are generated based on the prediction results of the training samples.
[0064] It should be noted that the speech recognition method proposed in this embodiment of the invention can be applied to the field of vehicle technology to realize the recognition of in-vehicle speech, or it can be applied to other technical fields without affecting the beneficial effects achieved by the invention.
[0065] In this embodiment of the invention, a pre-trained speech recognition model is used to recognize speech signals. The speech recognition model employs an Extreme Learning Machine (ELM) classifier. ELM is a single-layer feedforward neural network that achieves rapid training and prediction by randomly generating weights and biases from the input layer to the hidden layer, and then mapping them to the output layer through linear transformations and activation functions. However, traditional ELM algorithms suffer from the following problems: because the weights and biases are randomly generated, it may lead to unstable training and low classification accuracy.
[0066] Therefore, the speech recognition model in this embodiment of the invention employs an improved ELM algorithm, which introduces a negative feedback mechanism for training the speech recognition model. Specifically, during the training of the speech recognition model, the weight matrix and bias vector of each layer of the Extreme Learning Machine classifier are generated based on the prediction results of the training samples. The weights and biases are updated through supervised learning, thereby improving the stability and accuracy of the model.
[0067] In specific application scenarios, the user's voice signal is collected by a preset sound acquisition device as the voice signal to be recognized. Then, the voice signal to be recognized is preprocessed and feature extracted to convert it into a data form that meets the input values of the voice recognition model. The feature vector of the voice signal is input into the voice recognition model for classification and recognition, thereby obtaining the recognition result of the voice signal to be recognized.
[0068] The training process of the speech recognition model is optimized by employing the technical means of this invention. Compared with traditional neural network algorithms that require layer-by-layer training and a large amount of computing resources and time, this invention uses an Extreme Learning Machine (ELM) classifier to classify speech features, which can effectively save computing resources and improve speech recognition efficiency. Furthermore, compared with the traditional ELM algorithm that randomly generates weights and biases from the input layer to the hidden layer, this invention uses an improved ELM algorithm that introduces a negative feedback mechanism. By updating the weight matrix and bias vector of the classifier through supervised learning, the stability and accuracy of the speech recognition model can be effectively improved.
[0069] As a preferred embodiment, the present invention further implements the above embodiments. In step S12, that is, the feature extraction operation on the speech signal to obtain the feature vector of the speech signal, specifically, the Mel frequency cepstral coefficient method is used to perform feature extraction operation on the speech signal to obtain the feature vector of the speech signal.
[0070] Preferably, the step of using the Mel-frequency cepstral coefficient method to perform feature extraction on the speech signal to obtain the feature vector of the speech signal specifically includes steps S121 to S123:
[0071] S121. Perform preprocessing operations on the speech signal to convert it into time-frequency spectrum data;
[0072] S122. Obtain the Mel frequency spectrum by passing the time-frequency spectrum data through the Mel filter bank;
[0073] S123. Perform discrete cosine transformation on the Mel frequency spectrum to obtain Mel frequency cepstral coefficients, which are used as the feature vector of the speech signal.
[0074] In this embodiment of the invention, after acquiring the speech signal to be recognized, the speech signal is first preprocessed. The preprocessing operation includes noise reduction, filtering, and frame segmentation, thereby converting the speech signal into time-frequency spectrum data. The specific calculation steps are as follows:
[0075] x[n] = s[n] + v[n];
[0076]
[0077]
[0078] Furthermore, feature extraction is performed on the time-frequency spectrum data. This algorithm uses the Mel frequency cepstral coefficients (MFCCs) of the time-frequency spectrum data as features. The Mel frequency spectrum is obtained by passing the time-frequency spectrum data through the Mel filter bank, and then the Mel frequency spectrum is subjected to discrete cosine transform (DCT) to obtain the Mel frequency cepstral coefficients as feature vectors.
[0079] The formula for calculating MFCCs is as follows:
[0080]
[0081] Where N is the number of Mel filters, E j Let be the energy of the j-th Mel filter bank.
[0082] Using the technical means of this invention, Mel frequency cepstral coefficients of time-frequency spectrum data are used as features. MFCCs are a feature widely used in the field of speech recognition, which can better characterize the frequency features of speech signals and further improve the accuracy of speech recognition results.
[0083] For a preferred embodiment, see Figure 2 This is a schematic diagram of the training process of the speech recognition model in an embodiment of the present invention. The embodiment of the present invention is a further implementation based on the above embodiment, wherein the training process of the speech recognition model includes the following steps S21 to S24:
[0084] S21. Obtain a training sample set and a neural network model for an extreme learning machine classifier; wherein, the training sample set includes several training samples; the neural network model includes an input layer, a hidden layer, and an output layer;
[0085] S22. Perform feature extraction on the training samples to obtain the feature vector of the training samples;
[0086] S23. Input the feature vector of the training sample into the neural network model for recognition to obtain the prediction result of the training sample; wherein, the prediction result includes the prediction value and the prediction error;
[0087] S24. Based on the predicted value and the prediction error of each training sample, the weight matrix and bias vector of the neural network model are iteratively updated repeatedly to train the neural network model and obtain the trained speech recognition model.
[0088] Preferably, the objective function of the speech recognition model is:
[0089]
[0090] Where N is the number of training samples in the training sample set, and Y is the true value of the training sample. λ represents the predicted value of the training sample, W is the weight matrix from the input layer to the hidden layer, and λ represents the regularization parameter.
[0091] Preferably, step S23, which is the input of the feature vector of the training sample into the neural network model for recognition to obtain the prediction result of the training sample, specifically includes steps S231 to S232:
[0092] S231. Input the feature vector of the training sample into the neural network model for recognition, and obtain the predicted value of the training sample:
[0093]
[0094] Where, x i Let i be the feature vector of the i-th training sample. Let W be the predicted value of the i-th training sample, b be the weight matrix from the input layer to the hidden layer, b be the bias vector from the input layer to the hidden layer, V be the weight matrix of the output layer, and σ(·) represent the activation function.
[0095] S232. Based on the predicted value and the true value corresponding to the training sample, calculate the prediction error as follows:
[0096]
[0097] Where, δ i Let y be the prediction error of the i-th training sample. i Let be the true value of the i-th training sample.
[0098] Preferably, step S24, namely, iteratively updating the weight matrix and bias vector of the neural network model based on the predicted value and the prediction error of each training sample to train the neural network model and obtain the trained speech recognition model, specifically includes steps S241 to S244:
[0099] S241. Based on the predicted values and prediction errors of the training samples, calculate the weight matrix W1 and the bias vector b1, respectively:
[0100] W1=W-ηδ i σ ′ (x i W+b)V T +ηλW;
[0101] b1=b-ηδ i σ ′ (x i W+b);
[0102] Where η represents the learning rate, σ ′ (·) denotes the derivative of the activation function;
[0103] S242. Update the current weight matrix W and bias vector b from the input layer to the hidden layer based on the calculated weight matrix W1 and bias vector b1.
[0104] S243. Based on the current weight matrix W from the input layer to the hidden layer and the bias vector b, the weight matrix from the hidden layer to the output layer is calculated using the least squares method as follows:
[0105]
[0106] H = σ(XW + b);
[0107] in, This represents the Moore-Penrose pseudoinverse of H, where H is the output value of the hidden layer.
[0108] S244. The neural network model is trained by iteratively updating the weight matrix and bias vector from the input layer to the hidden layer and from the hidden layer to the output layer, thereby obtaining a trained speech recognition model.
[0109] Specifically, in this embodiment of the invention, a training sample set is first obtained, which includes N training samples. Feature extraction is performed on the training samples, and each training sample has d features, forming a feature vector. Understandably, the Mel-frequency cepstral coefficient method is also used to perform feature extraction on the training samples to obtain the corresponding feature vector.
[0110] Obtain the initial neural network model of the Extreme Learning Machine classifier, and train this initial neural network model using training samples from the training sample set to obtain the trained speech recognition model. Let... Represents the input matrix, Let represent the output matrix, where c represents the number of classes. The goal is to find a function f(X) such that f(X) best fits Y.
[0111] For this initial neural network model, parameter initialization is performed by first randomly generating the weight matrix from the input layer to the hidden layer. and bias vector Here, m represents the number of neurons in the hidden layer. The output of the hidden layer can be represented as H = σ(XW + b), where σ(·) represents the activation function, such as sigmoid, ReLU, etc. The weight matrix from the hidden layer to the output layer is shown below. The solution can be obtained directly using the least squares method:
[0112]
[0113] in, This represents the Moore-Penrose pseudoinverse of H. After obtaining the output layer weight matrix V, predictions can be made on new input training samples:
[0114]
[0115] The goal is to minimize the prediction error:
[0116]
[0117] It should be noted that, in order to introduce a negative feedback mechanism, the objective function of the traditional ELM is improved in this embodiment of the invention. That is, the objective function of the Extreme Learning Machine classifier in this embodiment of the invention is improved as follows:
[0118]
[0119] Here, λ represents the regularization parameter, which is used to control the complexity of the model.
[0120] This invention employs a stochastic gradient descent algorithm to optimize the objective function, randomly selecting a sample (x) from the training set each time. i ,y i ), calculate the predicted value and error Then based on the error δ i Update the weight matrix W and the bias vector b:
[0121] W←W-ηδ i σ ′(x i W+b)V T +ηλW;
[0122] b←b-ηδ i σ ′ (x i W+b);
[0123] Where η represents the learning rate, σ ′ (·) represents the derivative of the activation function.
[0124] After updating the weight matrix W and the bias vector b, the output H of the hidden layer can be obtained, and further calculated according to the formula... The weight matrix V from the hidden layer to the output layer is calculated.
[0125] Then select a new sample (x) from the training sample set. i ,y i The weight matrix W, bias vector b, and weight matrix V are calculated and updated. By iteratively updating the weight matrix and bias vector from the input layer to the hidden layer, and the weight matrix from the hidden layer to the output layer, a stable weight matrix and bias vector for each layer in the neural network model can be obtained, resulting in a trained speech recognition model.
[0126] The technical means employed in this invention involve using the ELM algorithm, which incorporates a negative feedback mechanism, during the training process of the speech recognition model. This supervised learning method updates the weights and biases of the speech recognition model, thereby improving its stability and accuracy. Furthermore, this invention employs a stochastic gradient descent algorithm to optimize the objective function, resulting in high training speed and computational efficiency.
[0127] See Figure 3 This is a schematic diagram of the structure of a speech recognition device provided in an embodiment of the present invention. The embodiment of the present invention provides a speech recognition device 30, comprising:
[0128] The voice signal acquisition module 31 is used to acquire the voice signal to be recognized;
[0129] Feature extraction module 32 is used to perform feature extraction on the speech signal to obtain the feature vector of the speech signal;
[0130] The speech recognition module 33 is used to input the feature vector of the speech signal into a pre-trained speech recognition model, so that the speech recognition model can recognize the feature vector of the speech signal and generate a speech recognition result.
[0131] The speech recognition model is an Extreme Learning Machine (ELM) classifier, and during the training of the ELM classifier, the weight matrix and bias vector from the input layer to the hidden layer of the ELM classifier are generated based on the prediction results of the training samples.
[0132] As a preferred embodiment, the speech recognition model is trained in the following manner:
[0133] Obtain a training sample set and a neural network model for an extreme learning machine classifier; wherein the training sample set includes several training samples; the neural network model includes an input layer, a hidden layer, and an output layer, and the initial weight matrix and bias vector from the input layer to the hidden layer are randomly generated;
[0134] Perform feature extraction on the training samples to obtain the feature vector of the training samples;
[0135] The feature vectors of the training samples are input into the neural network model for recognition to obtain the prediction results of the training samples; wherein, the prediction results include the predicted value and the prediction error;
[0136] Based on the predicted value and the prediction error of each training sample, the weight matrix and bias vector of the neural network model from the input layer to the hidden layer are iteratively updated repeatedly to train the neural network model and obtain the trained speech recognition model.
[0137] The training process of the speech recognition model is optimized by employing the technical means of this invention. Compared with traditional neural network algorithms that require layer-by-layer training and a large amount of computing resources and time, this invention uses an Extreme Learning Machine (ELM) classifier to classify speech features, which can effectively save computing resources and improve speech recognition efficiency. Furthermore, compared with the traditional ELM algorithm that randomly generates weights and biases from the input layer to the hidden layer, this invention uses an improved ELM algorithm that introduces a negative feedback mechanism. By updating the weight matrix and bias vector of the classifier through supervised learning, the stability and accuracy of the speech recognition model can be effectively improved.
[0138] It should be noted that the speech recognition device provided in this embodiment of the invention is used to execute all the process steps of the speech recognition method in the above embodiment. The working principle and beneficial effects of the two are one-to-one, so they will not be described again.
[0139] See Figure 4This is a schematic diagram of the structure of a speech recognition device provided in an embodiment of the present invention. The present invention provides a speech recognition device 40, including a processor 41, a memory 42, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a speech recognition method as described in any of the above embodiments.
[0140] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0141] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A speech recognition method, characterized in that, include: Collect the speech signal to be recognized; Perform feature extraction on the speech signal to obtain the feature vector of the speech signal; The feature vector of the speech signal is input into a pre-trained speech recognition model so that the speech recognition model can recognize the feature vector of the speech signal and generate a speech recognition result. The speech recognition model is an extreme learning machine classifier, and during the training of the speech recognition model, the weight matrix and bias vector of the speech recognition model are generated based on the prediction results of the training samples. The speech recognition model is trained in the following manner: A training sample set and a neural network model for an extreme learning machine classifier are obtained; wherein the training sample set includes several training samples; and the neural network model includes an input layer, a hidden layer, and an output layer. Perform feature extraction on the training samples to obtain the feature vector of the training samples; The feature vectors of the training samples are input into the neural network model for recognition to obtain the prediction results of the training samples; wherein, the prediction results include the predicted value and the prediction error; Based on the predicted value and the prediction error of each training sample, the weight matrix and bias vector of the neural network model are iteratively updated repeatedly to train the neural network model and obtain a trained speech recognition model. The step of iteratively updating the weight matrix and bias vector of the neural network model based on the predicted value and prediction error of each training sample to train the neural network model and obtain the trained speech recognition model is as follows: Calculate the weight matrix based on the predicted values and prediction errors of the training samples. and bias vector They are respectively: in, Indicates the learning rate. This represents the derivative of the activation function; Based on the calculated weight matrix and bias vector For the current weight matrix from the input layer to the hidden layer and bias vector Update; Based on the weight matrix from the input layer to the hidden layer and bias vector The weight matrix from the hidden layer to the output layer is calculated using the least squares method as follows: in, express The Moore-Penrose pseudoinverse, where H is the output value of the hidden layer; The neural network model is trained by iteratively updating the weight matrix and bias vector from the input layer to the hidden layer and from the hidden layer to the output layer, thereby obtaining a trained speech recognition model.
2. The speech recognition method as described in claim 1, characterized in that, The objective function of the speech recognition model is: Where N is the number of training samples in the training sample set. For the true values of the training samples, Here, W represents the predicted values for the training samples, and W is the weight matrix from the input layer to the hidden layer. This represents the regularization parameter.
3. The speech recognition method as described in claim 2, characterized in that, The step of inputting the feature vector of the training sample into the neural network model for recognition to obtain the prediction result of the training sample is as follows: The feature vectors of the training samples are input into the neural network model for recognition, and the predicted values of the training samples are obtained as follows: in, Let i be the feature vector of the i-th training sample. Let be the predicted value of the i-th training sample. This is the weight matrix from the input layer to the hidden layer. This is the bias vector from the input layer to the hidden layer. This is the weight matrix of the output layer. Indicates the activation function; Based on the predicted value and the true value corresponding to the training sample, the prediction error is calculated as follows: in, Let be the prediction error of the i-th training sample. Let be the true value of the i-th training sample.
4. The speech recognition method as described in claim 1, characterized in that, The feature extraction operation on the speech signal to obtain the feature vector of the speech signal is specifically as follows: The Mel frequency cepstral coefficient method is used to perform feature extraction on the speech signal to obtain the feature vector of the speech signal.
5. The speech recognition method as described in claim 4, characterized in that, The Mel-frequency cepstral coefficient method is used to perform feature extraction on the speech signal to obtain the feature vector of the speech signal, specifically as follows: The speech signal is preprocessed to obtain time-frequency spectrum data; The time-frequency spectrum data is passed through the Mel filter bank to obtain the Mel frequency spectrum; The Mel frequency spectrum is subjected to discrete cosine transform to obtain the Mel frequency cepstral coefficients, which are used as the feature vector of the speech signal.
6. A voice recognition device, characterized in that, include: The voice signal acquisition module is used to acquire the voice signal to be recognized; The feature extraction module is used to perform feature extraction operations on the speech signal to obtain the feature vector of the speech signal; The speech recognition module is used to input the feature vector of the speech signal into a pre-trained speech recognition model, so that the speech recognition model can recognize the feature vector of the speech signal and generate a speech recognition result. The speech recognition model is an Extreme Learning Machine (ELM) classifier, and during the training of the ELM classifier, the weight matrix and bias vector from the input layer to the hidden layer of the ELM classifier are generated based on the prediction results of the training samples. The speech recognition model is trained in the following manner: A training sample set and a neural network model for an extreme learning machine classifier are obtained; wherein the training sample set includes several training samples; and the neural network model includes an input layer, a hidden layer, and an output layer. Perform feature extraction on the training samples to obtain the feature vector of the training samples; The feature vectors of the training samples are input into the neural network model for recognition to obtain the prediction results of the training samples; wherein, the prediction results include the predicted value and the prediction error; Based on the predicted value and the prediction error of each training sample, the weight matrix and bias vector of the neural network model are iteratively updated repeatedly to train the neural network model and obtain a trained speech recognition model. The step of iteratively updating the weight matrix and bias vector of the neural network model based on the predicted value and prediction error of each training sample to train the neural network model and obtain the trained speech recognition model is as follows: Calculate the weight matrix based on the predicted values and prediction errors of the training samples. and bias vector They are respectively: in, Indicates the learning rate. This represents the derivative of the activation function; Based on the calculated weight matrix and bias vector For the current weight matrix from the input layer to the hidden layer and bias vector Update; Based on the weight matrix from the input layer to the hidden layer and bias vector The weight matrix from the hidden layer to the output layer is calculated using the least squares method as follows: in, express The Moore-Penrose pseudoinverse, where H is the output value of the hidden layer; The neural network model is trained by iteratively updating the weight matrix and bias vector from the input layer to the hidden layer and from the hidden layer to the output layer, thereby obtaining a trained speech recognition model.
7. A voice recognition device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a speech recognition method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Speech recognition method based on neural network stacking autoencoder multi-feature fusion
CN107610692A
Multilingual speech recognition model training method, apparatus, device, and storage medium
WO2021135438A1