Audio-to-text model training method, electronic device, and storage medium

Through the LatticeBART model and the lattice-to-lattice pre-training method, the problems of insufficient data and mismatched output formats in audio-to-text model training are solved, achieving high-quality text generation and improving model robustness.

CN114333797BActive Publication Date: 2024-09-06AISPEECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111682034.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-09-06
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Among existing audio-to-text model training methods, the n-best list rescore method cannot correct errors in sentences. The ASR post-processing system requires manual setting of complex repair rules. The ASR error correction system has less training data and the output format does not match the pre-trained language. The model is inconsistent, resulting in limited model performance.

Method used

The LatticeBART model is used to convert the lattice format into sequences in an end-to-end manner. By introducing PTLM prior knowledge and the lattice-to-lattice pre-training method, the ability of the pre-trained language model is directly used to perform self-supervised training to alleviate the problem of insufficient data.

Benefits of technology

It improves the output quality of the audio-to-text model, can generate high-quality text when training data is insufficient, reduces the word error rate, and uses the prior knowledge of the pre-trained language model to enhance model robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114333797B
    Figure CN114333797B
Patent Text Reader

Abstract

The present invention discloses an audio-to-text model training method, system, electronic device and storage medium, wherein an audio-to-text model training method comprises: inputting training audio into an automatic speech recognition system to obtain a lattice format, wherein the lattice format comprises a forward-backward score matrix, a marginal score, a lattice mask and a lattice position embedding; inputting the lattice format into an input data preprocessing system to convert it into input data that is conducive to LatticeBART processing, wherein the decoder of the LatticeBART is a BART decoder, and the encoder of the LatticeBART can splice the results of different attention heads and map them to a learnable parameter matrix to obtain an output; and using the LatticeBART to decode the input data in an end-to-end manner to obtain a text corresponding to the training audio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of audio-to-text model training, and in particular relates to an audio-to-text model training method, an electronic device and a storage medium. Background Art

[0002] In the related technologies, there are n-best rescore methods, ASR post-processing systems and ASR error correction systems. Among them, the n-best list rescore method: use a more powerful language model to re-score the best n output sentences of ASR, and then select the best sentence. ASR post-processing system: This type of system will use rules to perform inverse text regularization on the output of ASR. ASR error correction system: Use a model to repair errors in ASR recognition results.

[0003] The inventors found that the solutions of the prior art have at least the following defects: n-best list rescore method: It only plays a selection role, and the final selected sentence is the sentence in the ASR n-best list, and the errors in the sentence cannot be corrected. ASR post-processing system: It is necessary to manually set a series of complex repair rules, which has many restrictions. ASR error correction system: On the one hand, the direct training data of the error correction system is small, and on the other hand, the output format of the ASR system is inconsistent with the pre-trained language model, so it is difficult to directly use the pre-trained language model. Summary of the invention

[0004] Embodiments of the present invention provide an audio-to-text model training method, an electronic device, and a storage medium, which are used to solve at least one of the above-mentioned technical problems.

[0005] In a first aspect, an embodiment of the present invention provides an audio-to-text model training method, comprising: inputting training audio into an automatic speech recognition system to obtain a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask, and a lattice position embedding; inputting the lattice format into an input data preprocessing system to convert it into input data that is conducive to LatticeBART processing, wherein the decoder of the LatticeBART is a BART decoder, and the encoder of the LatticeBART can splice and map the results of different attention heads to a learnable parameter matrix to obtain an output; using the LatticeBART to decode the input data in an end-to-end manner to obtain text corresponding to the training audio.

[0006] In a second aspect, an embodiment of the present invention provides an audio-to-text model training system, comprising: an automatic speech recognition system, for converting audio information into a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask, and a lattice position embedding; an input data preprocessing system, for converting the lattice format into input data that is conducive to LatticeBART processing, wherein the LatticeBART decoder is a BART decoder, and the LatticeBART encoder can concatenate the results of different attention heads and map them to a learnable parameter matrix to obtain an output; and the LatticeBART, for decoding the input data in an end-to-end manner to obtain text corresponding to the training audio.

[0007] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the audio-to-text model training method and system of any embodiment of the present invention.

[0008] In a fourth aspect, an embodiment of the present invention further provides a computer program product, comprising a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the steps of the audio-to-text model training method and system of any embodiment of the present invention.

[0009] The method of the embodiment of the present application can directly convert the lattice into a sequence in an end-to-end manner. Furthermore, by introducing PTLM prior knowledge and a clever lattice-to-lattice pre-training method, LatticeBART can decode better sentences from lattices than other methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 A flowchart of an audio-to-text model training method provided by one embodiment of the present invention;

[0012] Figure 2A training flow chart of a specific example of an audio-to-text model training method provided in one embodiment of the present invention;

[0013] Figure 3 An example of an edge labeling lattice and a node labeling lattice provided in an embodiment of the present invention;

[0014] Figure 4 The lattice format of the input model provided in one embodiment of the present invention;

[0015] Figure 5 The comparison result of word error rate (%) in eval2000 and rt03 provided by an embodiment of the present invention;

[0016] Figure 6 A diagram comparing model performance on a small-scale data set provided by an embodiment of the present invention;

[0017] Figure 7 The influence of different search beam widths on word error rate (%) provided by an embodiment of the present invention;

[0018] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] Please refer to Figure 1 , which shows a flowchart of an embodiment of the audio-to-text model training method of the present application.

[0021] like Figure 1 As shown, in step 101, the training audio is input into an automatic speech recognition system to obtain a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask, and a lattice position embedding;

[0022] In step 102, the grid format is input to an input data preprocessing system and converted into input data that is convenient for LatticeBART processing, wherein the decoder of the LatticeBART is a BART decoder, and the encoder of the LatticeBART can concatenate the results of different attention heads and map them to a learnable parameter matrix to obtain an output;

[0023] In step 103, the LatticeBART is used to decode the input data in an end-to-end manner to obtain text corresponding to the training audio.

[0024] The method of the embodiment of the present application can directly convert the lattice into a sequence in an end-to-end manner.

[0025] In some optional embodiments, the above method further includes: training the LatticeBART based on a loss function between the decoded text and the real text.

[0026] In some optional embodiments, the training process of the input data preprocessing system includes grid-to-grid pre-training and grid-to-sequence pre-training, so that many unlabeled grid formats can be easily obtained, and high-quality post-processing models can be trained without labeled text.

[0027] In some optional embodiments, the grid-to-grid pre-training includes adding noise and training in the following ways: homophone replacement, token masking, path masking, depth offset and random perturbation of weights. Thus, self-supervised training can be performed in the above manner, and the grid format can be directly used as data for self-supervised training, which can alleviate the disadvantage of limited model performance due to insufficient data.

[0028] In some optional embodiments, the lattice-to-sequence pre-training includes using the lattice output by the lattice-to-lattice pre-training as the input of the lattice-to-sequence pre-training, and the output of the lattice-to-sequence pre-training is a sentence.

[0029] In some optional embodiments, the lattice-to-sequence pre-training includes training using the LatticeBART training method.

[0030] In some optional embodiments, the LatticeBART includes 6 adaptively modified trellis encoder layers and 6 decoder layers.

[0031] An embodiment of the present application also provides an audio-to-text model, including: an automatic speech recognition system, used to convert audio information into a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask and a lattice position embedding; an input data preprocessing system, used to convert the lattice format into input data that is conducive to LatticeBART processing, wherein the decoder of the LatticeBART is a BART decoder, and the encoder of the LatticeBART can splice the results of different attention heads and map them to a learnable parameter matrix to obtain an output; LatticeBART, used to decode the input data in an end-to-end manner to obtain text corresponding to the training audio.

[0032] It should be noted that the above method steps are not used to limit the execution order of each step. In fact, some steps may be executed simultaneously or in the opposite order to the specified step order, and this application has no limitation on this.

[0033] The following describes some problems encountered by the inventor in the process of implementing the present invention and a specific embodiment of the solution finally determined, so that those skilled in the art can better understand the solution of the present application.

[0034] The inventors also found that the above defects are mainly caused by the following reasons: n-best list rescore method: only plays a selection role, so it is unable to correct the errors in the sentence. ASR post-processing system: a series of complex repair rules need to be set manually, which has many restrictions. ASR error correction system: less training data, and mismatched input forms.

[0035] When faced with the above defects, those skilled in the art usually adopt the "n-best list error correction" solution because such a method is relatively simple and easy to implement. However, our method is more compact in input form than the n-best list, but at the same time, our method is more sophisticated in implementation.

[0036] Regarding the problem of mismatched input format: the method of the embodiment of the present application designs the input of the model to make it conform to the input format of the pre-trained language model. Regarding the problem of insufficient training data: the method of the embodiment of the present application proposes a lattice-to-lattice self-supervised training method.

[0037] Please refer to Figure 2 , which shows a training flow chart of a specific example of an audio-to-text model training method provided by an embodiment of the present invention.

[0038] like Figure 2As shown, first, the audio is input into the ASR system and processed by the ASR system to obtain a lattice;

[0039] Then, the input data preprocessing system converts the lattice into input data that is convenient for LatticeBART to process;

[0040] Finally, LatticeBART decodes the final result from the input in an end-to-end manner, which is the text corresponding to the audio.

[0041] This solution can not only fully utilize the capabilities of the pre-trained language model and greatly improve the robustness of the model. In addition, when the training data is insufficient, this solution can directly use the lattice as the data for self-supervised training, which can alleviate the drawback of the limited model performance caused by insufficient data to a certain extent.

[0042] The following specific experiments and experimental data verify the beneficial effects of the embodiments of the present application compared with the prior art.

[0043] In order to improve automatic speech recognition, more and more works have tried to further fix the output of ASR (automatic speech recognition) systems with advanced sequence models. However, the output of ASR systems differs significantly from the input form of standard sequence models. In order to contain richer information, the output of ASR systems is usually a compact lattice structure containing multiple sentences. This mismatch in input form greatly limits the capabilities of sequence models. On the one hand, widely used pre-trained models cannot directly input lattice structures and are therefore difficult to use for this task. On the other hand, the sparsity of supervised training data forces the model to have the ability to learn from limited data. To address these issues, we propose the LatticeBART (Bidirectional and Auto-Regressive Transformers, a pre-trained language model) model, which decodes sequences from lattices in an end-to-end manner and can use the prior knowledge of pre-trained language models. In addition, this paper also proposes a lattice-to-lattice pre-training method, which can be used when annotation data is missing and uses easy-to-generate lattices to train with ASR systems. Experimental results show that the model can effectively improve the output quality of ASR systems.

[0044] 1. Introduction

[0045] Automatic speech recognition (ASR) systems have evolved greatly over the years, from traditional WFST-based ASR systems to more innovative end-to-end (E2E) ASR systems. Thanks to advanced architectures and smarter training methods, ASR systems have surpassed human recognition accuracy in specific environments, but the results in general environments are still unsatisfactory. On the one hand, environmental noise may cause the ASR system to give incorrect results. On the other hand, the reliance on a large amount of data makes it very challenging to train a powerful ASR system. In addition, the direct output of most ASR systems often does not conform to human reading habits, such as missing punctuation, missing capitalization, etc. This is because text regularization is often used to reduce the learning difficulty of ASR models. In order to further improve the quality of ASR recognition results, speech recognition post-processing systems are introduced.

[0046] Rule-based post-processing systems have many grammatical rules built in to reverse text normalization of the output of the ASR system. Such systems are obviously effective, but building complex rules can be a challenging task. More and more post-processing systems use sequence modeling models pre-trained on large-scale corpora to introduce prior language knowledge into the task.

[0047] Figure 3 An edge labeling lattice and a node labeling lattice example are shown. Figure 3 (a) shows the edge labeling lattice, Figure 3 (b) Node labeling lattice in . The forward (above the line), backward (below the line), and edge (below the node) scores are listed.

[0048] However, typically, the output of an ASR system is not limited to a single sentence, but a collection of possible sentences. Both WFST-based ASR systems and E2E ASR systems can output more compact lattices at the decoding end compared to classic sequence-to-sequence (Seq2Seq) models, whose input is usually a single sentence. This formal difference limits the performance of Seq2Seq models in post-processing systems. Some works directly use lattices as input to the model. Some existing technologies feed the nodes in the lattice into the encoder in topological order, and the decoder recovers the correct sentence. Some existing technologies are based on Transformer and improve its structure to be able to consume input in the form of lattices. However, these works require a large amount of supervised data to train the model to process the lattice.

[0049] To address the above issues, we propose a model called LatticeBART, which has two features: 1) the model can directly use BART (or other Transformer-based models such as BERT (Bidirectional Encoder Representations from Transformers) parameters to leverage prior knowledge pre-trained language models (PTLM (pre-trained language model)); 2) a customized lattice-to-lattice (L2L) training method can fully train the model to acquire the ability to model lattices in the presence of only lattices.

[0050] 2. Lattice representation

[0051] The form of data input is closely related to the structure of the model, so before presenting the model, we first answer the question of how to input the graph-structured lattice into the model.

[0052] Nodes

[0053] The lattice output of the ASR model is a directed acyclic graph G = hV,Ei, which contains multiple paths from the source node to the sink. Different paths share some nodes. The lattice is a very compact structure that can accommodate more information than the n-best list. The lattice that records all words and weights on the transmission edges is not conducive to modeling, so it is necessary to first use the line graph algorithm

[14] to drive the word information of the lattice to the nodes (nodelabeled). After applying the line graph algorithm, the node labeled lattice may have multiple start and end nodes. We also need to add start and end symbols to the node labeled lattice, marked as BOS (begin-of-sequence) and EOS (end-of-sequence) to ensure the uniqueness of the start and end points and prevent the lattice from being divided into multiple independent subgraphs. Figure 3 The lattice before and after the transformation is shown. We can use topological sorting to obtain the node sequence (i.e., a series of words) of the node labeling lattice as the input of the model. The result of topological sorting is not unique, and any result is valid. The only thing to note is that once this node order is fixed, other graph structure information also needs to refer to this order.

[0054] Forward-backward score

[0055] After completing the above processing, we turn our attention to the weights of the transfer edges. Typically, the transfer edge contains a language model score and an acoustic model score, which describe the semantic likelihood and pronunciation similarity of the current node, respectively. The two scores can be combined through a pair of interpolation coefficients to form the lattice forward score. It is common practice to normalize the out-degree score of each node to ensure a reasonable range of values. In addition, in order to more comprehensively represent the lattice information, the reverse information flow needs to be considered. Let the forward score of node i to j be fi→j. Then using the equation bi←j= fi→jmi / mj, the backward score can be calculated from the forward score, where mi and mj are the marginal scores that will be introduced immediately. The forward-backward score describes the local structural information of the lattice.

[0056] Marginal score

[0057] If the forward information is regarded as an information flow, the importance of the node can be expressed by the marginal score (formula) assigned by the source node to the successor node. Assume that the marginal score of the starting node is m0 = 1, and the predecessor of node i is Pi. Then the marginal score of node i (i>0) is Pj∈Pi mjfj→i. It can be proved that the marginal score of the terminal node is also 1. The marginal score of a node is also one of the inputs of the model.

[0058] Lattice mask

[0059] When the Transformer-like encoder extracts sentence information, each token in the sentence will pay attention to other tokens under the control of the attention mask filled with 1. As a compact form of multiple sentences, we can consider each path in the lattice as a sentence. Then attention will appear between the tokens of these sentences. If we put the attention matrices of different paths together, we will get a shape of Figure 4 in (5).

[0060] Lattice positional embedding

[0061] The same idea of ​​marking positions using position embeddings in Vanilla Transformer can be used to handle the positions of nodes in the lattice. The difference is that the position of the same node in different paths may be different. For example, Figure 3The word “early” in (b) can be located at the 3rd or 4th position in different paths. It is impractical to enumerate all the positions of all nodes. In LatticeBART, we use the shortest and longest distances from a node to the starting point as the node position coordinates, and the average of the position embeddings of the two distances as the node position embedding.

[0062] Figure 4 The lattice format of the input model is shown. Figure 4 Node index in represents the node index. Figure 4 (1) Token sequence means token sequence. Figure 4 (1) Margin score in the equation represents the marginal score. Figure 4 (3) Lattice min position in the formula indicates the minimum position of the lattice. Figure 4 (4) Lattice max position indicates the maximum position of the lattice. Figure 4 (5) Lattice mask in the above formula represents the Lattice mask. Figure 4 (6)Forward-backward score in represents the forward-backward score.

[0063] Ideally, the number of node-labeled lattice nodes is consistent with the number of tokens in the input model, but this requires our vocabulary to contain all possible words. In contrast, the vocabulary of general pre-trained language models uses subwords as the smallest word-building unit, and a node inevitably maps to multiple tokens. To this end, we need to "expand" the above information categories based on token splitting. In (2) in Figure 4, the word "that's" at node 2 is expanded to "that" and "'s", as shown in Figure 4 shown.

[0064] 3.LATTICEBART

[0065] Learning from a wide range of training corpora using unsupervised training is the source of the excellent sequence modeling capabilities of cutting-edge pre-trained language models. ASR post-processing models need to cope with the complexity of ASR recognition results, and only robust models can output high-quality results. In order to make our model perform robustly, inheriting the rich priors of PTLM is a very effective means. As mentioned in the introduction, the LatticeBART infrastructure has been adapted from the Vanilla Transformer to handle the lattice structure and use BART parameters directly. The LatticeBART decoder is consistent with the BART structure, so this section only introduces the details of the encoder.

[0066] Assuming the length of the input sequence is n, the self-attention operation of each header of the encoder is shown in Equation 1.

[0067]

[0068] Here Qi, Ki, and Vi have the same meaning as Transformer and are the results of three linear mappings of the input hidden state. They are the front and back score matrices and the lattice mask respectively. is the sequence of marginal scores corresponding to the markers, is the only parameter not present in BART and is used to map the marginal scores to the same vector space as Vi.

[0069] H = Concat(H1, H2, ..., H h )W. (2)

[0070] Finally, as described in Equation 2, the output of the current encoder layer is obtained by concatenating the results of different attention heads and mapping them to the learnable parameter matrix W.

[0071] The lattice position embedding mentioned in Section 2 is added to the token embedding as the input of the first layer of the encoder.

[0072] 4. Training Methods

[0073] Although the adaptation of LatticeBART introduces only a small number of parameters on top of BART, how the lattice attention is calculated affects the output distribution of each layer of the model. In order to better unleash the talents of LatticeBART, additional training data is needed to adapt the lattice input. Most previous works input the lattice structure on the encoder side and predict sentences on the decoder side. The advantage of this format is that it is highly consistent with downstream tasks, allowing the model to be used directly after training. However, the disadvantage is that paired training data needs to be constructed, and annotated data is usually expensive, so we propose L2L pre-training.

[0074] 4.1. Lattice to Lattice Pre-training

[0075] Collecting audio for training ASR systems is relatively easy, while managing the text corresponding to the audio is tedious. With an ASR system, many unlabeled lattices can be easily obtained by feeding audio into the system to obtain lattices. In contrast, previous methods cannot train high-quality post-processing models without labeled text. Some unsupervised techniques commonly used in Seq2Seq, such as reinforcement learning, can utilize unlabeled data. Nevertheless, the sparse learning signal of reinforcement learning greatly reduces the availability of data. To more effectively utilize unsupervised data, we propose a lattice-to-lattice (L2L) training method.

[0076] The core idea of ​​L2L pre-training is to feed the lattice with added noise to the encoder, and then let the decoder repair the lattice information. In terms of implementation, in addition to the causal mask acting on the decoder, we also give a lattice mask so that each token can only see the token before it, preventing the interaction between different paths during decoding. It is easy to see that the goal of the L2L task is highly related to the downstream task (i.e. ASR post-processing).

[0077] The fact that the lattice contains rich information is also the way we can perform various additive noise processing. In the L2L pre-training task, we propose the following noise addition.

[0078] Homophone replacement

[0079] The most important association between different paths in the lattice is that they have very similar pronunciations. Therefore, we perform synonym replacement on randomly selected nodes as a form of noise addition. Using the CMU dictionary1, the pronunciation of a word is obtained and a word is selected from a list of candidates with similar pronunciations as the replacement result.

[0080] Token Mask

[0081] We borrowed the masking strategy used in previous BERT training, where randomly selected tokens are replaced with a special MASK symbol. However, the replacement here happens at the node level. That is, if a node is selected, all tokens contained in it will be masked.

[0082] Path masking

[0083] Randomly selecting some paths on the lattice for masking is equivalent to path pruning on the lattice. Adding path masks can train the model to process inputs from lattices with different search beam widths.

[0084] Depth Offset

[0085] The lattice position will be randomly added to a randomly selected integer from 0 to Dr. In our experiments, we let Dr = 10.

[0086] Random perturbations of weights

[0087] LatticeBART is expected to be robust to weight perturbations in different scenarios where proper adjustment of the lattice’s acoustic and language scores is required, i.e., random scaling or random dropout of front, back, and edge scores.

[0088] 4.2. Lattice to sentence training

[0089] Benefiting from the model structure, our model can also be used directly for lattice-to-sequence (L2S) training, where the input of the decoder is a sentence instead of a lattice mask.

[0090] 5. Experiment

[0091] Experimental setup

[0092] In order to inherit prior knowledge from BART, LatticeBART is therefore aligned with the BART base in terms of model configuration, i.e., LatticeBART contains six adaptively modified lattice encoder layers and six decoder layers. The hidden state dimension is 768. In addition, in order to test the performance gain of the LatticeBART structural bias, we also set up a control group with randomly initialized parameters, i.e., the model only uses the performance obtained by learning with existing data, without including prior knowledge. When LatticeBART uses BART parameters, the initial learning rate is set to 1e-5. In contrast, LatticeBART with randomly initialized parameters uses 1e-4. The cosine learning rate decay method is used during training. We use the AdamW optimizer by default.

[0093] In L2L pre-training, the batch size is 16 and the length of the input sequence is limited to 256. Data exceeding this length will be truncated. On the encoder side, tokens have a 5% probability of being replaced by homophones and a 10% probability of being masked. Lattice weights have a 10% probability of being discarded. The path mask operation is equivalent to lattice pruning. For computational efficiency reasons, each lattice is preprocessed with a different weight factor and pruned using the Kaldi tool to obtain multiple backups. During training, the encoder and decoder inputs are randomly selected from these backups. After pathmasking, the beam width of the lattice used for training ranges from 2 to 6, and the beamwidth for testing is 4 by default. The node depth offset is a random integer from 0 to 10. The rest of the L2S training process configuration is no different from L2L, except that no noise is added on the encoder side.

[0094] Dataset

[0095] The experiments in the embodiments of the present application used Switchboard (SWBD) 300 hours and SWB-Fisher 2000 hours data. We followed the EESEN SWBD recipe to build a baseline CTC ASR system based on mobile phones. A 5-layer BiLSTM acoustic model with a hidden size of 320 was trained on SWBD 300 hours of speech, and a 3-gram language model was trained on SWB-Fisher transcripts. The lattices used to train LatticeBART were generated based on the WFST method. The training set and validation set of LatticeBART contain 2,131,620 and 10,000 data, respectively. We tested the performance of LatticeBART on the eval2000 and rt03 datasets, which contain 4,458 and 8,422 lattices, respectively. The sources of the eval2000 data are callhome and SWBD, while the sources of the rt03 data are Fisher and SWBD.

[0096] Figure 5 Shown is a screenshot of Table 1 characterizing the WER (%) results for eval2000 and rt03.

[0097] Results and analysis

[0098] Table 1 shows the results of different models on eval2000 and rt03. Row 1 is the result of decoding the optimal path from the lattice. Rows 2 and 3 show the results of rescoring the language model using a 3-layer LSTM. We train the LSTM model on the training set text. To our surprise, rescoring the language model does not lead to a reduction in WER, but instead hurts the final result. We speculate that the reason for this is that the current lattice already has a superior path score.

[0099] The experimental objects in the 4th row and later are all LatticeBART. L2S and L2L represent lattice to sequence and lattice to lattice in the previous section. The superscript * indicates that the model does not use the parameters of PTLM (BART). The subscript represents the weight of the amount of data used to train LatticeBART to the complete training set. L2L→L2S represents a two-stage training mode, first lattice to lattice pre-training, then lattice to sequence training. In the two-stage training, the L2L training set does not contain text.

[0100] We can draw the following conclusions from the results: 1) The effect of more training data on post-processing tasks is obvious. In row 4, 20% of the training data does not allow the randomly initialized LatticeBART to have a good enough ability to recover information, while the total amount of training data in row 5 can significantly improve this aspect of the model. 2) The prior knowledge of PTLM is important for post-processing tasks. As shown in rows 6 and 7, although only 20% of the training data is used, LatticeBART inheriting the prior knowledge of PTLM can still significantly reduce the WER, and when all the labeled data is used, the performance of LatticeBART in recovering the correct sentence from the noisy lattice is further improved. 3) In order to further improve the performance of experienced LatticeBART when the labeled data is small, the training mode of L2L→L2S can be of great help. Through the noise-resistant training of L2L, even if L2S is subsequently trained on more minor training data, the WER of rows 8 and 9 is still significantly lower than that of row 6.

[0101] Figure 6 Figure 2 shows the performance comparison of models on a small-scale dataset. WER stands for word error rate.

[0102] To further highlight the role of L2L pre-training, we trained the model with very little data. Specifically, we stripped off 1% and 2% of the total data used to train the LatticeBART experiment. The experiments were divided into two groups. The control group "L2L" was trained only with supervised data. The experimental group L2L→L2S first pre-trained L2L with unsupervised data and then trained with supervised data, where the amount of unsupervised data was 80%. The experimental results are shown in Figure 2. Figure 3 As shown in Figure 2. The results show that when the amount of data is the smallest, the experimental group is significantly better than the control group, which confirms that the L2L training mode can help PTLM to adapt to the input data. In addition, due to the high consistency of the L2L and L2S training objectives, this adaptation does not harm the model performance. In addition, when the training data increases from 1% to 20%, the WER of the control group gradually decreases after a period of rapid decline, while the performance of the experimental group continues to improve with the increase in data volume.

[0103] Figure 7 Table 2 is shown to characterize the impact of different search beam widths on word error rate (%).

[0104] The embodiment of the present application also explores the performance of the model under different search beam width inputs. The embodiment of the present application selects the model L2S100% in Table 1 and tests it under lattices with search beam widths varying from 1 to 6. The experimental results are shown in Table 2. As the search beam width increases, the WER on the test set continues to decrease. When the beam width is 1, the input of the model is the lattice optimal path. Compared with the results in the first row of Table 1, it can be seen that although the model inputs are all lattices during the training process, the sequence can still be repaired.

[0105] 6. Conclusion

[0106] This work introduces a new model called LatticeBART, which can directly convert lattices to sequences in an end-to-end manner. By introducing PTLM prior knowledge and a clever lattice-to-lattice pre-training method, LatticeBART can decode better sentences from lattices than other methods.

[0107] In other embodiments, the present invention also provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the audio-to-text model training method and system in any of the above method embodiments;

[0108] As an implementation mode, the non-volatile computer storage medium of the present invention stores computer executable instructions, and the computer executable instructions are configured as follows:

[0109] Inputting the training audio into an automatic speech recognition system to obtain a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask, and a lattice position embedding;

[0110] Inputting the grid format to an input data preprocessing system to convert it into input data that is convenient for LatticeBART processing, wherein the decoder of the LatticeBART is a BART decoder, and the encoder of the LatticeBART can concatenate the results of different attention heads and map them to a learnable parameter matrix to obtain an output;

[0111] The LatticeBART is used to decode the input data in an end-to-end manner to obtain text corresponding to the training audio.

[0112] The non-volatile computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the audio-to-text model training method and system, etc. In addition, the non-volatile computer-readable storage medium may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the non-volatile computer-readable storage medium may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the audio-to-text model training method and system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0113] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes any one of the above-mentioned audio-to-text model training methods and systems.

[0114] Figure 8 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 8 As shown, the device includes: one or more processors 810 and a memory 820, Figure 8 A processor 810 is used as an example. The device of the audio-to-text model training method and system may also include: an input device 830 and an output device 840. The processor 810, the memory 820, the input device 830 and the output device 840 may be connected via a bus or other means. Figure 8In the example, the bus connection is used. The memory 820 is the above-mentioned non-volatile computer-readable storage medium. The processor 810 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 820, that is, the audio-to-text model training method and system of the above-mentioned method embodiment are realized. The input device 830 can receive input digital or character information, and generate key signal input related to the user setting and function control of the communication compensation device. The output device 840 may include a display device such as a display screen.

[0115] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.

[0116] As an implementation mode, the electronic device is applied to an audio-to-text model training method and system, and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:

[0117] Inputting the training audio into an automatic speech recognition system to obtain a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask, and a lattice position embedding;

[0118] Inputting the grid format to an input data preprocessing system to convert it into input data that is convenient for LatticeBART processing, wherein the decoder of the LatticeBART is a BART decoder, and the encoder of the LatticeBART can concatenate the results of different attention heads and map them to a learnable parameter matrix to obtain an output;

[0119] The LatticeBART is used to decode the input data in an end-to-end manner to obtain text corresponding to the training audio.

[0120] The electronic device of the embodiment of the present application exists in various forms, including but not limited to:

[0121] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.

[0122] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.

[0123] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.

[0124] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to the general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0125] (5) Other electronic devices with data interaction functions.

[0126] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for training an audio-to-text model, comprising: Inputting the training audio into an automatic speech recognition system to obtain a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask, and a lattice position embedding; The lattice format is input to the input data preprocessing system and converted into input data that is convenient for LatticeBART processing, wherein the decoder of LatticeBART is a BART decoder, and the encoder of LatticeBART can concatenate the results of different attention heads and map them to a learnable parameter matrix to obtain output; LatticeBART is a model that improves BART by using Lattice; Decoding the input data using the LatticeBART in an end-to-end manner to obtain text corresponding to the training audio; Each attention head of the LatticeBART encoder performs self-attention operation as follows: Where Qi, Ki and Vi have the same meaning as Transformer, which are the results of three linear mappings of the input hidden state; They are the front and back score matrices and the lattice mask respectively; is the sequence of marginal scores corresponding to the markers, is the only parameter not present in BART and is used to map the marginal scores to the same vector space as Vi.

2. The method according to claim 1, further comprising: The LatticeBART is trained based on a loss function between the decoded text and the real text.

3. The method according to claim 1, wherein: The training process of the input data preprocessing system includes grid-to-grid pre-training and grid-to-sequence pre-training.

4. The method according to claim 3, wherein: The grid-to-grid pre-training includes noise addition and training through: homophone replacement, token masking, path masking, depth shifting, and random perturbation of weights.

5. The method according to claim 4, wherein: The lattice-to-sequence pre-training includes using the lattice output by the lattice-to-lattice pre-training as the input of the lattice-to-sequence pre-training, and the output of the lattice-to-sequence pre-training is a sentence.

6. The method according to claim 5, wherein: The lattice-to-sequence pre-training includes training using the LatticeBART training method.

7. The method according to claim 1, wherein: The LatticeBART consists of 6 adaptively modified lattice encoder layers and 6 decoder layers.

8. An audio-to-text model, comprising: An automatic speech recognition system for converting audio information into a lattice format, wherein the lattice format includes a forward-backward score matrix, a marginal score, a lattice mask, and a lattice position embedding; An input data preprocessing system, used for converting the lattice format into input data that is convenient for LatticeBART processing, wherein the decoder of LatticeBART is a BART decoder, and the encoder of LatticeBART can concatenate the results of different attention heads and map them to a learnable parameter matrix to obtain output; LatticeBART is a model that improves BART using Lattice; The LatticeBART is used to decode the input data in an end-to-end manner to obtain text corresponding to the audio information; Each attention head of the LatticeBART encoder performs self-attention operation as follows: Where Qi, Ki and Vi have the same meaning as Transformer, which are the results of three linear mappings of the input hidden state; They are the front and back score matrices and the lattice mask respectively; is the sequence of marginal scores corresponding to the markers, is the only parameter not present in BART and is used to map the marginal scores to the same vector space as Vi.

9. An electronic device, comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method described in any one of claims 1 to 8.

10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Speech recognition post-processing method and system and related equipment

    CN112634878A

  • Text error correction model generation method and system, text error correction method and system, equipment and medium

    CN113066494A

  • Two-pass end to end speech recognition

    WO2021113443A1