Voice signal recognition method and device, electronic equipment, storage medium and product
By obtaining the best state sequence of the speech signal and using the function approximation algorithm for dimensional processing, combined with the recognition network to recognize the speech signal, the problem of being unable to retain the classification information of the speech signal in the existing technology is solved, and the accuracy of speech recognition is improved.
Patent Information
- Application Number
- CN202410987866.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-01
AI Technical Summary
In existing speech signal recognition technology, the combination of HMM and ANN models cannot retain the classification information of the speech signal when processing the speech signal, resulting in low recognition accuracy.
By obtaining the best state sequence of the speech signal and using the function approximation algorithm for dimensional processing, feature vectors with the same vector dimensions are obtained, and combined with the recognition network for recognition, to retain the intra-frame changes and classification information of the speech signal.
The accuracy of speech recognition is improved, and the accuracy of the recognition results is enhanced by retaining the intra-frame changes and classification information of the speech signal.
Smart Images

Figure CN118737155A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of speech signal recognition, and in particular to a speech signal recognition method, device, electronic device, storage medium and product. Background Art
[0002] In related speech signal recognition schemes, a hybrid model of a Hidden Markov Model (HMM) and an Artificial Neural Network (ANN) model is usually used to recognize speech signals. Since the feature vector input to the ANN model during training needs to be of a fixed dimension, the speech signal needs to be dimensionalized. However, the related dimensional processing method ignores the changes within the speech signal frame when processing the speech signal, resulting in the loss of classification information of the speech signal, which in turn leads to low accuracy of speech recognition. Summary of the invention
[0003] The present disclosure provides a speech signal recognition method, device, electronic device, storage medium and product to solve the problems in the related art.
[0004] A first aspect of the present disclosure provides a method for speech signal recognition, the method comprising:
[0005] Acquire an optimal state sequence of a speech signal, wherein the optimal state sequence is a state sequence with the highest probability among all state sequences that generate the speech signal;
[0006] Performing dimension processing on the optimal state sequence of the speech signal using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension;
[0007] The first recognition network is used to recognize the feature vector of the speech signal with the same vector dimension to obtain a recognition result of the speech signal, wherein the recognition result of the speech signal is used to indicate text information matching the speech signal.
[0008] In one embodiment, obtaining an optimal state sequence of a speech signal includes:
[0009] Acquire speech signals;
[0010] Performing a first processing on the speech signal to obtain a feature sequence of the speech signal, wherein the first processing includes preprocessing, endpoint detection, and feature extraction;
[0011] The characteristic sequence of the speech signal is decoded using a hidden Markov model HMM to obtain an optimal state sequence of the speech signal.
[0012] In one embodiment, the feature sequence of the speech signal is decoded using HMM to obtain the optimal state sequence of the speech signal, including:
[0013] Obtaining an initial state probability matrix, a state transition probability matrix, and an observation probability matrix of the HMM;
[0014] Determining an implicit sequence corresponding to the characteristic sequence of the speech signal according to the initial state probability matrix, the state transition probability matrix and the observation probability matrix;
[0015] Obtaining the probability of each of the implicit sequences;
[0016] The implied sequence with the highest probability is determined to be the optimal state sequence corresponding to the feature sequence of the speech signal.
[0017] In one embodiment, the optimal state sequence of the speech signal is dimensionally processed using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension, including:
[0018] Obtaining a feature vector of an optimal state sequence corresponding to the feature sequence of the speech signal in a current state;
[0019] Expand the eigenvectors in the current state row by row to obtain an eigenvector matrix in the current state;
[0020] Determine that the value at the position of the second preset number of rows in the first preset number of columns in the eigenvector matrix is the function value of the first preset function at the preset time in the current state;
[0021] Based on the function value of the first preset function at the preset time in the current state and the basis of the preset function space, obtaining coefficient feature vectors of the basis of the preset function space, the number of coefficient feature vectors of the basis of the preset function space is the same as the number of the basis of the preset function space;
[0022] The coefficient feature vector of the basis of the preset function space is used as the feature vector of the speech signal to obtain the feature vector of the speech signal with the same vector dimension.
[0023] In one embodiment, before using the first recognition network to recognize the feature vectors of the speech signal with the same vector dimension and obtaining the recognition result of the speech signal, the method provided by the present disclosure further includes:
[0024] Get the initial learning rate;
[0025] Determine the initial learning rate as a learning rate of a second recognition network, use the second recognition network to recognize feature vectors of the speech signal with the same vector dimension, and obtain a prediction output result of the second recognition network;
[0026] Determine an output error between an expected output result of obtaining a second recognition network and a predicted output result of the second recognition network;
[0027] According to the output error, calculating a learning rate corresponding to the output error;
[0028] Determine that the learning rate corresponding to the output error is the learning rate of the first recognition network, and obtain the first recognition network.
[0029] In one embodiment, before using HMM to decode the characteristic sequence of the speech signal to obtain the optimal state sequence of the speech signal, the method provided by the present disclosure further includes:
[0030] Acquire parameters of the HMM and a feature sequence of a training speech signal, wherein the feature sequence of the training speech signal includes at least two states;
[0031] Using the parameters of the HMM, calculating the likelihood probability distribution of the feature sequence of the training speech signal in each state;
[0032] Using the Baum-Welch algorithm, with the goal of maximizing the likelihood probability function value corresponding to the likelihood probability distribution, determine the optimal parameters of the HMM;
[0033] The parameters of the HMM are updated using the optimal parameters.
[0034] A second aspect of the present disclosure provides a speech signal recognition device, the device comprising:
[0035] An acquisition unit, used to acquire an optimal state sequence of a speech signal, wherein the optimal state sequence is a state sequence with the highest probability among all state sequences generating the speech signal;
[0036] A processing unit, configured to perform dimension processing on the optimal state sequence of the speech signal using a function approximation algorithm to obtain a feature vector of the speech signal having the same vector dimension;
[0037] The recognition unit is used to use the first recognition network to recognize the feature vector of the speech signal with the same vector dimension, and obtain the recognition result of the speech signal, wherein the recognition result of the speech signal is used to indicate the text information matching the speech signal.
[0038] A third aspect of the present disclosure provides an electronic device, including:
[0039] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the embodiment of the first aspect of the present disclosure.
[0040] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.
[0041] The fifth aspect embodiment of the present disclosure provides a computer program product, including a computer program, which implements the method described in the first aspect embodiment of the present disclosure when executed by a processor.
[0042] In summary, the present disclosure proposes a speech signal recognition method, which includes: obtaining an optimal state sequence of a speech signal, wherein the optimal state sequence is a state sequence with the highest probability among all state sequences that generate the speech signal; performing dimension processing on the optimal state sequence of the speech signal using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension; using a first recognition network to recognize the feature vector of the speech signal with the same vector dimension to obtain a recognition result of the speech signal, wherein the recognition result of the speech signal is used to indicate text information that matches the speech signal.
[0043] According to the scheme provided by the present disclosure, by obtaining the state sequence with the highest probability among all state sequences that generate the speech signal; using a function approximation algorithm to perform dimension processing on the optimal state sequence of the speech signal to obtain a feature vector of the speech signal with the same vector dimension, the intra-frame changes of the speech signal can be obtained, thereby retaining the classification information of the speech signal; by using a first recognition network to recognize the feature vector of the speech signal with the same vector dimension that retains the classification information of the speech signal, the recognition result of the speech signal is obtained, thereby improving the accuracy of speech recognition.
[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0046] Figure 1 A flowchart of a speech signal recognition method provided by an embodiment of the present disclosure;
[0047] Figure 2 A flowchart of a method for obtaining an optimal state sequence of a speech signal provided by an embodiment of the present disclosure;
[0048] Figure 3 A flow chart of a method for obtaining an optimal state sequence of a speech signal using HMM provided in an embodiment of the present disclosure;
[0049] Figure 4 A flowchart of a method for obtaining feature vectors of speech signals with the same vector dimension provided by an embodiment of the present disclosure;
[0050] Figure 5 A flowchart of a method for obtaining a learning rate of a first recognition network provided in an embodiment of the present disclosure;
[0051] Figure 6 A flow chart of a method for updating HMM parameters provided in an embodiment of the present disclosure;
[0052] Figure 7 A flowchart of a speech signal recognition method provided for an application example of the present disclosure;
[0053] Figure 8 A schematic diagram of the structure of a speech signal recognition device provided in an embodiment of the present disclosure;
[0054] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0055] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0056] In related speech signal recognition schemes, a hybrid model of HMM and ANN is usually used to recognize speech signals. Since the feature vector input to the ANN model during training needs to be of fixed dimension, the speech signal needs to be dimensionalized. However, the related dimensional processing method ignores the changes within the speech signal frame when processing the speech signal, resulting in the loss of classification information of the speech signal, which in turn leads to low accuracy of speech recognition.
[0057] The following briefly introduces several solutions of speech signal recognition methods in related technologies:
[0058] The related art provides HMM to process speech signals. HMM has strong modeling capabilities in processing dynamic time series, but its classification decision-making capabilities and pattern recognition performance are not satisfactory, and there are also shortcomings such as a priori assumption problems and the need for prior statistical knowledge of speech signals. The related art provides ANN model to process speech signals. ANN model has advantages such as good classification decision-making capabilities, self-learning capabilities, and fast convergence speed, and does not require a priori assumptions, but its modeling capabilities in processing dynamic time series are not strong. Therefore, there is a solution that provides a model that combines HMM and ANN models to process speech signals. By combining the dynamic time series modeling capabilities of HMM with the classification decision-making capabilities of ANN models, the advantages of the two models are fully utilized to further improve the accuracy of speech recognition.
[0059] The above solution has the following defects:
[0060] When a model combining HMM and ANN models is used to process speech signals, the classification information of the speech signals cannot be retained.
[0061] In order to address the defects in the related art, the present invention obtains the state sequence with the highest probability among all state sequences that generate the speech signal; uses a function approximation algorithm to perform dimension processing on the optimal state sequence of the speech signal to obtain a feature vector of the speech signal with the same vector dimension, thereby obtaining the intra-frame changes of the speech signal and retaining the classification information of the speech signal; and obtains the recognition result of the speech signal by using a first recognition network to recognize the feature vector of the speech signal with the same vector dimension that retains the classification information of the speech signal, thereby improving the accuracy of speech recognition.
[0062] The present disclosure is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0063] like Figure 1 As shown, Figure 1 The flow chart of the speech signal recognition method provided by the embodiment of the present disclosure is as follows. The speech signal recognition method provided by the embodiment of the present disclosure comprises the following steps:
[0064] Step 101, obtaining the best state sequence of the speech signal;
[0065] In one embodiment, the best state sequence is the state sequence with the highest probability among all state sequences that generate the speech signal.
[0066] In one embodiment, the optimal state sequence of the speech signal may be obtained by using a Viterbi algorithm.
[0067] Step 102, performing dimension processing on the optimal state sequence of the speech signal using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension;
[0068] In one embodiment, the function approximation algorithm uses a polynomial expansion method to perform dimensional processing on the optimal state sequence of the speech signal, obtain the coefficients of the polynomial, and then obtain a feature vector of the speech signal with the same vector dimension.
[0069] In one embodiment, by using a function approximation algorithm to perform dimension processing on the optimal state sequence of the speech signal to obtain a feature vector of the speech signal with the same vector dimension, the intra-frame changes of the speech signal can be obtained, thereby retaining the classification information of the speech signal.
[0070] Step 103: Use the first recognition network to recognize the feature vectors of the speech signal with the same vector dimension to obtain the recognition result of the speech signal.
[0071] In one embodiment, the recognition result of the voice signal is used to indicate text information matching the voice signal.
[0072] In one embodiment, the first recognition network may be a single recognition network, such as ANN or Convolutional Neural Network (CNN).
[0073] In one embodiment, the first recognition network may also be a network combining multiple networks, such as a network combining ANN and HMM, or a network combining Gaussian Mixture Model (GMM) and HMM.
[0074] In one embodiment, if Figure 2 As shown, the best state sequence of the speech signal is obtained, including:
[0075] Step 201, obtaining a voice signal;
[0076] In one embodiment, the voice signal may be acquired through an audio acquisition device.
[0077] In one embodiment, the speech signal may also be obtained from a public speech signal dataset, such as THCHS30, TIMIT and other datasets.
[0078] In one embodiment, the voice signal refers to an analog signal carrying certain voice information.
[0079] In one embodiment, the present disclosure does not limit the specific language in the voice signal.
[0080] Step 202, performing a first processing on the speech signal to obtain a feature sequence of the speech signal;
[0081] In one embodiment, the first processing includes preprocessing, endpoint detection and feature extraction.
[0082] In one embodiment, the preprocessing of the speech signal includes filtering, pre-emphasizing, framing and windowing the speech signal. By filtering the speech signal, the environmental noise in the speech signal can be reduced; by pre-emphasizing the speech signal, the energy of the high-frequency part of the speech signal can be increased; by framing the speech signal, the stationary characteristics of the speech signal in a local time can be obtained; by windowing the speech signal, the continuity of the boundaries between frames in the speech signal after framing can be improved.
[0083] In one embodiment, the endpoint detection of the speech signal includes separating the speech background and the effective speech, and locating the starting point and the ending point of the speech signal. By performing endpoint detection on the speech signal, the effective speech segment in the speech signal can be extracted.
[0084] In one embodiment, the feature extraction of the speech signal includes extracting information such as short-time energy and speech frequency of the speech signal. By extracting the features of the speech signal, the speech segments and silence segments in the speech signal can be effectively distinguished, which helps to improve the accuracy of speech signal recognition.
[0085] In one embodiment, the feature sequence of the speech signal refers to a sequence containing features of the speech signal, and the feature sequence of the speech signal includes at least two states.
[0086] Step 203: Decode the characteristic sequence of the speech signal using a hidden Markov model HMM to obtain the optimal state sequence of the speech signal.
[0087] In one embodiment, by decoding the feature sequence of the speech signal using HMM, at least one state sequence of the speech signal can be obtained, and the probability of the state sequence of each speech signal can be the same or different.
[0088] In one embodiment, the feature sequence of the speech signal is decoded using HMM to obtain the optimal state sequence of the speech signal, including using the feature sequence of the speech signal as the input of the HMM to obtain the output sequence of the speech signal, and then using the Viterbi algorithm to decode the output sequence of the speech signal to obtain the optimal state sequence of the speech signal, wherein the Viterbi algorithm obtains the state sequence with the highest probability by adopting a dynamic programming method.
[0089] In one embodiment, if Figure 3 As shown, the characteristic sequence of the speech signal is decoded by HMM to obtain the optimal state sequence of the speech signal, including:
[0090] Step 301, obtaining the initial state probability matrix, state transition probability matrix and observation probability matrix of the HMM;
[0091] In one embodiment, the initial state probability matrix of the HMM is used to indicate the probability of being in each state at the initial moment, the state transition probability matrix of the HMM is used to indicate the probability of transitioning between states, and the observation probability matrix of the HMM is used to indicate the probability of generating a feature sequence of the speech signal under a given state.
[0092] In one embodiment, the initial state probability matrix, state transition probability matrix and observation probability matrix of the HMM may be obtained through initialization.
[0093] In one embodiment, the initial state probability matrix, state transition probability matrix and observation probability matrix of the HMM may also be obtained through the Baum-Welch algorithm.
[0094] Step 302, determining an implicit sequence corresponding to the feature sequence of the speech signal according to the initial state probability matrix, the state transition probability matrix and the observation probability matrix;
[0095] In one embodiment, an implicit sequence corresponding to the feature sequence of the speech signal is determined based on the optimal state sequence of the speech signal, the initial state probability matrix, the state transition probability matrix and the observation probability matrix.
[0096] In one embodiment, based on the optimal state sequence of the speech signal, the initial state probability matrix, the state transition probability matrix and the observation probability matrix, the implicit sequence corresponding to the characteristic sequence of the speech signal at each moment is determined, and then the implicit sequence corresponding to the characteristic sequence of the speech signal is determined.
[0097] In one embodiment, the implicit sequences corresponding to the characteristic sequence of the speech signal include at least two.
[0098] Step 303, obtaining the probability of each of the implicit sequences;
[0099] In one embodiment, at different times, the implicit sequence of the same state is different.
[0100] In one embodiment, at the same time, the implicit sequences of different states are different.
[0101] In one embodiment, the probability of the implicit sequence at each moment is obtained, such as respectively obtaining the probability of the implicit sequence of each state at moment 1, moment 2, and moment 3.
[0102] In one embodiment, the probability of the implicit sequence of each state at the previous moment is obtained based on the probability of the implicit sequence of each state at the previous moment and the state transition probability matrix.
[0103] Step 304: determine the implied sequence with the highest probability as the best state sequence corresponding to the feature sequence of the speech signal.
[0104] In one embodiment, the implied sequence with the highest probability is used to indicate the implied sequence that is most likely to generate the feature sequence of the speech signal.
[0105] In one embodiment, the implicit sequence with the highest probability at the last moment is determined to be the best state sequence corresponding to the feature sequence of the speech signal.
[0106] In one embodiment, if Figure 4 As shown, the optimal state sequence of the speech signal is dimensionally processed using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension, including:
[0107] Step 401, obtaining a feature vector of the best state sequence corresponding to the feature sequence of the speech signal in the current state;
[0108] In one embodiment, the optimal state sequence corresponding to the feature sequence of the speech signal includes at least two states.
[0109] In one embodiment, the number of states in the optimal state sequence corresponding to the feature sequence of the speech signal is determined by the number of states of the Markov chain corresponding to the HMM.
[0110] In one embodiment, the feature vectors of the optimal state sequence corresponding to the feature sequence of the speech signal in the current state may be the same or different.
[0111] In one embodiment, the feature vector of the best state sequence corresponding to the feature sequence of the speech signal in the current state may be obtained through the HMM in the aforementioned embodiment.
[0112] Step 402, expanding the eigenvectors in the current state row by row to obtain an eigenvector matrix in the current state;
[0113] In one embodiment, there are m eigenvectors in the current state, each eigenvector has n dimensions, and the eigenvectors in the current state are expanded row by row to obtain a mathematical expression of the eigenvector matrix in the current state, which is expressed as follows:
[0114]
[0115] in, It represents the value of the nth dimension of the mth eigenvector in the i-th state, i = 1, 2, … S, S is the number of states.
[0116] Step 403, determining that the value of the position of the second preset number of rows in the first preset number of columns in the eigenvector matrix is the function value of the first preset function at the preset time in the current state;
[0117] In one embodiment, the first preset number is not greater than the number of feature vectors in the current state.
[0118] In one embodiment, the size of the second preset number is not greater than the size of the dimension of each feature vector.
[0119] In one embodiment, the size of the maximum time of the preset time is the same as the number of feature vectors in the current state.
[0120] In one embodiment, different first preset number columns correspond to different first preset functions, and the same preset number columns correspond to the same first preset function.
[0121] Step 404, based on the function value of the first preset function at the preset time in the current state and the basis of the preset function space, obtain a coefficient feature vector of the basis of the preset function space;
[0122] In one embodiment, the number of coefficient eigenvectors of the basis of the preset function space is the same as the number of the basis of the preset function space.
[0123] In one embodiment, the mathematical expression for obtaining the coefficient feature vector of the basis of the preset function space is expressed as follows:
[0124]
[0125] in, is the basis of the preset function space, is the function value of the first preset function corresponding to the jth preset number of columns at the preset time t in the i-th state, is the coefficient eigenvector of the basis of the preset function space in the i-th state.
[0126] Step 405: Using the coefficient feature vector of the basis of the preset function space as the feature vector of the speech signal, to obtain the feature vector of the speech signal with the same vector dimension.
[0127] In one embodiment, since the dimension of the coefficient feature vector of the basis of the preset function space is known, the feature vector of the speech signal with the same vector dimension can be obtained by using the coefficient feature vector of the basis of the preset function space as the feature vector of the speech signal.
[0128] In one embodiment, if Figure 5 As shown, before using the first recognition network to recognize the feature vector of the speech signal with the same vector dimension and obtaining the recognition result of the speech signal, the speech signal recognition method further includes:
[0129] Step 501, obtaining an initial learning rate;
[0130] In one embodiment, the initial learning rate may be obtained through random initialization.
[0131] In one embodiment, the initial learning rate may also be obtained by searching literature related to learning rate.
[0132] Step 502, determining the initial learning rate as the learning rate of the second recognition network, using the second recognition network to recognize the feature vectors of the speech signal with the same vector dimension, and obtaining the prediction output result of the second recognition network;
[0133] In one embodiment, if the initial learning rate is too large, the convergence speed of the second recognition network will be too fast, thereby causing the second recognition network to be unstable. If the initial learning rate is too small, the convergence speed of the second recognition network will be slow, thereby causing the accuracy of the second recognition network to decrease.
[0134] In one embodiment, the initial learning rate is determined to be the learning rate of the second recognition network, and the second recognition network is used to recognize the feature vector of the speech signal with the same vector dimension. The predicted output result of the second recognition network may be significantly different from the expected output result. Therefore, it is necessary to determine the optimal learning rate to improve the accuracy of the recognition network.
[0135] Step 503, determining an output error between an expected output result of the second recognition network and a predicted output result of the second recognition network;
[0136] In one embodiment, the output error between the expected output result of the second recognition network and the predicted output result of the second recognition network can be determined by calculating the mean square error loss between the expected output result of the second recognition network and the predicted output result of the second recognition network.
[0137] In one embodiment, the output error between the expected output result of the second recognition network and the predicted output result of the second recognition network can also be determined by calculating the cross entropy loss between the expected output result of the second recognition network and the predicted output result of the second recognition network.
[0138] Step 504, calculating a learning rate corresponding to the output error according to the output error;
[0139] In one embodiment, according to the output error, a stochastic gradient descent algorithm may be used to calculate a learning rate corresponding to the output error.
[0140] In one embodiment, based on the output error, an adaptive learning algorithm may also be used to calculate a learning rate corresponding to the output error.
[0141] In one embodiment, by calculating the learning rate corresponding to the output error according to the output error, the learning rate can be recalculated in each iteration to meet the requirements of stable network learning while increasing the convergence speed of the network.
[0142] Step 505: Determine the learning rate corresponding to the output error as the learning rate of the first recognition network to obtain the first recognition network.
[0143] In one embodiment, by determining the learning rate corresponding to the output error as the learning rate of the first recognition network, a first recognition network is obtained, which can improve the accuracy of the recognition result when the speech signal is subsequently processed.
[0144] In one embodiment, if Figure 6 As shown, before using HMM to decode the characteristic sequence of the speech signal to obtain the optimal state sequence of the speech signal, the speech signal recognition method further includes:
[0145] Step 601, obtaining the parameters of the HMM and the feature sequence of the training speech signal;
[0146] In one embodiment, the feature sequence of the training speech signal includes at least two states.
[0147] In one embodiment, the parameters of the HMM may be acquired through prior information, and the feature sequence of the training speech signal may be acquired by performing a first processing on the training speech signal.
[0148] Step 602, using the parameters of the HMM, calculating the likelihood probability distribution of the feature sequence of the training speech signal in each state;
[0149] In one embodiment, a forward-backward algorithm is used to calculate the likelihood probability distribution of the feature sequence of the training speech signal in each state, including the expected number of visits in each state and the expected number of transitions between states.
[0150] Step 603, using the Baum-Welch algorithm, with the goal of maximizing the likelihood probability function value corresponding to the likelihood probability distribution, to determine the optimal parameters of the HMM;
[0151] In one embodiment, the Baum-Welch algorithm is an expectation-maximization (EM) algorithm used to obtain the optimal parameters of the HMM.
[0152] In one embodiment, by taking the maximum value of the likelihood probability function corresponding to the likelihood probability distribution as the goal, the iteration is continued until a termination condition is met, and the parameters of the HMM at the termination are determined as the optimal parameters of the HMM.
[0153] Step 604: Update the parameters of the HMM using the optimal parameters.
[0154] In one embodiment, after the parameters of the HMM are updated using the optimal parameters, a more accurate optimal state sequence of the speech signal can be obtained by decoding the feature sequence of the speech signal using the HMM using the optimal parameters.
[0155] In summary, the solution provided by the present disclosure is:
[0156] First, by obtaining the state sequence with the highest probability among all the state sequences that generate the speech signal; using a function approximation algorithm to perform dimension processing on the optimal state sequence of the speech signal to obtain a feature vector of the speech signal with the same vector dimension, the changes within the speech signal frame can be obtained, and the classification information of the speech signal can be retained; by using a first recognition network to recognize the feature vector of the speech signal with the same vector dimension that retains the classification information of the speech signal, the recognition result of the speech signal can be obtained, which can improve the accuracy of speech recognition.
[0157] Secondly, by determining the learning rate corresponding to the output error as the learning rate of the first recognition network, a first recognition network is obtained, which can improve the accuracy of the recognition result when the speech signal is subsequently processed.
[0158] The following is an application example to further illustrate the speech signal recognition method provided by the present disclosure:
[0159] like Figure 7 As shown, Figure 7A flow chart of a speech signal recognition method provided by an application example of the present disclosure. The speech signal recognition method provided by an application example of the present disclosure comprises the following steps:
[0160] Step 701, obtaining a voice signal;
[0161] Step 702, performing a first processing on the speech signal to obtain a feature sequence of the speech signal;
[0162] In one embodiment, the first processing includes preprocessing, endpoint detection and feature extraction.
[0163] Step 703, obtaining the initial state probability matrix, state transition probability matrix and observation probability matrix of the HMM;
[0164] Step 704, determining an implicit sequence corresponding to the characteristic sequence of the speech signal according to the initial state probability matrix, the state transition probability matrix and the observation probability matrix;
[0165] Step 705, obtaining the probability of each of the implicit sequences;
[0166] Step 706, determining the implied sequence with the highest probability as the optimal state sequence corresponding to the characteristic sequence of the speech signal;
[0167] Step 707, obtaining a feature vector of the optimal state sequence corresponding to the feature sequence of the speech signal in the current state;
[0168] Step 708, expanding the eigenvectors in the current state row by row to obtain the eigenvector matrix in the current state;
[0169] Step 709, determining that the value of the position of the second preset number of rows in the first preset number of columns in the eigenvector matrix is the function value of the first preset function at the preset time in the current state;
[0170] Step 710, based on the function value of the first preset function at the preset time in the current state and the basis of the preset function space, obtain a coefficient feature vector of the basis of the preset function space;
[0171] In one embodiment, the number of coefficient eigenvectors of the basis of the preset function space is the same as the number of the basis of the preset function space.
[0172] Step 711, using the coefficient feature vector of the basis of the preset function space as the feature vector of the speech signal, to obtain the feature vector of the speech signal with the same vector dimension;
[0173] Step 712, obtaining an initial learning rate;
[0174] Step 713, determining the initial learning rate as the learning rate of the second recognition network, using the second recognition network to recognize the feature vectors of the speech signal with the same vector dimension, and obtaining the prediction output result of the second recognition network;
[0175] Step 714, determining an output error between an expected output result of the second recognition network and a predicted output result of the second recognition network;
[0176] Step 715, calculating a learning rate corresponding to the output error according to the output error;
[0177] Step 716, determining that the learning rate corresponding to the output error is the learning rate of the first recognition network, and obtaining the first recognition network;
[0178] Step 717: Use the first recognition network to recognize the feature vectors of the speech signal with the same vector dimension to obtain the recognition result of the speech signal.
[0179] In one embodiment, the recognition result of the voice signal is used to indicate text information matching the voice signal.
[0180] In one embodiment, before using HMM to decode the characteristic sequence of the speech signal to obtain the optimal state sequence of the speech signal, the method further includes:
[0181] Acquire parameters of the HMM and a feature sequence of a training speech signal, wherein the feature sequence of the training speech signal includes at least two states;
[0182] Using the parameters of the HMM, calculating the likelihood probability distribution of the feature sequence of the training speech signal in each state;
[0183] Using the Baum-Welch algorithm, with the goal of maximizing the likelihood probability function value corresponding to the likelihood probability distribution, determine the optimal parameters of the HMM;
[0184] The parameters of the HMM are updated using the optimal parameters.
[0185] In order to implement the voice signal recognition method provided by the embodiment of the present disclosure, the embodiment of the present disclosure also provides a voice signal recognition device, such as Figure 8 shown. Figure 8 The structure diagram of the speech signal recognition device provided by the embodiment of the present disclosure is as follows. The speech signal recognition device 800 includes:
[0186] An acquisition unit 801 is used to acquire an optimal state sequence of a speech signal, wherein the optimal state sequence is a state sequence with the highest probability among all state sequences generating the speech signal;
[0187] A processing unit 802 is used to perform dimension processing on the optimal state sequence of the speech signal using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension;
[0188] The recognition unit 803 is used to use the first recognition network to recognize the feature vector of the speech signal with the same vector dimension to obtain the recognition result of the speech signal, and the recognition result of the speech signal is used to indicate the text information matching the speech signal.
[0189] In one embodiment, the acquisition unit 801 is specifically configured to:
[0190] Acquire speech signals;
[0191] Performing a first processing on the speech signal to obtain a feature sequence of the speech signal, wherein the first processing includes preprocessing, endpoint detection, and feature extraction;
[0192] The characteristic sequence of the speech signal is decoded using a hidden Markov model HMM to obtain an optimal state sequence of the speech signal.
[0193] In one embodiment, the acquisition unit 801 is specifically configured to:
[0194] Obtaining an initial state probability matrix, a state transition probability matrix, and an observation probability matrix of the HMM;
[0195] Determining an implicit sequence corresponding to the characteristic sequence of the speech signal according to the initial state probability matrix, the state transition probability matrix and the observation probability matrix;
[0196] Obtaining the probability of each of the implicit sequences;
[0197] The implied sequence with the highest probability is determined to be the optimal state sequence corresponding to the feature sequence of the speech signal.
[0198] In one embodiment, the processing unit 802 is specifically configured to:
[0199] Obtaining a feature vector of an optimal state sequence corresponding to the feature sequence of the speech signal in a current state;
[0200] Expand the eigenvectors in the current state row by row to obtain an eigenvector matrix in the current state;
[0201] Determine that the value at the position of the second preset number of rows in the first preset number of columns in the eigenvector matrix is the function value of the first preset function at the preset time in the current state;
[0202] Based on the function value of the first preset function at the preset time in the current state and the basis of the preset function space, obtaining coefficient feature vectors of the basis of the preset function space, the number of coefficient feature vectors of the basis of the preset function space is the same as the number of the basis of the preset function space;
[0203] The coefficient feature vector of the basis of the preset function space is used as the feature vector of the speech signal to obtain the feature vector of the speech signal with the same vector dimension.
[0204] In one embodiment, the speech signal recognition apparatus 800 further includes a learning rate determination unit, which is used to:
[0205] Get the initial learning rate;
[0206] Determine the initial learning rate as a learning rate of a second recognition network, use the second recognition network to recognize feature vectors of the speech signal with the same vector dimension, and obtain a prediction output result of the second recognition network;
[0207] Determine an output error between an expected output result of obtaining a second recognition network and a predicted output result of the second recognition network;
[0208] According to the output error, calculating a learning rate corresponding to the output error;
[0209] Determine that the learning rate corresponding to the output error is the learning rate of the first recognition network, and obtain the first recognition network.
[0210] In one embodiment, the speech signal recognition apparatus 800 further includes an updating unit, which is configured to:
[0211] Acquire parameters of the HMM and a feature sequence of a training speech signal, wherein the feature sequence of the training speech signal includes at least two states;
[0212] Using the parameters of the HMM, calculating the likelihood probability distribution of the feature sequence of the training speech signal in each state;
[0213] Using the Baum-Welch algorithm, with the goal of maximizing the likelihood probability function value corresponding to the likelihood probability distribution, determine the optimal parameters of the HMM;
[0214] The parameters of the HMM are updated using the optimal parameters.
[0215] It should be noted that: when the speech signal recognition device provided in the above embodiment performs speech signal recognition, only the division of the above program modules is used as an example. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the speech signal recognition device is divided into different program modules to complete all or part of the processing described above. In addition, the speech signal recognition device provided in the above embodiment and the speech signal recognition method embodiment provided in the embodiment of the present disclosure belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0216] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the electronic device 900 includes at least one processor 902; and a memory 901 communicatively connected to the at least one processor 902; wherein the memory 901 stores instructions that can be executed by the at least one processor 902, and the instructions are executed by the at least one processor 902 to implement the steps of the speech signal recognition method of the embodiment of the present disclosure.
[0217] Optionally, the electronic device may specifically be a voice signal recognition device in an embodiment of the present application, and the electronic device may implement the corresponding processes implemented by the voice signal recognition device in each method in the embodiment of the present application, which will not be described in detail here for the sake of brevity.
[0218] It is understood that the electronic device also includes a communication interface 903. The various components in the electronic device are coupled together through a bus system 904. It is understood that the bus system 904 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig. 9 Various buses are labeled as bus system 904.
[0219] It can be understood that the memory 901 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 901 described in the embodiment of the present invention is intended to include but is not limited to these and any other suitable types of memories.
[0220] The method disclosed in the above embodiment of the present disclosure can be applied to the processor 902, or implemented by the processor 902. The processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 902 or the instruction in the form of software. The above processor 902 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 902 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 901, and the processor 902 reads the information in the memory 901 and completes the steps of the above method in combination with its hardware.
[0221] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general purpose processors, controllers, MCUs, microprocessors, or other electronic components to execute the aforementioned method.
[0222] The embodiment of the present case also provides a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to implement the steps of the speech signal recognition method of the embodiment of the present invention when executed by a computer.
[0223] Optionally, the computer-readable storage medium can be applied to the speech signal recognition device in the embodiments of the present application, and the computer instructions enable the computer to execute the corresponding processes implemented by the speech signal recognition device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.
[0224] The embodiment of the present disclosure also provides a computer program product, including a computer program, which implements the steps of the speech signal recognition method provided by the embodiment of the present invention when executed by a processor.
[0225] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0226] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0227] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0228] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0229] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0230] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for recognizing a speech signal, It is characterized in that include: Acquire an optimal state sequence of a speech signal, wherein the optimal state sequence is a state sequence with the highest probability among all state sequences that generate the speech signal; Performing dimension processing on the optimal state sequence of the speech signal using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension; The first recognition network is used to recognize the feature vector of the speech signal with the same vector dimension to obtain a recognition result of the speech signal, wherein the recognition result of the speech signal is used to indicate text information matching the speech signal.
2. The method according to claim 1, It is characterized in that The method of obtaining the optimal state sequence of the speech signal comprises: Acquire speech signals; Performing a first processing on the speech signal to obtain a feature sequence of the speech signal, wherein the first processing includes preprocessing, endpoint detection, and feature extraction; The characteristic sequence of the speech signal is decoded using a hidden Markov model HMM to obtain an optimal state sequence of the speech signal.
3. The method according to claim 2, It is characterized in that The method of using HMM to decode the characteristic sequence of the speech signal to obtain the optimal state sequence of the speech signal includes: Obtaining an initial state probability matrix, a state transition probability matrix, and an observation probability matrix of the HMM; Determining an implicit sequence corresponding to the characteristic sequence of the speech signal according to the initial state probability matrix, the state transition probability matrix and the observation probability matrix; Obtaining the probability of each of the implicit sequences; The implied sequence with the highest probability is determined to be the optimal state sequence corresponding to the feature sequence of the speech signal.
4. The method according to claim 1, It is characterized in that The method of performing dimension processing on the optimal state sequence of the speech signal by using a function approximation algorithm to obtain a feature vector of the speech signal with the same vector dimension comprises: Obtaining a feature vector of an optimal state sequence corresponding to the feature sequence of the speech signal in a current state; Expand the eigenvectors in the current state row by row to obtain an eigenvector matrix in the current state; Determine that the value at the position of the second preset number of rows in the first preset number of columns in the eigenvector matrix is the function value of the first preset function at the preset time in the current state; Based on the function value of the first preset function at the preset time in the current state and the basis of the preset function space, obtaining coefficient feature vectors of the basis of the preset function space, the number of coefficient feature vectors of the basis of the preset function space is the same as the number of the basis of the preset function space; The coefficient feature vector of the basis of the preset function space is used as the feature vector of the speech signal to obtain the feature vector of the speech signal with the same vector dimension.
5. The method according to claim 1, It is characterized in that Before using the first recognition network to recognize the feature vectors of the speech signal having the same vector dimension and obtaining the recognition result of the speech signal, the method further includes: Get the initial learning rate; Determine the initial learning rate as a learning rate of a second recognition network, use the second recognition network to recognize feature vectors of the speech signal with the same vector dimension, and obtain a prediction output result of the second recognition network; Determine an output error between an expected output result of obtaining a second recognition network and a predicted output result of the second recognition network; According to the output error, calculating a learning rate corresponding to the output error; Determine that the learning rate corresponding to the output error is the learning rate of the first recognition network, and obtain the first recognition network.
6. The method according to claim 2, It is characterized in that Before the feature sequence of the speech signal is decoded by HMM to obtain the optimal state sequence of the speech signal, the method further comprises: Acquire parameters of the HMM and a feature sequence of a training speech signal, wherein the feature sequence of the training speech signal includes at least two states; Using the parameters of the HMM, calculating the likelihood probability distribution of the feature sequence of the training speech signal in each state; Using the Baum-Welch algorithm, with the goal of maximizing the likelihood probability function value corresponding to the likelihood probability distribution, determine the optimal parameters of the HMM; The parameters of the HMM are updated using the optimal parameters.
7. A speech signal recognition device, It is characterized in that include: An acquisition unit, used to acquire an optimal state sequence of a speech signal, wherein the optimal state sequence is a state sequence with the highest probability among all state sequences generating the speech signal; A processing unit, configured to perform dimension processing on the optimal state sequence of the speech signal using a function approximation algorithm to obtain a feature vector of the speech signal having the same vector dimension; The recognition unit is used to use the first recognition network to recognize the feature vector of the speech signal with the same vector dimension, and obtain the recognition result of the speech signal, wherein the recognition result of the speech signal is used to indicate the text information matching the speech signal.
8. An electronic device, It is characterized in that include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, wherein the computer program implements the method according to any one of claims 1 to 6 when executed by a processor.
