Method, device, equipment and storage medium for constructing speech recognition model

By using unlabeled data features and CTC loss functions in the speech recognition model, combined with independent convolutional layers and convolutional residual layers, the problems of increased error rates and high training time costs in deep neural networks are solved, and a more efficient Speech recognition performance and simplified training process.

CN110751944BActive Publication Date: 2024-09-24PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910884620.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-19
Publication Date
2024-09-24
Estimated Expiration
2039-09-19

AI Technical Summary

Technical Problem

In speech recognition, the error rate of deep neural networks increases as the network level increases, and existing speech recognition models require a tedious speech sample alignment process before training, which consumes a lot of time and cost.

Method used

By obtaining the characteristics of unlabeled data, supervised learning is introduced to expand and improve the efficiency of sample data utilization. Independent convolutional layers, convolutional residual layers and fully connected layers are used to build speech recognition models. The CTC loss function is used to evaluate the error, and by-pass channel and triangular bandpass filters to simplify the training process.

Benefits of technology

It improves the accuracy of the speech recognition model, simplifies the training process, saves the production cost of training speech sample sets, and reduces the computational complexity of the speech recognition process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110751944B
    Figure CN110751944B
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence, and provides a method, apparatus, device and storage medium for constructing a speech recognition model. The method comprises: obtaining a plurality of training speech samples; constructing a speech recognition model through an independent convolutional layer, a convolutional residual layer, a fully connected layer and an output layer; inputting the training speech information into the speech recognition model, updating the neuron weights of the speech recognition model through natural language processing (NLP) technology, the speech information and text labels corresponding to the speech information, so as to obtain a target model; and obtaining a target model through L(S)=‑ln∏. (h(x),z)∈S p(z|h(x))=‑∑ (h(x),z)∈S ln p(z|h(x)) evaluates the error of the target model; adjusts the weight of the neuron of the target model until the error is less than a threshold, sets the neuron weight with the error less than the threshold as the ideal weight; deploys the target model and the ideal weight to the client. The influence of the tone in the speech information on the predicted text and the amount of calculation in the speech recognition model recognition process are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent decision-making, and in particular to a method, apparatus, device and storage medium for constructing a speech recognition model. Background Art

[0002] Speech recognition is used to convert speech into text. With the continuous development of deep learning technology, the application scope of speech recognition is becoming wider and wider.

[0003] At present, deep neural networks (DNN) have become a hot topic in the field of automatic speech recognition. Convolutional neural networks (CNN) and recurrent neural networks (RNN) have achieved relatively good results in creating speech recognition models, and deep learning has become the mainstream solution for speech recognition.

[0004] In deep neural networks, the depth of the network is often closely related to the accuracy of recognition, because traditional deep neural networks can extract multi-level features of low, mid and high levels. The more layers the network has, the richer the features extracted. However, as the network layers continue to deepen, the "degeneration phenomenon" of deep neural networks also begins to appear, causing the accuracy of speech recognition to quickly reach saturation, and the deeper the network layers, the higher the error rate. In addition, the existing speech recognition model needs to align the speech training samples before training, and align each frame of speech data with the corresponding label to ensure that the loss function used in training can accurately estimate the training error of the speech recognition model. However, the alignment process of speech training samples is cumbersome and complicated, and requires a lot of time. Summary of the invention

[0005] In the example of the present invention, by obtaining the features of unlabeled data, the obtained features are introduced into supervised learning, so that the available sample data is expanded and the utilization efficiency of unlabeled images is improved, and the accuracy of model prediction is increased.

[0006] In a first aspect, the present application provides a method for constructing a speech recognition model, comprising:

[0007] Acquire a plurality of training speech samples, wherein the training speech samples include speech information and text labels corresponding to the speech information;

[0008] A speech recognition model is constructed by an independent convolutional layer, a convolutional residual layer, a fully connected layer and an output layer, wherein the convolutional residual layer includes a plurality of sequentially connected residual stacking layers, the residual stacking layer includes a plurality of sequentially connected residual modules, the residual module includes a plurality of sequentially connected hidden layers and a bypass channel bypassing a plurality of sequentially connected weight layers;

[0009] Inputting the plurality of speech samples into the speech recognition model in sequence, using the speech information and the text label corresponding to the speech information as the input and output of the speech recognition model respectively, continuously training the neuron weights of the speech recognition model through the input and the output until all the speech samples have been input into the speech recognition model, and then completing the training of the speech recognition model. After the training is completed, the speech recognition model with the trained neuron weights is used as the target model;

[0010] By L(S) = -lnΠ (h(x),z)∈S p(z|h(x))=-∑ (h(x),z)∈S ln p(z|h(x)) evaluates the error of the target model, wherein L(S) is the error, x is the speech information, z is the text label, p(z|h(x)) is the similarity between the predicted text and the text label, S is the multiple training speech samples, and the predicted text refers to the text information output by the target model according to the neuron weight calculation after the speech information is input into the target model;

[0011] Adjusting the weights of the neurons of the target model until the error is less than a threshold, and setting the weights of the neurons whose error is less than the threshold as ideal weights;

[0012] The target model and the ideal weights are deployed to a client.

[0013] In some possible designs, before inputting the plurality of speech samples into the speech recognition model, the method further includes:

[0014] Processing the training voice information by framing according to preset framing parameters to obtain a sentence corresponding to the training voice information, wherein the preset framing parameters include frame duration, number of frames, and repetition duration of previous and next frames;

[0015] The sentence is transformed according to preset two-dimensional parameters and filter bank feature extraction algorithm to obtain two-dimensional speech information.

[0016] In some possible designs, the framing processing of the training speech information according to a preset framing parameter includes:

[0017] Performing a discrete Fourier transform on the two-dimensional speech information to obtain a linear spectrum X(k) corresponding to the two-dimensional speech information;

[0018] The linear spectrum is filtered by a preset bandpass filter to obtain a target linear spectrum. When the center frequency of the bandpass filter is f(m), the transfer function of the bandpass filter is:

[0019] The expression of f(m) is:

[0020]

[0021] The bandpass filter includes a plurality of bandpass filters having triangular filtering characteristics. l is the lowest frequency of the bandpass filter frequency range, the f h is the highest frequency of the bandpass filter frequency range, N is the length of DFT, and f s is the sampling frequency of the bandpass filter, the F mel Function is F mel =1125ln(1+f / 700), the inverse function of Fmel is: b is an integer;

[0022] according to 0≤m≤M calculates the logarithmic energy corresponding to the target linear spectrum to obtain a spectrogram, and X(k) is the linear spectrum.

[0023] In some possible designs, the fully connected layer includes a classification function, wherein the classification function refers to The j is a natural number, and the classification function compresses the K-dimensional speech-domain signal vector z output by the convolution residual layer into another K-dimensional real vector δ(z) j , so that each element ranges between (0, 1) and the sum of all elements is 1.

[0024] In some possible designs, the input of the residual module is x, and the output of the output residual module is y, then the mathematical expression of the residual module is:

[0025] y=F(x,w i )+w s x, the F(x, w i ) is the output of the independent convolutional layer, and the w s is the weight of the residual module.

[0026] In some possible designs, the F(x, w i) uses the ReLU function as the activation function of the independent convolutional layer, and the mathematical expression of the ReLU function is ReLU(x)=max(0,x),

[0027] In some possible designs, adjusting the weights of neurons of the target model includes:

[0028] The weights of the neurons are adjusted by stochastic gradient descent.

[0029] In a second aspect, the present application provides a device for constructing a speech recognition model, which has the function of implementing the method for constructing a platform for a speech recognition model provided in the first aspect above. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, and the modules can be software and / or hardware.

[0030] The device for constructing a speech recognition model comprises:

[0031] An acquisition module, used to acquire a plurality of training speech samples, wherein the training speech samples include speech information and text labels corresponding to the speech information;

[0032] A processing module is used to construct a speech recognition model through an independent convolutional layer, a convolutional residual layer, a fully connected layer and an output layer, wherein the convolutional residual layer includes a plurality of sequentially connected residual stacking layers, the residual stacking layer includes a plurality of sequentially connected residual modules, the residual module includes a plurality of sequentially connected hidden layers and a bypass channel bypassing a plurality of sequentially connected weight layers, the plurality of speech samples are sequentially input into the speech recognition model through an input-output module, the speech information and the text label corresponding to the speech information are respectively used as the input and output of the speech recognition model, the neuron weights of the speech recognition model are continuously trained through the input and the output until the speech samples are all input into the speech recognition model, and the training of the speech recognition model is terminated, after the training is completed, the speech recognition model with the trained neuron weights is used as the target model, and L(S)=-lnΠ is used to perform the training. (h(x),z)∈S p(z|h(x))=-∑ (h(x),z)∈S ln p(z|h(x)) evaluates the error of the target model, wherein L(S) is the error, x is the speech information, z is the text label, p(z|h(x)) is the similarity between the predicted text and the text label, S is the multiple training speech samples, and the predicted text refers to the text information output by the target model according to the neuron weight calculation after the speech information is input into the target model;

[0033] The weights of the neurons of the target model are adjusted until the error is less than a threshold, the weights of the neurons whose error is less than the threshold are set as ideal weights, and the target model and the ideal weights are deployed to the client.

[0034] In some possible designs, the processing module is further configured to:

[0035] Processing the training voice information by framing according to preset framing parameters to obtain a sentence corresponding to the training voice information, wherein the preset framing parameters include frame duration, number of frames, and repetition duration of previous and next frames;

[0036] The sentence is transformed according to preset two-dimensional parameters and filter bank feature extraction algorithm to obtain two-dimensional speech information.

[0037] In some possible designs, the processing module is further configured to:

[0038] Performing a discrete Fourier transform on the two-dimensional speech information to obtain a linear spectrum X(k) corresponding to the two-dimensional speech information;

[0039] The linear spectrum is filtered by a preset bandpass filter to obtain a target linear spectrum. When the center frequency of the bandpass filter is f(m), the transfer function of the bandpass filter is:

[0040] The expression of f(m) is:

[0041]

[0042] The bandpass filter includes a plurality of bandpass filters having triangular filtering characteristics. l is the lowest frequency of the bandpass filter frequency range, the f h is the highest frequency in the frequency range of the bandpass filter, N is the length of DFT, and f s is the sampling frequency of the bandpass filter, the F mel Function is F mel =1125ln(1+f / 700), the inverse function of Fmel is: b is an integer;

[0043] according to 0≤m≤M calculates the logarithmic energy corresponding to the target linear spectrum to obtain a spectrogram, and X(k) is the linear spectrum.

[0044] In some possible designs, the fully connected layer includes a classification function, wherein the classification function refers to The j is a natural number, and the classification function compresses the K-dimensional speech-domain signal vector z output by the convolution residual layer into another K-dimensional real vector δ(z) j , so that each element ranges between (0, 1) and the sum of all elements is 1.

[0045] In some possible designs, the processing module is further used for: the input of the residual module is x, the output of the output residual module is y, and the mathematical expression of the residual module is:

[0046] y=F(x,w i )+w s x, the F(x, w i ) is the output of the independent convolutional layer, and the w s is the weight of the residual module.

[0047] In some possible designs, the F(x, w i ) adopts the ReLU function as the activation function of the independent convolutional layer, and the mathematical expression of the ReLU function is ReLU(x)=max(0,x).

[0048] In some possible designs, adjusting the weights of neurons of the target model includes:

[0049] The weights of the neurons are adjusted by stochastic gradient descent.

[0050] On the other hand, the present application provides a device for constructing a speech recognition model, which includes at least one connected processor, memory, and input and output units, wherein the memory is used to store program code, and the processor is used to call the program code in the memory to execute the methods described in the above aspects.

[0051] In another aspect, the present application provides a computer storage medium, which includes instructions. When the instructions are executed on a computer, the computer is enabled to execute the methods described in the above aspects.

[0052] The present application directly bypasses the input information x to the output of the hidden layer through a bypass channel. The bypass channel has no weights, which protects the integrity of the input information x, allowing the neural network to be trained more deeply. The entire neural network only needs to train the difference between the input and output, that is, after transmitting the input information x, each residual module only learns the residual F(x), which simplifies the training objectives and difficulty, and the neural network is stable and easy to train. As the depth of the neural network increases, the performance of the speech recognition model gradually improves, and the predicted text of the speech recognition model is evaluated by the CTC loss function. There is no need to consider the precise mapping relationship between the pronunciation phonemes in the text label and the sequence of the training speech information. Only the input sequence and the output sequence are needed to train the speech recognition model, saving the production cost of the training speech sample set. In addition, a triangular bandpass filter is used to smooth the spectrum of the training speech information, eliminate the harmonics in the training speech information, highlight the resonance peaks of the original sound, avoid the influence of the tone in the speech information on the predicted text of the speech recognition model, and reduce the amount of calculation of the speech information in the recognition process of the speech recognition model. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A flowchart of a method for constructing a speech recognition model in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of the structure of a device for constructing a speech recognition model in an embodiment of the present application;

[0055] Figure 3 This is a schematic diagram of the structure of the device for constructing a speech recognition model in an embodiment of the present application.

[0056] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device including a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of the modules that appear in the present application is only a logical division, and there may be other division methods when implemented in practical applications, for example, multiple modules can be combined into or integrated in another system, or some features can be ignored or not executed.

[0058] In order to solve the above technical problems, this application mainly provides the following technical solutions:

[0059] The present application directly bypasses the input information x to the output of the hidden layer through a bypass channel. The bypass channel has no weights, which protects the integrity of the input information x, allowing the neural network to be trained more deeply. The entire neural network only needs to train the difference between the input and output, that is, after transmitting the input information x, each residual module only learns the residual F(x), which simplifies the training objectives and difficulty, and the neural network is stable and easy to train. As the depth of the neural network increases, the performance of the speech recognition model gradually improves, and the predicted text of the speech recognition model is evaluated by the CTC loss function. There is no need to consider the precise mapping relationship between the pronunciation phonemes in the text label and the sequence of the training speech information. Only the input sequence and the output sequence are needed to train the speech recognition model, saving the production cost of the training speech sample set. In addition, a triangular bandpass filter is used to smooth the spectrum of the training speech information, eliminate the harmonics in the training speech information, highlight the resonance peaks of the original sound, avoid the influence of the tone in the speech information on the predicted text of the speech recognition model, and reduce the amount of calculation of the speech information in the recognition process of the speech recognition model.

[0060] Please refer to Figure 1 The following is an example of a method for constructing a speech recognition model provided by the present application, the method comprising:

[0061] 101. Obtain multiple training speech samples.

[0062] The training speech sample includes speech information and text labels corresponding to the speech information.

[0063] Text labels are used to annotate the pronunciation phonemes of the training speech information.

[0064] The voice information is recorded in advance and the content of the recording is written into text; the words in the text are numbered according to the order of the words, and each word is annotated according to its pronunciation phoneme to obtain a text label. Each pronunciation phoneme in the text label corresponds to one or more frames of data in the recording.

[0065] 102. Construct a speech recognition model through independent convolutional layers, convolutional residual layers, fully connected layers and output layers.

[0066] The convolutional residual layer includes a plurality of sequentially connected residual stacked layers. The residual stacked layer includes a plurality of sequentially connected residual modules. The residual module includes a plurality of sequentially connected hidden layers and a bypass channel bypassing the plurality of sequentially connected weight layers.

[0067] Independent convolutional layers are used to extract acoustic features from speech information and eliminate non-maxima in acoustic features to reduce the complexity of acoustic features. Acoustic features include the pronunciation of specific syllables, user's connected reading habits, and speech spectrum.

[0068] The convolutional residual layer is used to map the acoustic features to the hidden feature space.

[0069] The fully connected layer is used to integrate the acoustic features mapped to the hidden feature space to obtain the meaning of the acoustic features and output the probabilities corresponding to various text types based on the meaning.

[0070] The output layer is used to output the text corresponding to the speech information according to the probabilities corresponding to various text types.

[0071] The speech recognition model in this embodiment adds bypass channels to several hidden layers connected in sequence to solve the problem that the training accuracy of traditional neural networks decreases as the number of network layers increases. The convolution residual layer of the speech recognition model has many bypass channels, which serve as branches of the hidden layer to achieve cross-layer connection between hidden layers, that is, directly connect the input of the hidden layer to the next level layer, so that the next level layer can directly learn the residual.

[0072] Specifically, Figure 2 As shown in Figure 2, in a residual module, the cross-layer connection generally only spans 2 to 3 hidden layers, but it does not exclude spanning more hidden layers. The case of only spanning 1 hidden layer is not very meaningful, and the experimental effect is not ideal.

[0073] Assume that the input of the residual module is x, and the expected output is H(x), that is, H(x) is the expected complex potential mapping, but H(x) is usually very difficult to learn; if the input x is directly passed to the output as the initial result, then the goal that the residual module needs to learn at this time is F(x) = H(x)-x. Therefore, compared with the traditional neural network, the speech recognition model in this embodiment is equivalent to changing the learning goal. It is no longer to learn a complete output, but to learn the difference between the optimal solution H(X) and the congruent mapping x, that is, the residual: F(x) = H(x)-x.

[0074] From the overall function point of view, if {w i} represents the ownership value of the residual module, then the output result actually calculated by the residual module is:

[0075] y=F(x,{w i})+x

[0076] Taking spanning 2 hidden layers as an example, ignoring the bias, F(x, {w i})=w 2 δ(w 1 x)=w 2 ReLU(w 1 x), where the ReLU function is the activation function of the residual module.

[0077] It is understandable that F(x, {w i}) and x need to have the same dimensions. If their dimensions are different, an additional weight matrix w can be introduced s Perform a linear projection on x so that F(x, {w i}) has the same dimension as x, and accordingly, the calculation result of the residual module is: y = F(x, {w i})+w s x

[0078] Multiple speech samples are input into the speech recognition model in sequence, and the speech information and the text label corresponding to the speech information are used as the input and output of the speech recognition model respectively. The neuron weights of the speech recognition model are continuously trained through input and output until all the speech samples have been input into the speech recognition model, and the training of the speech recognition model is completed. After the training is completed, the speech recognition model with the trained neuron weights is used as the target model.

[0079] During the training process, the weights of the neurons in the speech recognition model are randomly initialized, and the training speech information is used as the input of the speech recognition model, and the text label of the training speech information is used as the output reference of the speech recognition model. The training speech information runs forward propagation in the speech recognition model, and the speech recognition model uses the initialized neurons in each layer to randomly classify the training speech information, and finally obtains the predicted text corresponding to the training speech information. Then, the weights of the neurons are updated according to the gap between the predicted text output by the speech recognition model and the text label, and the next round of iterations is continued until the weights of the neurons approach the required values.

[0080] 103. Through L(S) = -ln∏ (h(x),z)∈S p(z|h(x))=-∑ (h(x),z)∈S ln p(z|h(x)) evaluates the error of the target model.

[0081] Where L(S) is the error, x is the speech information, z is the text label, p(z|h(x)) is the similarity between the predicted text and the text label, and S is a number of training speech samples. The predicted text refers to the text information output by the target model based on the neuron weight calculation after the speech information is input into the target model.

[0082] The CTC loss function is used to measure the inconsistency between the predicted text output by the speech recognition model and the actual text label. Its advantage is that it does not require mandatory alignment of the input data and the output data. Unlike the cross-entropy criterion for frame-level alignment between input features and target labels, the CTC loss function can automatically learn the alignment between speech data and label sequences (e.g., phonemes or characters, etc.), which eliminates the need for mandatory alignment of data, and the length of the input data and the label are not necessarily the same. When evaluating the predicted text of the speech recognition model with the CTC loss function, there is no need to consider the precise mapping relationship between the pronunciation phonemes in the text label and the sequence of the training speech information. Only the input sequence and the output sequence are needed to train the speech recognition model, saving the cost of producing the training speech sample set.

[0083] 104. Adjust the weights of the neurons of the target model until the error is less than a threshold, and set the weights of the neurons whose errors are less than the threshold as ideal weights.

[0084] The error of the corresponding training speech sample set is calculated according to the CTC loss function, and the error is back-propagated in the speech recognition model through the gradient descent algorithm, so as to update the target parameters such as weights and thresholds in the speech recognition model, and continuously improve the speech recognition accuracy of the speech recognition model until the convergence requirements are met.

[0085] 105. Deploy the target model and ideal weights to the client.

[0086] Compared with the prior art, the present application directly bypasses the input information x to the output of the hidden layer through a bypass channel. The bypass channel has no weights, which protects the integrity of the input information x, making the neural network training deeper. The entire neural network only needs to train the difference between the input and output, that is, after transmitting the input information x, each residual module only learns the residual F(x), which simplifies the training objectives and difficulty, and the neural network is stable and easy to train. As the depth of the neural network increases, the performance of the speech recognition model gradually improves, and the predicted text of the speech recognition model is evaluated by the CTC loss function. There is no need to consider the precise mapping relationship between the pronunciation phonemes in the text label and the sequence of the training speech information. Only the input sequence and the output sequence are needed to train the speech recognition model, saving the production cost of the training speech sample set. In addition, a triangular bandpass filter is used to smooth the spectrum of the training speech information, eliminate the harmonics in the training speech information, highlight the resonance peaks of the original sound, avoid the influence of the tone in the speech information on the predicted text of the speech recognition model, and reduce the amount of calculation of the speech information in the recognition process of the speech recognition model.

[0087] In some implementations, before inputting the plurality of speech samples into the speech recognition model, the method further comprises:

[0088] Processing the training voice information by framing according to preset framing parameters to obtain sentences corresponding to the training voice information, wherein the preset framing parameters include frame duration, number of frames, and repetition duration of previous and next frames;

[0089] The sentence is transformed according to the preset two-dimensional parameters and filter bank feature extraction algorithm to obtain two-dimensional speech information.

[0090] In some implementations, processing the training speech information by framing according to preset framing parameters includes:

[0091] Performing discrete Fourier transform on the two-dimensional speech information to obtain a linear spectrum X(k) corresponding to the two-dimensional speech information;

[0092] The linear spectrum is filtered by a preset bandpass filter to obtain the target linear spectrum. When the center frequency of the bandpass filter is f(m), the transfer function of the bandpass filter is:

[0093] The expression of f(m) is:

[0094]

[0095] The bandpass filter includes a plurality of bandpass filters with triangular filtering characteristics, f l is the lowest frequency of the bandpass filter frequency range, f h is the highest frequency of the bandpass filter frequency range, N is the length of DFT, f sis the sampling frequency of the bandpass filter, F mel Function is F mel =1125ln(1+f / 700),

[0096] The inverse function of Fmel is: b is an integer;

[0097] according to 0≤m≤M Calculate the logarithmic energy corresponding to the target linear spectrum and obtain the spectrogram, where X(k) is the linear spectrum.

[0098] In the above implementation, people's response to sound pressure is logarithmic, and people are less sensitive to subtle changes in high sound pressure than low sound pressure. In addition, the use of logarithms can reduce the sensitivity of the extracted features to changes in input sound energy, because the distance between the sound and the microphone is changing, and thus the sound energy collected by the microphone is also changing. Spectrogram is a visual expression of the time-frequency distribution of sound energy, which effectively utilizes the correlation between the time and frequency domains. The feature vector sequence obtained by spectrogram analysis has a better effect on the extraction of acoustic features, and is input into the speech recognition model to make subsequent operations more accurate. And a triangular bandpass filter is used to smooth the spectrum of the training speech information, eliminate the harmonics in the training speech information, and highlight the resonance peaks of the original sound. Therefore, the tone or pitch of a sound in the training speech information will not be reflected in the acoustic features, that is, the speech recognition model will not be affected by the different tones in the speech information and affect the predicted text; and the amount of operation on the speech information in the recognition process of the speech recognition model is reduced.

[0099] In some implementations, the fully connected layer includes a classification function. The classification function refers to j is a natural number, and the classification function compresses the K-dimensional speech domain signal vector z output by the convolution residual layer into another K-dimensional real vector δ(z) j , so that each element ranges between (0, 1) and the sum of all elements is 1.

[0100] In some implementations, the input of the residual module is x, and the output of the residual module is y, then the mathematical expression of the residual module is:

[0101] y=F(x,w i )+w s x. F(x, w i ) is the output of the independent convolutional layer, w s is the weight of the residual module.

[0102] In the above implementation, the speech recognition model in this embodiment adds bypass channels to several hidden layers connected in sequence to solve the problem that the training accuracy of traditional neural networks decreases as the number of network layers increases. The convolution residual layer of the speech recognition model has many bypass channels, which serve as branches of the hidden layer to achieve cross-layer connection between hidden layers, that is, directly connect the input of the hidden layer to the next level layer, so that the next level layer can directly learn the residual.

[0103] Specifically, in a residual module, the cross-layer connection generally only spans 2 to 3 hidden layers, but it is not excluded to span more hidden layers. The case of only spanning 1 hidden layer is of little significance and the experimental effect is not ideal.

[0104] Assume that the input of the residual module is x, and the expected output is H(x), that is, H(x) is the expected complex potential mapping, but H(x) is usually very difficult to learn; if the input x is directly passed to the output as the initial result, then the goal that the residual module needs to learn at this time is F(x) = H(x)-x. Therefore, compared with the traditional neural network, the speech recognition model in this embodiment is equivalent to changing the learning goal. It is no longer about learning a complete output, but about learning the difference between the optimal solution H(X) and the congruent mapping x, that is, the residual: F(x) = H(x)-x. From the overall functional point of view, if {w i} represents the total weight of the residual module, then the residual module actually calculates the output result as: y = F(x, {w i})+x, taking spanning two hidden layers as an example, ignoring the bias, F(x, {w i})=w 2 δ(w 1 x)=w 2 ReLU(w 1 x), where ReLU() is the activation function of the residual module.

[0105] It is understandable that F(x, {w i}) and x need to have the same dimensions. If their dimensions are different, an additional weight matrix w can be introduced s Perform a linear projection on x so that F(x, {w i}) has the same dimension as x, and accordingly, the calculation result of the residual module is: y = F(x, {w i})+w s x

[0106] In some embodiments, F(x, w i ) uses the ReLU function as the activation function of the independent convolutional layer. The mathematical expression of the ReLU function is ReLU(x)=max(0,x).

[0107] In the above implementation, the neural network can be trained using the above formula.

[0108] In some implementations, adjusting the weights of neurons of the target model includes:

[0109] The neuron weights are adjusted using stochastic gradient descent.

[0110] In the above implementation, the use of the stochastic gradient descent algorithm can effectively avoid redundant calculations and consume less time. Of course, those skilled in the art can also use other algorithms.

[0111] like Figure 2 The structure diagram of a device 20 for constructing a speech recognition model is shown in FIG. 2 , which can be applied to constructing a speech recognition model. The device for constructing a speech recognition model in the embodiment of the present application can realize the corresponding Figure 1 The steps of the method for constructing a speech recognition model executed in the corresponding embodiment. The functions implemented by the device 20 for constructing a speech recognition model can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, and the modules can be software and / or hardware. The device for constructing a speech recognition model may include an input-output module 201 and a processing module 202. The functions of the processing module 202 and the input-output module 201 can be implemented by reference to Figure 1 The operations performed in the corresponding embodiments are not described in detail here. The input-output module 201 can be used to control the input, output and acquisition operations of the input-output module 201 .

[0112] In some implementations, the input-output module 201 may be used to obtain a plurality of training speech samples, wherein the training speech samples include speech information and text labels corresponding to the speech information;

[0113] The processing module 202 can be used to construct a speech recognition model through an independent convolution layer, a convolution residual layer, a fully connected layer and an output layer, wherein the convolution residual layer includes a plurality of sequentially connected residual stacking layers, the residual stacking layer includes a plurality of sequentially connected residual modules, the residual module includes a plurality of sequentially connected hidden layers and a bypass channel bypassing a plurality of sequentially connected weight layers; the plurality of speech samples are sequentially input into the speech recognition model through the input-output module, the speech information and the text label corresponding to the speech information are respectively used as the input and output of the speech recognition model, the neuron weights of the speech recognition model are continuously trained through the input and the output until the speech samples are all input into the speech recognition model, and the training of the speech recognition model is terminated. After the training is completed, the speech recognition model with the trained neuron weights is used as the target model; L(S)=-ln∏ (h(x),z)∈S p(z|h(x))=-∑ (h(x),z)∈S ln p(z|h(x)) evaluates the error of the target model; wherein L(S) is the error, x is the speech information, z is the text label, p(z|h(x)) is the similarity between the predicted text and the text label, S is the multiple training speech samples, and the predicted text refers to the text information output by the target model after the speech information is input into the target model and calculated according to the neuron weights; adjust the weights of the neurons of the target model until the error is less than a threshold, and set the neuron weights with an error less than the threshold as ideal weights. Deploy the target model and the ideal weights to the client.

[0114] In some implementations, the processing module 202 is further configured to:

[0115] Processing the training voice information by framing according to preset framing parameters to obtain a sentence corresponding to the training voice information, wherein the preset framing parameters include frame duration, number of frames, and repetition duration of previous and next frames;

[0116] The sentence is transformed according to preset two-dimensional parameters and filter bank feature extraction algorithm to obtain two-dimensional speech information.

[0117] In some implementations, the processing module 202 is further configured to:

[0118] Performing a discrete Fourier transform on the two-dimensional speech information to obtain a linear spectrum X(k) corresponding to the two-dimensional speech information;

[0119] The linear spectrum is filtered by a preset bandpass filter to obtain a target linear spectrum. When the center frequency of the bandpass filter is f(m), the transfer function of the bandpass filter is:

[0120] The expression of f(m) is:

[0121]

[0122] The bandpass filter includes a plurality of bandpass filters having triangular filtering characteristics. l is the lowest frequency of the bandpass filter frequency range, the f h is the highest frequency in the frequency range of the bandpass filter, N is the length of DFT, and f s is the sampling frequency of the bandpass filter, the F mel Function is F mel =1125ln(1+f / 700), the inverse function of Fmel is: b is an integer;

[0123] according to 0≤m≤M calculates the logarithmic energy corresponding to the target linear spectrum to obtain a spectrogram, wherein X(k) is the linear spectrum;

[0124] In some implementations, the fully connected layer includes a classification function, wherein the classification function refers to The j is a natural number, and the classification function compresses the K-dimensional speech-domain signal vector z output by the convolution residual layer into another K-dimensional real vector, so that the range of each element is between (0, 1) and the sum of all elements is 1.

[0125] In some implementations, the input of the residual module is x, and the output of the output residual module is y, then the mathematical expression of the residual module is: y = F(x, w i )+w s x, the F(x, w i ) is the output of the independent convolutional layer, and the w s is the weight of the residual module.

[0126] In some embodiments, it is characterized in that the F(x, w i ) adopts the ReLU function as the activation function of the independent convolutional layer, and the mathematical expression of the ReLU function is ReLU(x)=max(0,x).

[0127] In some implementations, adjusting the weights of neurons of the target model includes:

[0128] The weights of the neurons are adjusted by stochastic gradient descent.

[0129] The above describes the creation device in the embodiment of the present application from the perspective of modular functional entities. The following describes a device for building a speech recognition model from a hardware perspective. Figure 3 As shown, it includes: a processor, a memory, an input and output unit (which may also be a transceiver, Figure 3 (not shown) and a computer program stored in the memory and executable on the processor. For example, the computer program may be Figure 1 The corresponding program of the method for constructing a speech recognition model in the corresponding embodiment. For example, when the device for constructing a speech recognition model implements the following Figure 2 When the function of the device 20 for constructing a speech recognition model is implemented, the processor executes the computer program to implement the above Figure 2 The steps in the method for constructing a speech recognition model in the corresponding embodiment are performed by the apparatus 20 for constructing a speech recognition model. Alternatively, the processor implements the above when executing the computer program Figure 2 The functions of each module in the apparatus 20 for constructing a speech recognition model in the corresponding embodiment. For another example, the computer program can be Figure 1 The program corresponding to the method of constructing a speech recognition model in the corresponding embodiment.

[0130] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0131] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0132] The input-output unit can also be replaced by a receiver and a transmitter, which can be the same or different physical entities. When they are the same physical entities, they can be collectively referred to as input-output units. The input-output can be a transceiver.

[0133] The memory may be integrated into the processor or may be arranged separately from the processor.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM) and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0135] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the inspiration of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims. All equivalent structures or equivalent process changes made using the contents of the specification and drawings of this application, or directly or indirectly used in other related technical fields, are protected by the present application.

Claims

1. A method for constructing a speech recognition model, characterized in that: The method comprises: Acquire a plurality of training speech samples, wherein the training speech samples include speech information and text labels corresponding to the speech information; A speech recognition model is constructed by an independent convolutional layer, a convolutional residual layer, a fully connected layer and an output layer, wherein the convolutional residual layer includes a plurality of sequentially connected residual stacking layers, the residual stacking layer includes a plurality of sequentially connected residual modules, the residual module includes a plurality of sequentially connected hidden layers and a bypass channel bypassing a plurality of sequentially connected weight layers; the independent convolutional layer is used to extract acoustic features from the speech information and eliminate non-maximum values ​​in the acoustic features; the acoustic features include the pronunciation of syllables, the user's habit of connected reading and the speech spectrum; the convolutional residual layer is used to map the acoustic features to the hidden layer feature space; the fully connected layer is used to integrate the acoustic features mapped to the hidden layer feature space to obtain the meaning of the acoustic features, and output the probabilities corresponding to various text types according to the meaning; the output layer is used to output the text corresponding to the speech information according to the probabilities corresponding to the various text types; Inputting the plurality of speech samples into the speech recognition model in sequence, using the speech information and the text label corresponding to the speech information as the input and output of the speech recognition model respectively, continuously training the neuron weights of the speech recognition model through the input and the output until all the speech samples have been input into the speech recognition model, and then completing the training of the speech recognition model. After the training is completed, the speech recognition model with the trained neuron weights is used as the target model; By L(S) = -ln∏ (h(x),z)∈S p(z|h(x))=-∑ (h(x),z)∈S ln p(z|h(x)) evaluates the error of the target model, wherein L(S) is the error, x is the speech information, z is the text label, p(z|h(x)) is the similarity between the predicted text and the text label, S is the multiple training speech samples, and the predicted text refers to the text information output by the target model according to the neuron weight calculation after the speech information is input into the target model; Adjusting the weights of the neurons of the target model until the error is less than a threshold, and setting the weights of the neurons whose error is less than the threshold as ideal weights; Deploy the target model and the ideal weight to a client; The fully connected layer includes a classification function, which refers to The j is a natural number, and the classification function compresses the K-dimensional speech-domain signal vector z output by the convolution residual layer into another K-dimensional real vector δ(z) j , so that each element ranges between (0, 1) and the sum of all elements is 1; where the element is a K-dimensional real vector δ(z) j , j = 1, ..., K; The input of the residual module is x, the output of the residual module is y, and the mathematical expression of the residual module is: y=F(x,w i )+w s x, the F(x, w i ) is the output of the independent convolutional layer, and the w s is the weight of the residual module, w i is the total weight of the residual module.

2. The method according to claim 1, characterized in that: Before inputting the plurality of speech samples into the speech recognition model, the method further comprises: Processing the training voice information by framing according to preset framing parameters to obtain a sentence corresponding to the training voice information, wherein the preset framing parameters include frame duration, number of frames, and repetition duration of previous and next frames; The features of the preset two-dimensional parameters and the filter group are extracted and converted into the sentence to obtain two-dimensional speech information.

3. The method according to claim 2, characterized in that The framing and processing of the training voice information according to the preset framing parameters includes: Performing a discrete Fourier transform on the two-dimensional speech information to obtain a linear spectrum X(k) corresponding to the two-dimensional speech information; The linear spectrum is filtered by a preset bandpass filter to obtain a target linear spectrum. When the center frequency of the bandpass filter is f(m), the transfer function of the bandpass filter is: The expression of f(m) is: The bandpass filter includes a plurality of bandpass filters having triangular filtering characteristics. l is the lowest frequency of the bandpass filter frequency range, the f h is the highest frequency in the frequency range of the bandpass filter, N is the length of the discrete Fourier transform, and f s is the sampling frequency of the bandpass filter, the F mel Function is F mel =1125ln(1+f / 70), the inverse function of Fmel is: b is an integer; according to 0≤m≤M calculates the logarithmic energy corresponding to the target linear spectrum to obtain a spectrogram, and X(k) is the linear spectrum.

4. The method according to claim 1, characterized in that: The F(x, w i ) adopts the ReLU function as the activation function of the independent convolutional layer, and the mathematical expression of the ReLU function is ReLU(x)=max(0,x).

5. The method according to claim 1, characterized in that The adjusting the weights of the neurons of the target model comprises: The weights of the neurons are adjusted by stochastic gradient descent.

6. A device for constructing a speech recognition model, characterized in that: The device comprises: An input-output module, used to obtain a plurality of training speech samples, wherein the training speech samples include speech information and text labels corresponding to the speech information; A processing module is used to construct a speech recognition model through an independent convolution layer, a convolution residual layer, a fully connected layer and an output layer, wherein the convolution residual layer includes a plurality of sequentially connected residual stacking layers, the residual stacking layer includes a plurality of sequentially connected residual modules, the residual module includes a plurality of sequentially connected hidden layers and a bypass channel bypassing a plurality of sequentially connected weight layers; the independent convolution layer is used to extract acoustic features from the speech information and eliminate non-maximum values ​​in the acoustic features; the acoustic features include the pronunciation of syllables, the user's linked reading habits and the speech spectrum; the convolution residual layer is used to map the acoustic features to the hidden layer feature space; the fully connected layer is used to integrate the acoustic features mapped to the hidden layer feature space to obtain the acoustic features The meaning of the feature is outputted according to the meaning, and the probabilities corresponding to various text types are outputted; the output layer is used to output the text corresponding to the voice information according to the probabilities corresponding to the various text types; the plurality of voice samples are sequentially inputted into the voice recognition model through the input-output module, and the voice information and the text labels corresponding to the voice information are respectively used as the input and output of the voice recognition model, and the neuron weights of the voice recognition model are continuously trained through the input and the output until all the voice samples have been inputted into the voice recognition model, and the training of the voice recognition model is terminated; after the training is completed, the voice recognition model with the trained neuron weights is used as the target model; through L(S)=-ln∏ (h(x),z)∈S p(z|h(x))=-∑ (h(x),z)∈S ln p(z|h(x)) evaluates the error of the target model; wherein L(S) is the error, x is the speech information, z is the text label, p(z|h(x)) is the similarity between the predicted text and the text label, and S is the plurality of training speech samples; the predicted text refers to the text information output by the target model according to the neuron weight calculation after the speech information is input into the target model; Adjust the weights of the neurons of the target model until the error is less than a threshold, and set the weights of the neurons whose error is less than the threshold as ideal weights; deploy the target model and the ideal weights to the client; The fully connected layer includes a classification function, which refers to The j is a natural number, and the classification function compresses the K-dimensional speech-domain signal vector z output by the convolution residual layer into another K-dimensional real vector δ(z) j , so that each element ranges between (0, 1) and the sum of all elements is 1; where the element is a K-dimensional real vector δ(z) j , j = 1, ..., K; The input of the residual module is x, the output of the output residual module is y, and the mathematical expression of the residual module is: y=F(x,w i )+w s x, the F(x, w i ) is the output of the independent convolutional layer, and the w s is the weight of the residual module, w i is the total weight of the residual module.

7. The device according to claim 6, characterized in that The processing module is also used for: Processing the training voice information by framing according to preset framing parameters to obtain a sentence corresponding to the training voice information, wherein the preset framing parameters include frame duration, number of frames, and repetition duration of previous and next frames; The features of the preset two-dimensional parameters and the filter group are extracted and converted into the sentence to obtain two-dimensional speech information.

8. A device for constructing a speech recognition model, characterized in that: The device for constructing the speech recognition model comprises: at least one processor, memory, and input-output unit; The memory is used to store program codes, and the processor is used to call the program codes stored in the memory to execute the method according to any one of claims 1 to 5.

9. A computer storage medium, characterized in that: The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 5.