Streaming speech recognition method based on attention re-scoring
By introducing the attention rescoring module and dynamic speech block length adjustment into streaming speech recognition, combined with the Conformer and Transformer structures, the problem of low accuracy in streaming recognition is solved and high-accuracy recognition under low-latency conditions is achieved.
Patent Information
- Application Number
- CN202210864507.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-07-21
AI Technical Summary
It is difficult for the existing technology to balance the low latency and high accuracy of streaming speech recognition, and the recognition accuracy of streaming speech recognition is low when limited speech information is used.
A streaming speech recognition method based on attention rescoring is adopted. By constructing a model including a sequentially connected speech feature extraction module, streaming speech recognition module and attention rescoring module, complete speech information is used for training and recognition, combined with Conformer and Transformer structure, using the joint loss function and Adam optimization method for iterative training, and dynamically adjusting the length of the speech block to adapt to different scene needs.
While maintaining low streaming latency, it effectively improves recognition accuracy, makes full use of complete voice information, and adapts to the latency and accuracy of different scenarios and device requirements.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of speech recognition, and relates to a speech recognition method, and in particular to a streaming speech recognition method based on attention re-scoring. Background Art
[0002] The task of speech recognition is to convert speech into machine-processable input forms such as text or commands. It is one of the important ways of human-computer interaction. With the increasing popularity of smart phones and smart speakers, its importance is increasing. Speech recognition is the first and most important step in speech interaction. Fast and accurate speech recognition can effectively improve the user experience of various voice interactions.
[0003] Depending on whether speech recognition is real-time, it can be divided into two types: streaming speech recognition and non-streaming speech recognition. Non-streaming speech recognition needs to be performed after obtaining a complete speech segment. When performing non-streaming speech recognition, complete speech information can be used to give accurate results. Streaming speech recognition needs to display real-time recognition results to users while obtaining real-time user speech. The low latency of streaming speech recognition can greatly improve the user experience, but in streaming recognition, the model can only use limited speech information, and its recognition accuracy is often lower than that of non-streaming recognition. It is difficult to balance the low latency of streaming recognition with the high accuracy of non-streaming recognition. On the other hand, streaming speech recognition in different scenarios often has different requirements for latency and accuracy, and often requires retraining the model according to different scenario requirements.
[0004] The patent application with the application publication number CN113327603A and the name "Speech Recognition Method, Device, Electronic Device and Computer Readable Storage Medium" discloses a speech recognition method, which first obtains the speech feature sequence of the speech signal to be recognized, and divides the speech feature sequence into multiple speech blocks; the speech feature sequence is input into the encoder based on self-attention to obtain the speech code, and each self-attention layer in the encoder can only notice a speech block before and / or after the current speech block, that is, only limited speech information can be used for calculation; the speech code is input into the connection time classification CTC module, and the CTC module processes the speech code block by block and predicts the text output. Whenever the predicted text output changes, the speech code is truncated to obtain the speech code segment corresponding to each text, and the attention-based decoder decodes each speech code segment to obtain the corresponding final recognition result. This method finds the speech code segment corresponding to each text through CTC, and then uses the attention-based decoder to decode each speech code segment. While maintaining the low latency of streaming recognition, the accuracy rate is improved to a certain extent, but this method still only uses limited speech information, and does not use the information of the complete speech, resulting in its recognition accuracy rate is still low. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and propose a streaming speech recognition method based on attention re-scoring to solve the technical problem that it is difficult to balance the high accuracy of non-streaming recognition and the low latency of streaming recognition in the prior art.
[0006] To achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0007] (1) Obtain training data set:
[0008] (1a) Obtain N noise-free speech data S from different speakers = {s 1 ,...,s n ,...,s N} and the text content L corresponding to S = {l 1 ,...,l n ,...,l N}, and M natural noise data from different scenes F = {f 1 ,...,f m ,...,f M}; where N ≥ 200000, s n represents the nth noise-free speech data, l n Indicates n The corresponding text content, M ≥ 2000, f m represents the mth natural noise data;
[0009] (1b) Each noise-free speech data s of S n Mix with any natural noise data in F, and combine N training data into a training data set T = {t 1 ,...,t n ,...,t N}, where t n Indicates n Corresponding training data;
[0010] (2) Constructing a streaming speech recognition model based on attention re-scoring:
[0011] (2a) Constructing the structure of the streaming speech recognition model based on attention re-scoring:
[0012] Construct a streaming speech recognition model including a speech feature extraction module, a streaming speech recognition module and an attention re-scoring module connected in sequence; the streaming speech recognition module includes a fully connected layer with position coding, a speech encoder and a connection time series classification CTC prediction layer connected in sequence, wherein the speech encoder includes a plurality of Conformer structures connected in sequence, and the CTC prediction layer adopts a fully connected layer with a Softmax function as an activation function; the attention re-scoring module includes an attention decoder and an attention prediction layer connected in sequence, wherein the attention decoder includes a plurality of Transformer structures connected in sequence, and the attention prediction layer adopts a fully connected layer with a Softmax function as an activation function;
[0013] (2b) Define the loss function L of the streaming speech recognition model based on attention rescoring Joint :
[0014] L Joint =λL CTC +(1-λ)L Attention
[0015] Where L CTC represents the CTC loss function, L Attention represents the attention loss function, λ is the weight factor, 0<λ<1; L Attention Use KL divergence loss with label smoothing;
[0016] (3) Iteratively train the streaming speech recognition model V:
[0017] (3a) The number of initialization iterations is i, the maximum number of iterations is I, I ≥ 200, and the current streaming speech recognition model is V i , and let i = 1, V = V i ;
[0018] (3b) The training dataset T is used as the input of the streaming speech recognition model V in batches for forward propagation:
[0019] (3b1) The speech feature extraction module extracts each training data t n Mel filter bank FBank features;
[0020] (3b2) The streaming speech recognition module takes each training data t n The Mel filter bank FBank feature is evenly divided into multiple speech blocks, and the fully connected layer with position encoding is t n The FBank features of all speech blocks are encoded with relative positions and t nThe FBank features with positional encoding are evenly divided into multiple speech blocks; the speech encoder calculates the speech encoding of each speech block block by block. During the calculation process, it is necessary to limit the field of view of the multi-head self-attention of each Conformer structure in the speech encoder. When processing each speech block, only the attention of the current speech block and a fixed number of speech blocks before the current speech block can be calculated. The speech encoding of all speech blocks constitutes t n The CTC prediction layer uses the CTC prefix beam search algorithm, with the beam width set to R, 10≤R≤50, and calculates t according to the speech coding of all speech blocks. n The stream recognition results and corresponding stream scores;
[0021] (3b3) The attention decoder in the attention re-scoring module passes t n The complete speech encoding and R stream recognition results are used to calculate the decoding information corresponding to each stream recognition result; the attention prediction layer calculates the attention score of each stream recognition result based on the decoding information, and then performs a weighted summation of the stream score and the attention score of each stream recognition result to obtain the final score of each stream result, and then takes the stream recognition result with the highest final score as t n The final recognition result l n ;
[0022] (3c) Using the joint loss function L Joint , through l n and l n Calculate the loss value of the streaming speech recognition model in the i-th iteration, and use the Adam optimization method to update the weight parameters of the streaming speech recognition module and the attention re-scoring module in the streaming speech recognition model by minimizing the loss value, and obtain the target speaker real-time speech information extraction model V after the i-th iteration i ;
[0023] (3d) Determine whether i≥I is true. If so, obtain the trained streaming speech recognition model V * , otherwise, let i=i+1 and execute step (3b);
[0024] (4) Obtaining real-time speech recognition results:
[0025] (4a) The real-time collected speech stream is cut into multiple speech blocks of equal length, and the cut multiple speech blocks are used as the trained streaming speech recognition model V * The input is forward propagated to obtain multiple streaming recognition results and corresponding streaming scores in real time, and the streaming recognition result with the highest streaming score is used as the result of real-time speech recognition;
[0026] (4b) After the voice stream ends, V *The streaming recognition results will be re-scored to give the final recognition results.
[0027] Compared with the prior art, the present invention has the following advantages:
[0028] The streaming speech recognition model constructed by the present invention includes an attention re-scoring module. In the process of training the model and obtaining speech recognition results, the attention re-scoring module uses complete speech coding to optimize the results of streaming speech recognition, avoiding the problem in the prior art that streaming speech recognition can only use limited speech information, resulting in reduced recognition accuracy. It can make full use of complete speech information and effectively improve the recognition accuracy while maintaining low streaming latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart for realizing the present invention;
[0030] Figure 2 This is a structural diagram of the streaming speech recognition model based on attention re-scoring constructed by the present invention. DETAILED DESCRIPTION
[0031] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0032] Reference Figure 1 , the present invention comprises the following steps:
[0033] Step 1) Get the training data set:
[0034] (1a) Obtain N noise-free speech data S from different speakers = {s 1 ,...,s n ,...,s N} and the text content L corresponding to S = {l 1 ,...,l n ,...,l N}, obtain M natural noise data from different scenes F = {f 1 ,...,f m ,...,f M}; where N ≥ 200000, s n represents the nth noise-free speech data, l n Indicates n The corresponding text content, M ≥ 2000, f m represents the mth natural noise data;
[0035] In this embodiment, the noise-free speech data comes from 400 different speakers, with about 350 noise-free speech data from each speaker, totaling about 140,000 noise-free speech, with a total duration of about 178 hours; the natural noise data set selects the TUT2016 and TUT2017 data sets, totaling about 27.25 hours of audio scene data, the audio duration of each noise scene is 109 minutes, each noise data is about 30 seconds long, and a total of about 3,250 natural noise data;
[0036] In this embodiment, all voice data or noise data are wav files with a sampling frequency of 16kHz;
[0037] (1b) Each noise-free speech data s of S n Mix with any natural noise data in F, and combine N training data into a training data set T = {t 1 ,...,t n ,...,t N}, where t n Indicates n Corresponding training data, where each noise-free speech data s of S n Mixing with any natural noise data in F includes the following steps:
[0038] (1b1) Initialize training data t n The minimum signal-to-noise ratio allowed is min snr , the maximum signal-to-noise ratio is max snr , we hope that the proportion of noise-free speech data retained in the training data set T is p, 0≤p≤1;
[0039] (1b2) Calculate each noise-free speech data s of S n The average power Any natural noise data f in F k The average power And according to and Calculate n The corresponding noise factor γ n :
[0040]
[0041] Where k∈[1,M], SNR n Indicates t n Signal-to-noise ratio, min snr ≤SNR n ≤max snr , α n Represents the threshold, 0≤α n ≤1;
[0042] (1b3) According to the noise factor γ n Calculate n The corresponding training data t n :
[0043] t n =s n +γ n ·f k .
[0044] The present invention determines the noise factor γ based on the signal power of the noise-free speech and natural noise data and the selected signal-to-noise ratio. n , γ n =0, indicating training data t n Only noise-free speech data is included, that is, the training data set T contains some noise-free speech data, and also contains some noise-containing speech data after mixing noise-free speech data with natural noise data, so as to avoid excessive noise from destroying speech features and interfering with training. At the same time, the dynamically changing signal-to-noise ratio within a certain range also greatly enriches the richness of the training data set and improves the robustness of the model in the face of different noise scenes. When making a training data set, it is necessary to control the proportion p of the data to which noise is added. If the proportion is too large, the performance of the model in recognizing clear speech will be reduced, and if the proportion is too small, the robustness of the model in the face of noise interference will be reduced. In this embodiment, p is set to 0.6; In this embodiment, the minimum signal-to-noise ratio min is set snr 1, the maximum signal-to-noise ratio max snr Set to 10;
[0045] Step 2) Build a streaming speech recognition model based on attention re-scoring, whose structure is as follows Figure 2 As shown:
[0046] (2a) Constructing the structure of the streaming speech recognition model based on attention re-scoring:
[0047] Construct a streaming speech recognition model including a streaming speech recognition module and an attention re-scoring module connected in sequence; the streaming speech recognition module includes a fully connected layer with position coding, a speech encoder and a connection time series classification CTC prediction layer connected in sequence, wherein the speech encoder includes a plurality of Conformer structures connected in sequence, and the CTC prediction layer adopts a fully connected layer with a Softmax function as an activation function; the attention re-scoring module includes an attention decoder and an attention prediction layer connected in sequence, wherein the attention decoder includes a plurality of Transformer structures connected in sequence, and the attention prediction layer adopts a fully connected layer with a Softmax function as an activation function;
[0048] In this embodiment, the fully connected layer with position coding uses a fully connected neural network composed of 256 neurons with an internal dimension of 320 dimensions to map the 320-dimensional speech feature input to a 256-dimensional speech feature; and adds relative position coding to the 256 speech features;
[0049] In this embodiment, 12 causal convolution-based Conformer structures with a self-attention dimension of 256 are used in the speech encoder. Each Conformer structure includes four modules: two feed-forward modules (FFN) at the front and back, a multi-head self-attention module (MHSA) with 4 attention heads and a convolution module (Conv) in the middle, and residual connections are added before and after each module. Each structure is finally normalized (LayerNorm);
[0050] In this embodiment, the attention decoder is composed of 6 stacked Transformer decoders; each Transformer decoder includes a multi-head self-attention module with 4 attention heads, a multi-head attention module with 4 attention heads, and a feedforward neural network module. Residual connections are added before and after each module, and each structure is normalized at the end;
[0051] (2b) Define the loss function L for the streaming speech recognition module and the attention re-scoring module Joint :
[0052] L Joint =λL CTC +(1-λ)L Attention
[0053] Where L CTC represents the CTC loss function, L Attention represents the attention loss function, λ is the weight factor, 0<λ<1; L Attention Use KL divergence with label smoothing to calculate the predicted text sequence l n For the real text sequence l n KL divergence of n The labels of each symbol are represented by a one-hot vector with label smoothing. Label smoothing technology can effectively prevent model overfitting.
[0054] Step 3) Iteratively train the streaming speech recognition model V:
[0055] (3a) The number of initialization iterations is i, the maximum number of iterations is I, I ≥ 200, and the current streaming speech recognition model is V i , and let i = 1, V = V i ;
[0056] In this embodiment, I is 200;
[0057] (3b) The training dataset T is used as the input of the streaming speech recognition model V in batches for forward propagation:
[0058] (3b1) The speech feature extraction module extracts each training data t n Mel filter bank FBank features;
[0059] In this embodiment, the speech feature extraction module performs pre-emphasis, framing, windowing, short-time Fourier transform, power spectrum, Mel filter group, and logarithm extraction on each training data to obtain the Mel filter group feature corresponding to the training data; in this embodiment, a 25ms frame length and a 10ms frame shift are used in framing, and the extracted Mel filter group feature dimension is 80 dimensions. After 4-frame stacking and 3-frame downsampling, a 320-dimensional Mel filter group feature is obtained;
[0060] (3b2) The streaming speech recognition module takes each training data t n The Mel filter bank FBank feature is evenly divided into multiple speech blocks, and the fully connected layer with position encoding is t n The FBank features of all speech blocks are encoded with relative positions and t n The FBank features with positional encoding are evenly divided into multiple speech blocks; the speech encoder calculates the speech encoding of each speech block block by block. During the calculation process, it is necessary to limit the field of view of the multi-head self-attention of each Conformer structure in the speech encoder. When processing each speech block, only the attention of the current speech block and a fixed number of speech blocks before the current speech block can be calculated. The speech encoding of all speech blocks constitutes t n The CTC prediction layer uses the CTC prefix beam search algorithm, with the beam width set to R, 10≤R≤50, and calculates t according to the speech coding of all speech blocks. n The stream recognition results and corresponding stream scores;
[0061] The fully connected layer with position encoding adds relative position encoding to the input and maps the input 320-dimensional Mel filter bank features to 256 dimensions, reducing the input dimension and thus reducing the number of parameters of the overall model.
[0062] The Conformer structure in the speech encoder uses causal convolution to replace the original depth-wise separable convolution. Causal convolution truncates the future speech information on the right, only focusing on the information before the current time step, and not relying on the information after the current time step. Therefore, the Conformer structure based on causal convolution is more suitable for streaming speech data.
[0063] On the other hand, in order to adapt to streaming recognition, the multi-head self-attention of the Conformer in the speech encoder can only pay attention to the information before the current time step; the present invention uses block-wise attention, that is, each Conformer can only calculate the attention of the current speech block to itself and the speech block before itself in time order.
[0064] During streaming recognition, larger speech blocks will allow the model to receive more speech information, and the recognition accuracy will be higher, but it will also make the model rely on more future information, increase the recognition delay, and reduce the real-time performance; while smaller speech blocks provide less speech information, the recognition accuracy will decrease, but the real-time performance will improve. The existing training method uses speech blocks of fixed length, and changing the length of the speech block will greatly reduce the accuracy. The present invention dynamically changes the length of the speech block during training, so that the model can adapt to speech blocks of different lengths. When in use, different delays and accuracies can be obtained by adjusting the length of the speech block according to actual needs. In this embodiment, the length chunksize of each speech block is set to a random integer between 1 and 30, that is, each speech block contains the Mel filter group features of chunksize frames, the corresponding speech block duration is 30 milliseconds to 900 milliseconds, and the average waiting delay is 15 milliseconds to 450 milliseconds.
[0065] The CTC prediction layer uses a prefix beam search algorithm, and the initial recognition result is a blank label; it starts from the first speech block and searches block by block. When processing each speech block, it finds the path with the highest probability based on the existing results, merges continuous characters and removes blank labels, and finally merges multiple paths with consistent results, retaining the highest probability beam width results, which can be used as the streaming output result at this time; repeat this process until all speech blocks are processed, and obtain beam width streaming recognition results and corresponding probabilities, where the probability is the score of the streaming recognition. In this embodiment, the beam width is set to 10. A larger beam width will bring more accurate results, but it will also bring more delays.
[0066] (3b3) The attention decoder in the attention re-scoring module passes t n The complete speech encoding and R stream recognition results are used to calculate the decoding information corresponding to each stream recognition result; the attention prediction layer calculates the attention score of each stream recognition result based on the decoding information, and then performs a weighted summation of the stream score and the attention score of each stream recognition result to obtain the final score of each stream result, and then takes the stream recognition result with the highest final score as t n The final recognition result l n ;
[0067] The attention decoder adopts the Teacher-Forcing mode when decoding, using multiple streaming recognition results as labels to decode the speech encoding of the complete speech. It can re-score multiple decoding processes in one execution, avoiding the autoregressive decoding process and having better real-time performance.
[0068] (3c) Using the joint loss function L Joint , through l n and l n Calculate the loss value of the streaming speech recognition model in the i-th iteration, and use the Adam optimization method to update the weight parameters of the streaming speech recognition module and the attention re-scoring module in the streaming speech recognition model by minimizing the loss value, and obtain the target speaker real-time speech information extraction model V after the i-th iteration i ;
[0069] (3d) Determine whether i≥I is true. If so, obtain the trained streaming speech recognition model V * , otherwise, let i=i+1 and execute step (3b);
[0070] Step 4) Get real-time speech recognition results:
[0071] (4a) The real-time collected speech stream is cut into multiple speech blocks of equal length, and the cut multiple speech blocks are used as the trained streaming speech recognition model V * The input is forward propagated to obtain multiple streaming recognition results and corresponding streaming scores in real time, and the streaming recognition result with the highest streaming score is used as the result of real-time speech recognition;
[0072] (4b) After the voice stream ends, V * The streaming recognition results will be re-scored to give the final recognition results.
[0073] The length of the speech block can be determined according to the actual computing power of the device, the different requirements for accuracy and delay, and the range of variation corresponds to the range of speech block length in training. In this embodiment, it is set to 30 milliseconds to 900 milliseconds;
[0074] In actual recognition, the output state of each Conformer structure in the speech encoder can be cached. When calculating the next speech block, the cached output state is directly used as historical information to be spliced in the hidden state of the corresponding Conformer structure, avoiding repeated calculation of historical information. The block-wise attention used can calculate the features of multiple frames in a speech block at one time, further reducing latency.
Claims
1. A streaming speech recognition method based on attention re-scoring, characterized in that: The steps include: (1) Obtain training data set: (1a) Obtain N noise-free speech data S = {s1, ..., s n ,...,s N } and the text content L corresponding to S = {l1,...,l n ,...,l N }, and M natural noise data from different scenes F = {f1,...,f m ,...,f M }; where N ≥ 200000, s n represents the nth noise-free speech data, l n Indicates n The corresponding text content, M ≥ 2000, f m represents the mth natural noise data; (1b) Each noise-free speech data s of S n Mix with any natural noise data in F to get training data, and combine N training data into a training data set T = {t1,...,t n ,...,t N }, where t n Indicates n Corresponding training data; (2) Constructing a streaming speech recognition model based on attention re-scoring: (2a) Constructing the structure of the streaming speech recognition model based on attention re-scoring: Construct a streaming speech recognition model including a speech feature extraction module, a streaming speech recognition module and an attention re-scoring module connected in sequence; the streaming speech recognition module includes a fully connected layer with position coding, a speech encoder and a connection time series classification CTC prediction layer connected in sequence, wherein the speech encoder includes a plurality of Conformer structures connected in sequence, and the CTC prediction layer adopts a fully connected layer with a Softmax function as an activation function; the attention re-scoring module includes an attention decoder and an attention prediction layer connected in sequence, wherein the attention decoder includes a plurality of Transformer structures connected in sequence, and the attention prediction layer adopts a fully connected layer with a Softmax function as an activation function; (2b) Define the loss function L of the streaming speech recognition model based on attention rescoring Joint : THE Joint =λL CTC +(1-λ)L Attention Where L CTC represents the CTC loss function, L Attention represents the attention loss function, λ is the weight factor, 0<λ<1; L Attention Use KL divergence loss with label smoothing; (3) Iteratively train the streaming speech recognition model V: (3a) The number of initialization iterations is i, the maximum number of iterations is I, I ≥ 200, and the current streaming speech recognition model is V i , and let i = 1, V = V i ; (3b) The training dataset T is used as the input of the streaming speech recognition model V in batches for forward propagation: (3b1) The speech feature extraction module extracts each training data t n Mel filter bank FBank features; (3b2) The streaming speech recognition module takes each training data t n The Mel filter bank FBank feature is evenly divided into multiple speech blocks, and the fully connected layer with position encoding is t n The FBank features of all speech blocks are encoded with relative positions and t n The FBank features with positional encoding are evenly divided into multiple speech blocks; the speech encoder calculates the speech encoding of each speech block block by block. During the calculation process, it is necessary to limit the field of view of the multi-head self-attention of each Conformer structure in the speech encoder. When processing each speech block, only the attention of the current speech block and a fixed number of speech blocks before the current speech block can be calculated. The speech encoding of all speech blocks constitutes t n The CTC prediction layer uses the CTC prefix beam search algorithm, with the beam width set to R, 10≤R≤50, and calculates t according to the speech coding of all speech blocks. n The stream recognition results and corresponding stream scores; (3b3) The attention decoder in the attention re-scoring module passes t n The complete speech encoding and R stream recognition results are used to calculate the decoding information corresponding to each stream recognition result; the attention prediction layer calculates the attention score of each stream recognition result based on the decoding information, and then performs a weighted summation of the stream score and the attention score of each stream recognition result to obtain the final score of each stream result, and then takes the stream recognition result with the highest final score as t n The final recognition result l n ; (3c) Using the joint loss function L Joint , through l n and l n Calculate the loss value of the streaming speech recognition model in the i-th iteration, and use the Adam optimization method to update the weight parameters of the streaming speech recognition module and the attention re-scoring module in the streaming speech recognition model by minimizing the loss value, and obtain the target speaker real-time speech information extraction model V after the i-th iteration i ; (3d) Determine whether i≥I is true. If so, obtain the trained streaming speech recognition model V * , otherwise, let i=i+1 and execute step (3b); (4) Obtaining real-time speech recognition results: (4a) The real-time collected speech stream is cut into multiple speech blocks of equal length, and the cut multiple speech blocks are used as the trained streaming speech recognition model V * The input is forward propagated to obtain multiple streaming recognition results and corresponding streaming scores in real time, and the streaming recognition result with the highest streaming score is used as the result of real-time speech recognition; (4b) After the voice stream ends, V * The streaming recognition results will be re-scored to give the final recognition results.
2. The method for streaming speech recognition based on attention re-scoring according to claim 1, characterized in that: In step (1b), each noise-free speech data s of S is n Mix with any natural noise data in F. The implementation steps are: (1b1) Initialize training data t n The minimum signal-to-noise ratio allowed is min snr , the maximum signal-to-noise ratio is max snr , we hope that the proportion of noise-free speech data retained in the training data set T is p, 0≤p≤1; (1b2) Calculate each noise-free speech data s of S n The average power Any natural noise data f in F k The average power And according to and Calculate n The corresponding noise factor γ n : Where k∈[1,M], SNR n Indicates t n Signal-to-noise ratio, min snr ≤SNR n ≤max snr , α n Represents the threshold, 0≤α n ≤1; (1b3) According to the noise factor γ n Calculate n The corresponding training data t n : t n =s n +γ n f k 。 3. The method for streaming speech recognition based on attention re-scoring according to claim 1, characterized in that: The structure of the streaming speech recognition model based on attention re-scoring described in step (2a), wherein the number of sequentially connected Conformer structures included in the speech encoder is 12, and the number of sequentially connected Transformer structures included in the attention decoder is 6.
4. The method for streaming speech recognition based on attention re-scoring according to claim 1, characterized in that: In step (3b2), n The FBank features with positional encoding are evenly divided into multiple speech blocks. For each batch of training data input, the length of the speech block is randomly determined within a certain range, and the training data in the same batch uses speech blocks of the same length when divided.
5. The method for streaming speech recognition based on attention re-scoring according to claim 1, characterized in that: The attention decoder in the attention re-scoring module described in step (3b3) is obtained by t n The speech encoding and multiple streaming recognition results are used to calculate the decoding information corresponding to each streaming recognition result. The attention decoder uses the Teacher-Forcing mode for decoding and directly uses the streaming recognition result as the label pair t n Decode the complete speech encoding.
