Speech recognition error correction data set construction method, electronic equipment, medium and product

By inputting speech corpus data into speech recognition models of different architectures, the speech recognition error correction data set is solved, and the training accuracy of speech recognition error correction data set in the prior art is improved, and the performance of speech recognition error correction model and accuracy.

CN119229851APending Publication Date: 2024-12-31WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411342690.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The accuracy of training of existing speech recognition error correction data sets is relatively low, mainly because the artificially introduced error methods do not match the actual speech recognition scenario, resulting in poor training of error correction models.

Method used

By obtaining corpus data from the preset speech corpus and inputting it into the speech recognition model of at least two different architectures, speech recognition text is generated, speech recognition error correction data set is constructed, and error characteristics are increased to increase the diversity and richness of error characteristics. , to better match the error type in actual speech recognition scenarios.

Benefits of technology

The training effect and accuracy of the speech recognition error correction model are improved, the error correction ability and performance evaluation are enhanced, and the performance of the speech recognition error correction model is further optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229851A_ABST
    Figure CN119229851A_ABST
Patent Text Reader

Abstract

The invention discloses a voice recognition error correction data set construction method, electronic equipment, a medium and a product, and relates to the technical field of voice recognition, and the voice recognition error correction data set construction method comprises the steps: obtaining corpus data from a preset voice corpus; respectively inputting the corpus data into at least two voice recognition models with different architectures to obtain voice recognition texts respectively output by each voice recognition model; and constructing a speech recognition error correction data set according to the speech recognition texts output by the speech recognition models respectively. According to the technical scheme of the invention, the diversity of error features is increased through the voice recognition models of different architectures, the method is more suitable for the actual use scene, and the training effect of the voice recognition error correction model can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech recognition technology, and in particular to a method for constructing a speech recognition error correction data set, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Since Automatic Speech Recognition (ASR) technology may generate errors in the process of converting speech to text during speech recognition, the need for speech recognition error correction arises. Large language models are often used to correct text obtained by speech recognition due to their outstanding semantic understanding capabilities. Before large language models are used to perform speech recognition error correction tasks, they need to be trained with a data set that includes a certain number of erroneous speech recognition texts.

[0003] At present, some speech recognition error correction dataset construction plans use the method of artificially introducing errors in order to expand the scale of speech recognition error correction datasets, such as replacing some characters in the reference text with characters with similar pronunciations to create speech recognition error correction sample data. However, this method is inconsistent with the actual speech recognition scenario and may introduce speech recognition errors that rarely occur in the actual speech recognition model, affecting the training accuracy of the error correction model.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a method for constructing a speech recognition error correction dataset, an electronic device, a computer-readable storage medium and a computer program product, aiming to solve the technical problem that the accuracy of the speech recognition error correction model trained with the current speech recognition error correction dataset is relatively low.

[0006] To achieve the above objectives, the present application proposes a method for constructing a speech recognition error correction dataset, the method comprising:

[0007] Acquire corpus data from a preset speech corpus;

[0008] Inputting the corpus data into at least two speech recognition models of different architectures respectively, to obtain speech recognition texts output by the speech recognition models respectively;

[0009] A speech recognition error correction data set is constructed according to the speech recognition texts respectively output by each of the speech recognition models, wherein the speech recognition error correction data set is used to train the speech recognition error correction model.

[0010] In one embodiment, the speech corpus includes at least a first speech corpus and a second speech corpus, and an average sentence length of corpus data in the first speech corpus is smaller than an average sentence length of the second speech corpus;

[0011] The step of obtaining corpus data from a preset speech corpus includes:

[0012] Acquire corpus data whose sentence length is less than or equal to a preset length from the first speech corpus;

[0013] Corpus data with a sentence length longer than the preset length is acquired from the second speech corpus.

[0014] In one embodiment, after the step of constructing a speech recognition error correction data set, the method further includes:

[0015] Dividing the speech recognition text corresponding to the first speech corpus in the speech recognition error correction data set into phrase sentence sets;

[0016] The speech recognition text corresponding to the second speech corpus in the speech recognition error correction data set is divided into long sentence subsets.

[0017] In one embodiment, after the step of constructing a speech recognition error correction data set, the method further includes:

[0018] According to the sentence length of each speech recognition text in the speech recognition error correction dataset, the speech recognition error correction dataset is divided into a phrase sentence set and a long sentence subset;

[0019] Among them, the sentence length of the speech recognition text in the phrase sentence set is less than or equal to the preset length, and the sentence length of the speech recognition text in the long sentence subset is greater than the preset length.

[0020] In one embodiment, after the step of constructing a speech recognition error correction data set, the method further includes:

[0021] Obtaining a character error rate of each speech recognition text in the speech recognition error correction data set;

[0022] By deleting the speech recognition texts with a character error rate of 0 in the speech recognition error correction data set, adjusting the proportion of the speech recognition texts with a character error rate of 0 in the speech recognition error correction data set, an updated speech recognition error correction data set is obtained;

[0023] Among them, the proportion of speech recognition texts with a character error rate of 0 in the updated speech recognition error correction data set is a preset proportion.

[0024] In one embodiment, after the step of constructing a speech recognition error correction data set, the method further includes:

[0025] Counting statistical indicators of the character error rate of the speech recognition text in the speech recognition error correction data set, wherein the statistical indicators at least include the mean, the median and the variance;

[0026] Counting the replacement rate, addition rate and deletion rate of the character error rate;

[0027] Among them, the statistical indicators of the character error rate, the replacement rate, the addition rate and the deletion rate are used to evaluate the performance of the speech recognition error correction model.

[0028] In one embodiment, the speech recognition model includes at least a first speech recognition model and a second speech recognition model, the first speech recognition model includes at least a CNN network and an HMM model, and the second speech recognition model includes a feature extraction module, an encoder, and a decoder;

[0029] The step of inputting the corpus data into at least two speech recognition models of different architectures to obtain speech recognition texts output by the speech recognition models comprises:

[0030] Extracting feature vectors of the corpus data, performing acoustic modeling on the feature vectors through a preset CNN network, and outputting probability distribution of corresponding pronunciation units;

[0031] The probability distribution of the pronunciation unit is input into the HMM model, and the corresponding speech recognition text is obtained by prediction of the HMM model;

[0032] Extracting audio features of the corpus data through a feature extraction module, and encoding the audio features through an encoder to obtain semantic information;

[0033] The semantic information is converted into corresponding speech recognition text by a decoder.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for constructing a speech recognition error correction data set as described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the method for constructing a speech recognition error correction data set as described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method for constructing a speech recognition error correction data set as described above.

[0037] The present application proposes a method for constructing a speech recognition error correction dataset. In the method for constructing a speech recognition error correction dataset, corpus data is first obtained from a preset speech corpus, and then the corpus data is respectively input into at least two speech recognition models of different architectures to obtain speech recognition texts respectively output by the speech recognition models. Speech recognition models of different architectures will output speech recognition texts of different qualities, so as to provide different types of sample data for the training, evaluation, and error correction of the speech recognition model, thereby increasing the diversity and richness of error features in the speech recognition error correction dataset. Moreover, the error types of the speech recognition texts obtained by using the training speech corpus data and the speech recognition model are more consistent with the error types that are prone to occur in actual speech recognition scenarios, which is conducive to improving the training effect of the speech recognition error correction model. Finally, a speech recognition error correction dataset is constructed based on the speech recognition texts respectively output by the speech recognition models. The obtained speech recognition error correction dataset can be used to train the speech recognition error correction model, and can also be used for performance evaluation and fine-tuning of the speech recognition error correction model, etc., thereby further improving the error correction capability and accuracy of the speech recognition error correction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 A flowchart of the first embodiment of the method for constructing a speech recognition error correction dataset of the present application is provided;

[0041] Figure 2 A schematic diagram of the correspondence between each speech corpus and a phrase sentence set and a long sentence subset in an embodiment of the method for constructing a speech recognition error correction data set of the present application;

[0042] Figure 3 A schematic diagram of a flow chart of adjusting the proportion of speech recognition texts with a character error rate of 0 in a speech recognition error correction set in an embodiment of the method for constructing a speech recognition error correction data set of the present application;

[0043] Figure 4 A schematic diagram of a feasible principle of determining a speech recognition error correction dataset through a preset corpus and a speech recognition model in an embodiment of the method for constructing a speech recognition error correction dataset of the present application;

[0044] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the method for constructing a speech recognition error correction data set in an embodiment of the present application.

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

[0046] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0048] The execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, a server, etc., or an electronic device or a control device capable of realizing the above functions. The following takes the server as an execution subject as an example to illustrate this embodiment and the following embodiments.

[0049] The present application embodiment provides a method for constructing a speech recognition error correction data set, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for constructing a speech recognition error correction dataset of the present application. The method for constructing a speech recognition error correction dataset includes:

[0050] Step S10, obtaining corpus data from a preset speech corpus;

[0051] Among them, the preset speech corpus can be one or more of the currently open-source multiple open-source speech corpora, such as THCHS-30 (a Chinese speech data set), AISHELL-1 (a Chinese Mandarin speech database open sourced by Hill Shell), AISHELL-2 and WeNetSpeech (a large-scale Chinese speech data set maintained by the WeNet team), etc. There are a large amount of corpus data in these corpora, which can be used to build the speech corpus data foundation of the speech recognition error correction data set. In addition, the preset length is a pre-set length value for dividing short sentences and long sentences to ensure that the corpus data includes both short sentence corpus data and long sentence corpus data. For example, the preset length can be 30 Chinese characters. Because these corpora cover corpus data of multiple fields, multiple voice qualities, and multiple voice lengths, the corresponding speech recognition error correction data set can better fit the actual speech recognition scenario, so as to train a speech recognition error correction data set with better error correction performance.

[0052] Step S20, inputting the corpus data into at least two speech recognition models of different architectures respectively, to obtain speech recognition texts output by each speech recognition model respectively;

[0053] In the embodiment of the present application, two or more pre-trained speech recognition models with different architectures are used to perform speech recognition processing on the corpus data, thereby obtaining the speech recognition results output by each speech recognition model, that is, the speech recognition text. These speech recognition texts are all obtained through the existing speech corpus through the real speech recognition processing process, so they are more in line with the real speech recognition scenario, and the types of errors appearing in the speech recognition text are also more in line with the actual situation.

[0054] In addition, since a variety of speech recognition models with different architectures are used in the embodiments of the present application, and the speech recognition structures of speech recognition models with different architectures have different characteristics, and the error characteristics and recognition quality are also different, the diversity of speech recognition error types in the speech recognition error correction dataset is increased. In the subsequent training process of the speech recognition error correction model, targeted training, evaluation and fine-tuning can be performed according to different types of data. For example, when the speech recognition error correction model corrects the speech recognition text output by speech recognition models with different architectures, it can use a speech recognition error correction dataset composed of speech recognition texts corresponding to speech recognition models of the same architecture for targeted fine-tuning, so that the speech recognition error correction model can better fit the characteristics of the speech recognition model, achieve more precise text correction, and obtain more accurate speech recognition text.

[0055] Step S30, constructing a speech recognition error correction data set according to the speech recognition texts respectively output by each speech recognition model, wherein the speech recognition error correction data set is used to train the speech recognition error correction model.

[0056] Finally, after obtaining the speech recognition texts output by each speech recognition model, the corresponding speech recognition error correction data set is composed of all the speech recognition texts. It should be noted that in addition to being used to train the speech recognition error correction model, the speech recognition error correction data set can also be used to evaluate and fine-tune the performance of the speech recognition error correction model. Since the speech recognition texts in the speech recognition error correction data set come from different speech recognition models, the speech recognition error correction data set can also be divided into different subsets according to the source of the speech recognition text (i.e., the corresponding speech recognition model), which is convenient for targeted training, evaluation, and fine-tuning in the process of training the speech recognition error correction model.

[0057] In addition, for the speech recognition text in the speech recognition error correction dataset, 10% of the data can be used as a validation set, 10% of the data can be used as a test set, and the rest (80%) can be used as a training set.

[0058] In the method for constructing a speech recognition error correction data set provided in an embodiment of the present application, corpus data is first obtained from a preset speech corpus, wherein the corpus data at least includes corpus data with a sentence length greater than a preset length and corpus data less than or equal to the preset length, which is used to determine the corresponding speech recognition texts of different sentence lengths, so as to facilitate the evaluation of the performance of the speech recognition error correction model from the short sentence and long sentence levels respectively, and then the corpus data is respectively input into at least two speech recognition models with different architectures to obtain the speech recognition texts output by each of the speech recognition models respectively. Speech recognition models with different architectures will output speech recognition texts of different qualities, so as to improve the performance of the speech recognition model. Training, evaluation, and error correction provide different types of sample data, which increases the diversity and richness of error features in the speech recognition error correction data set. Moreover, the error types of the speech recognition texts obtained by using the training speech corpus data and the speech recognition model are more in line with the error types that may occur in actual speech recognition scenarios, which is beneficial to improving the training effect of the speech recognition error correction model. Finally, a speech recognition error correction data set is constructed based on the speech recognition texts output by each of the speech recognition models. The obtained speech recognition error correction data set can be used to train the speech recognition error correction model, and can also be used for performance evaluation and fine-tuning of the speech recognition error correction model, etc., to further improve the error correction capability and accuracy of the speech recognition error correction model.

[0059] The embodiment of the present application constructs a data set specifically for speech recognition error correction tasks, and combines speech recognition models of various different architectures to systematically evaluate and improve the performance of speech recognition error correction models in automatic speech recognition error correction tasks. The technical solution based on the embodiment of the present application can not only provide strong support for the application of large language models in the field of ASR, but also promote the advancement of ASR technology and achieve more accurate and intelligent speech recognition.

[0060] Furthermore, in a feasible implementation manner, the speech corpus includes at least a first speech corpus and a second speech corpus, and an average sentence length of corpus data in the first speech corpus is smaller than an average sentence length of the second speech corpus;

[0061] The step of obtaining corpus data from a preset speech corpus includes:

[0062] Step S11, acquiring corpus data whose sentence length is less than or equal to a preset length from a first speech corpus;

[0063] Step S12: Acquire corpus data whose sentence length is longer than a preset length from the second speech corpus.

[0064] Among them, the number of the first speech corpus and the second speech corpus can be more than one, and the difference between the first speech corpus and the second speech corpus lies in the different average sentence lengths. For example, the length of the corpus data in the first speech corpus is generally shorter, and it is a speech corpus in which short sentences account for a relatively large proportion, while the second speech corpus has a larger proportion of long sentences.

[0065] For example, refer to Figure 2 The first speech corpus may include THCHS-30, AISHELL-1 and AISHELL-2, corresponding to short sentence corpus data, and the second speech corpus may include WeNetSpeech, corresponding to long sentence corpus data, wherein the corpus data of WeNetSpeech is richer than that of the previous speech corpora, and contains more corpus data with a length greater than a preset length. When obtaining corpus data from WeNetSpeech, a preset number (such as 434781 audio clips) of corpus data can be selected, and the corresponding text records contain more than 30 Chinese characters.

[0066] By combining four open source Chinese speech corpora, the technical solution of the embodiment of the present application can more comprehensively reflect the speech recognition performance of the ASR system in different fields, different speech qualities, and different speech lengths, and improve the richness of the speech recognition error correction data set to improve the training effect and final performance of the error correction model, so that the speech recognition error correction model has stronger generalization ability and higher error correction accuracy.

[0067] The speech recognition error correction data set in the embodiment of the present application is constructed by combining corpora in multiple fields, covering dozens of fields such as smart home, news, podcasts, interviews, etc., with rich corpus data. The speech recognition error correction data set obtained here has a wider coverage and higher quality, which is conducive to training a speech recognition error correction model with better error correction performance, thereby improving the accuracy of the speech recognition text after error correction by the speech recognition error correction model, and improving the user's speech recognition experience.

[0068] In another feasible embodiment, after the step of constructing a speech recognition error correction data set, the method further includes:

[0069] Step A10, dividing the speech recognition text corresponding to the first speech corpus in the speech recognition error correction data set into phrase sentence sets;

[0070] Step A20, dividing the speech recognition text corresponding to the second speech corpus in the speech recognition error correction dataset into long sentence subsets.

[0071] An embodiment of the present application also provides a method for further dividing the speech recognition error correction data set into subsets. Specifically, since the average sentence lengths of the first speech corpus and the second speech corpus are inconsistent, after obtaining the speech recognition error correction data set, it can be divided into a short sentence set or a long sentence set based on the source of the speech recognition text therein.

[0072] Dividing the speech recognition error correction dataset into a short sentence set and a long sentence set can provide targeted training for the error correction performance of short sentences and long sentences respectively during the training process of the speech recognition error correction model, which helps to more accurately evaluate and improve the performance of the error correction model.

[0073] It should be noted that the above-mentioned partitioning schemes of phrase sentence sets and long sentence subsets can be used together with the subset partitioning schemes of speech recognition models based on different architectures. For example, the speech recognition error correction data set includes subsets corresponding to speech recognition models of two different architectures, each of which includes two subsets, a phrase sentence set and a long sentence subset, ultimately forming a multi-layer subset architecture, which further subdivides the speech recognition error correction data. When training the speech recognition error correction model, it can fine-tune and improve its error correction ability for a certain structure of the speech recognition model or a certain length of speech corpus data according to actual conditions, which is conducive to more accurately training a speech recognition error correction model with stable performance that meets expectations.

[0074] Furthermore, in another feasible embodiment, after the step of constructing the speech recognition error correction data set, the method further includes:

[0075] Step B10, dividing the speech recognition error correction dataset into a short sentence set and a long sentence subset according to the sentence length of each speech recognition text in the speech recognition error correction dataset;

[0076] Among them, the sentence length of the speech recognition text in the short sentence set is less than or equal to the preset length, and the sentence length of the speech recognition text in the long sentence set is greater than the preset length.

[0077] An embodiment of the present application provides another method for dividing phrase sentence sets and long sentence subsets, which is mainly based on the sentence length of the speech recognition text. Specifically, the sentence length refers to the Chinese character length of each sentence in the speech recognition text, such as the number of Chinese characters included.

[0078] Exemplarily, if the number of Chinese characters in a sentence is less than 30, the sentence is determined to be a short sentence and is classified into the phrase sentence set; if the number of Chinese characters in another sentence is greater than 30, the sentence is determined to be a long sentence and is classified into the long sentence set.

[0079] It should be noted that the division method of the phrase sentence set and the long sentence subset provided in step B10 is a parallel scheme with steps A10 to A20. For example, after the speech corpus corresponding to long sentences and short sentences has been divided when obtaining corpus data from the speech corpus, the phrase sentence set and the long sentence subset can be divided according to the source of the speech sentence text. If the speech corpus corresponding to long sentences and short sentences is not distinguished when obtaining corpus data from the speech corpus, it can be divided into the phrase sentence set and the long sentence subset according to the length of each speech recognition text in the speech recognition error correction data set finally obtained.

[0080] In another feasible embodiment, step B10 may be performed after the steps of dividing the phrase sentence set and the long sentence subset according to steps A10 to A20, so as to avoid errors in dividing the phrase sentence set and the long sentence subset according to the source of the speech sentence text, and further proofreading may be performed based on the length of the speech recognition text to improve the accuracy of the division of the phrase sentence set and the long sentence subset.

[0081] In one possible embodiment, referring to Figure 3 After the step of constructing a speech recognition error correction data set, the method further comprises:

[0082] Step S40, obtaining the character error rate of each speech recognition text in the speech recognition error correction data set;

[0083] Step S50, by deleting the speech recognition texts with a character error rate of 0 in the speech recognition error correction data set, adjusting the proportion of the speech recognition texts with a character error rate of 0 in the speech recognition error correction data set, to obtain an updated speech recognition error correction data set;

[0084] Among them, the proportion of speech recognition texts with a character error rate of 0 in the updated speech recognition error correction data set is a preset proportion.

[0085] The embodiment of the present application also provides a method for adjusting the proportion of speech recognition texts in which the character error rate (CER) is 0 after determining the speech recognition error correction data set.

[0086] Since speech recognition models of various architectures have passed pre-training and performance evaluation, the accuracy of speech recognition is relatively high. However, when training the speech recognition error correction model, the proportion of completely correct speech recognition texts (that is, the character error rate is 0) is too high. The speech recognition error correction model cannot receive sufficient error correction training, which will affect its error correction accuracy.

[0087] In order to improve the error correction accuracy of the speech recognition error correction model, in the embodiment of the present application, the proportion of speech recognition texts with a character error rate of 0 in the speech recognition error correction data set is further adjusted, so that the proportion of speech recognition texts with a character error rate of 0 in the updated speech recognition error correction data set is a relatively low preset proportion (for example, 10%). In this way, the proportion of speech recognition texts with character errors in the updated speech recognition error correction data set is 90%, which can have a good training effect on the speech recognition error correction model and ensure the rigor and challenge of model training and evaluation.

[0088] In a feasible embodiment, after the step of dividing the speech recognition error correction data set into a phrase sentence set and a long sentence subset, the method further includes:

[0089] Step S60, collecting statistical indicators of character error rates of speech recognition texts in the speech recognition error correction data set, where the statistical indicators at least include a mean, a median, and a variance;

[0090] Step S70, counting the replacement rate, addition rate and deletion rate in the character error rate;

[0091] Among them, the statistical indicators of character error rate, replacement rate, addition rate and deletion rate are used to evaluate the performance of the speech recognition error correction model.

[0092] In order to be more refined in evaluating the performance of the speech recognition error correction model, further measure the performance of the speech recognition error correction model on the ASR error correction task, accurately understand and improve its error correction ability, and further count the statistical indicators of the character error rate of the speech recognition text in the speech recognition error correction dataset as well as the replacement rate, addition rate, and deletion rate.

[0093] Exemplarily, the character error rate refers to the error rate ratio of each speech recognition text (in units of sentences) in the speech recognition error correction data set, for example, the ratio of the number of erroneous characters in a sentence to the total characters in the sentence. Its statistical indicators refer to the average character error rate, the median and the variance of the character error rate of each speech recognition text in the entire speech recognition error correction data set, and the replacement rate, addition rate and deletion rate in the character error rate refer to the proportion of various types of character errors. For example, the replacement rate refers to the proportion of speech recognition texts that need to be replaced by other words due to recognition errors, the addition rate refers to the proportion of speech recognition texts that need to add new words to the sentence due to missed recognition words, and the deletion rate refers to the proportion of speech recognition texts that need to delete redundant words due to redundant words.

[0094] The average, median and variance of the above character error rate and the replacement rate, addition rate and deletion rate can be used to evaluate the performance of the speech recognition error correction model, where the character error rate is equal to the sum of the replacement rate, addition rate and deletion rate. Specifically, after the speech recognition error correction model is trained with the speech recognition error correction data set, the speech recognition error correction model will output the speech recognition text for error correction to obtain a speech recognition text with a higher accuracy rate. The statistical indicators of the character error rate and the replacement rate, addition rate and deletion rate of the speech recognition text after error correction can be counted, and compared with the statistical indicators and the replacement rate, addition rate and deletion rate of the speech recognition error correction data set to determine how much each indicator has been reduced, so as to evaluate the error correction ability of the speech recognition error correction model, and also to specifically determine how strong the error correction ability of the speech recognition error correction model is for speech recognition texts with different character error types. For example, after error correction, the reduction in the replacement rate is significantly lower than the reduction in the addition rate and the deletion rate, indicating that the speech recognition error correction model is not capable of correcting the error of replacing this type of character error, and further targeted training and optimization are needed.

[0095] Through this refined data set feature comparison, the performance of the speech recognition error correction model can be accurately evaluated, which facilitates targeted optimization, improves and perfects the error correction capability of the speech recognition error correction model, and improves the user's speech recognition experience.

[0096] In another feasible embodiment, in addition to counting the statistical indicators of the character error rate and the replacement rate, addition rate and deletion rate of the speech recognition text in the speech recognition error correction data set, it is also possible to further count the statistical indicators of the character error rate and the replacement rate, addition rate and deletion rate of the speech recognition text corresponding to the subsets corresponding to the speech recognition models of different architectures, the long sentence subsets or the phrase sentence sets, so as to identify the error characteristics of different subsets, so as to further evaluate the error correction ability of the speech recognition error correction model for the speech recognition texts of the speech recognition models of different architectures and the speech recognition texts of the long and short sentence sets.

[0097] In a feasible embodiment, the speech recognition model includes at least a first speech recognition model and a second speech recognition model, the first speech recognition model includes at least a CNN (Convolutional Neural Networks) network and an HMM (Hidden Markov Model) model, and the second speech recognition model includes a feature extraction module, an encoder, and a decoder;

[0098] The step of inputting the corpus data into at least two speech recognition models of different architectures to obtain speech recognition texts output by the speech recognition models comprises:

[0099] Step S21, extracting feature vectors of the corpus data, performing acoustic modeling on the feature vectors through a preset CNN network, and outputting the probability distribution of the corresponding pronunciation units;

[0100] Step S22, inputting the probability distribution of the pronunciation unit into the HMM model, and obtaining the corresponding speech recognition text through the HMM model prediction;

[0101] Step S23, extracting audio features of the corpus data through a feature extraction module, encoding the audio features through an encoder to obtain semantic information;

[0102] Step S24, converting the semantic information into corresponding speech recognition text through a decoder.

[0103] In the embodiment of the present application, the first speech recognition model is a deep learning network-hidden Markov model (DNN-HMM hybrid model, Deep Neural Network-Hidden Markov Model), and the second speech recognition model is an end-to-end speech recognition model (Zipformer-Transducer system), which are two commonly used models in the field of speech recognition.

[0104] Before the first speech recognition model outputs the speech recognition text, it first extracts the feature vector of the corpus data, and then performs acoustic modeling through the CNN network. The built-in multi-stream CNN structure captures acoustic features of different scales. These acoustic features can be used to train the DNN-HMM hybrid model or be input into the trained DNN-HMM hybrid model to predict the speech recognition text with the highest probability.

[0105] The second speech recognition model belongs to the Zipformer-Transducer model architecture, which completes feature extraction, feature encoding, decoding and prediction output through the front-end feature extraction module, encoder and decoder respectively. Among them, after the encoder encodes the audio features, the semantic information obtained is high-level semantic representation information, and the decoder is used to convert the high-level semantic information into the corresponding text sequence (i.e., speech recognition text).

[0106] Exemplarily, the DNN-HMM hybrid model refers to a DNN-HMM hybrid ASR system, which uses multi-stream CNN for acoustic modeling and uses the FST (Finite State Transducer) structure to format the N-Gram language model (Chinese language model). It and the Zipformer-Transducer system represent two different technical architectures in the field of speech recognition. The speech recognition models of the above two different architectures can be trained on Kaldi-K1 (an open source speech recognition platform) and Kaldi-K2, respectively.

[0107] In the pre-training process of the DNN-HMM hybrid model, the training set corpus is first pre-processed, including feature extraction of audio data and standardization of text data. Secondly, acoustic modeling is performed using a multi-stream CNN, including extracting features of each frame of audio and building a multi-stream CNN structure. The CNN structure includes multiple convolutional layers and pooling layers to capture acoustic features of different scales. The extracted audio features are used to train the DNN-HMM hybrid model, and the objective function is to maximize the likelihood of the phoneme state sequence. Then, the N-Gram language model is used for language modeling, and N-Gram statistical information is extracted from the corpus data. These statistical information are used to build the N-Gram model and format it in the Finite State Transducer (FST) format. Finally, the acoustic model and language model are combined, and speech recognition is performed through a decoder. The Viterbi algorithm is used in the decoding process to find the optimal phoneme state sequence, and finally the speech recognition text is output according to the phoneme state sequence.

[0108] In the pre-training process of the Zipformer-Transducer system, the training set corpus is first pre-processed, including feature extraction of audio data and standardization of text data. Secondly, the Zipformer-Transducer model architecture is constructed, including at least the front-end feature extraction module, encoder (Zipformer) and decoder (Transducer) in the model architecture. Zipformer adopts the Transformer structure, but compresses it in the time dimension to improve the efficiency of processing long sequences. Then, the constructed model architecture is trained using the cross entropy loss function. The optimization goal is to maximize the likelihood of the text sequence. The specific training steps include: extracting audio features through the front-end feature extraction module; the Zipformer encoder encodes the audio features and extracts high-level semantic representations; the Transducer decoder converts the high-level representations into corresponding text sequences. Finally, the model is evaluated and optimized. According to the evaluation results, the model parameters and training strategies are adjusted to further optimize the model performance.

[0109] For ease of understanding, the method for determining a speech recognition error correction data set by using a preset corpus and a speech recognition model proposed in the embodiment of the present application is as follows: Figure 4 As shown, first, corpus data is extracted from the corpus THCHS-30 (involving news fields), AISHELL-1 (involving smart home, autonomous driving, industrial generation and other fields), AISHELL-2 (involving keywords, voice commands, smart home, autonomous driving and other fields) and WeNetSpeech (involving audio books, comments, live reports, dramas, documentaries and other fields) and input into a DNN-HMM Hybrid ASR system based on Kaldi-K1 and an end-to-end ASR system based on Kaldi-K2 and Zipformer-Transducer architecture, and then the speech recognition text output by each ASR system is processed. The data processing can include the division of long and short sentence sets, the adjustment of the proportion of character error rate to 0, and the statistical indicators of the statistical character error rate, etc., and finally the speech recognition error correction data set is obtained.

[0110] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method for constructing a speech recognition error correction data set of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0111] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for constructing a speech recognition error correction data set in the above-mentioned embodiment one.

[0112] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0113] like Figure 5 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0114] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0115] The electronic device provided by the present application adopts the method for constructing a speech recognition error correction data set in the above embodiment, which can solve the technical problem that the accuracy of the speech recognition error correction model trained by the current speech recognition error correction data set is low. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the method for constructing a speech recognition error correction data set provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0116] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0117] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0118] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the method for constructing a speech recognition error correction data set in the above-mentioned embodiment.

[0119] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0120] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0121] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device executes: obtaining corpus data from a preset speech corpus; inputting the corpus data into at least two speech recognition models of different architectures respectively to obtain speech recognition texts output by each of the speech recognition models; and constructing a speech recognition error correction data set based on the speech recognition texts output by each of the speech recognition models, wherein the speech recognition error correction data set is used to train the speech recognition error correction model.

[0122] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0125] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for constructing a speech recognition error correction data set, and can solve the technical problem that the accuracy of the speech recognition error correction model trained by the current speech recognition error correction data set is low. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the method for constructing a speech recognition error correction data set provided in the above-mentioned embodiment, and will not be elaborated here.

[0126] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for constructing a speech recognition error correction data set as described above.

[0127] The computer program product provided by the present application can solve the technical problem that the accuracy of the speech recognition error correction model trained by the current speech recognition error correction data set is low. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the speech recognition error correction data set construction method provided by the above embodiment, and will not be repeated here.

[0128] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for constructing a speech recognition error correction dataset, characterized in that: The speech recognition error correction data set construction method comprises: Acquire corpus data from a preset speech corpus; Inputting the corpus data into at least two speech recognition models of different architectures respectively, to obtain speech recognition texts output by the speech recognition models respectively; A speech recognition error correction data set is constructed according to the speech recognition texts respectively output by each of the speech recognition models, wherein the speech recognition error correction data set is used to train the speech recognition error correction model.

2. The method for constructing a speech recognition error correction dataset according to claim 1, characterized in that: The speech corpus includes at least a first speech corpus and a second speech corpus, and an average sentence length of corpus data in the first speech corpus is smaller than an average sentence length of the second speech corpus; The step of obtaining corpus data from a preset speech corpus includes: Acquire corpus data whose sentence length is less than or equal to a preset length from the first speech corpus; Corpus data with a sentence length longer than the preset length is acquired from the second speech corpus.

3. The method for constructing a speech recognition error correction dataset according to claim 2, characterized in that: After the step of constructing a speech recognition error correction data set, the method further comprises: Dividing the speech recognition text corresponding to the first speech corpus in the speech recognition error correction data set into phrase sentence sets; The speech recognition text corresponding to the second speech corpus in the speech recognition error correction data set is divided into long sentence subsets.

4. The method for constructing a speech recognition error correction dataset according to claim 1, characterized in that: After the step of constructing a speech recognition error correction data set, the method further comprises: According to the sentence length of each speech recognition text in the speech recognition error correction dataset, the speech recognition error correction dataset is divided into a phrase sentence set and a long sentence subset; Among them, the sentence length of the speech recognition text in the phrase sentence set is less than or equal to the preset length, and the sentence length of the speech recognition text in the long sentence subset is greater than the preset length.

5. The method for constructing a speech recognition error correction dataset according to claim 1, characterized in that: After the step of constructing a speech recognition error correction data set, the method further comprises: Obtaining a character error rate of each speech recognition text in the speech recognition error correction data set; By deleting the speech recognition texts with a character error rate of 0 in the speech recognition error correction data set, adjusting the proportion of the speech recognition texts with a character error rate of 0 in the speech recognition error correction data set, an updated speech recognition error correction data set is obtained; Among them, the proportion of speech recognition texts with a character error rate of 0 in the updated speech recognition error correction data set is a preset proportion.

6. The method for constructing a speech recognition error correction dataset according to claim 1, characterized in that: After the step of constructing a speech recognition error correction data set, the method further comprises: Counting statistical indicators of the character error rate of the speech recognition text in the speech recognition error correction data set, wherein the statistical indicators at least include the mean, the median and the variance; Counting the replacement rate, addition rate and deletion rate of the character error rate; Among them, the statistical indicators of the character error rate, the replacement rate, the addition rate and the deletion rate are used to evaluate the performance of the speech recognition error correction model.

7. The method for constructing a speech recognition error correction dataset as claimed in claim 1, characterized in that: The speech recognition model includes at least a first speech recognition model and a second speech recognition model, the first speech recognition model includes at least a CNN network and an HMM model, and the second speech recognition model includes a feature extraction module, an encoder and a decoder; The step of inputting the corpus data into at least two speech recognition models of different architectures to obtain speech recognition texts output by the speech recognition models comprises: Extracting feature vectors of the corpus data, performing acoustic modeling on the feature vectors through a preset CNN network, and outputting probability distribution of corresponding pronunciation units; The probability distribution of the pronunciation unit is input into the HMM model, and the corresponding speech recognition text is obtained by prediction of the HMM model; Extracting audio features of the corpus data through a feature extraction module, and encoding the audio features through an encoder to obtain semantic information; The semantic information is converted into corresponding speech recognition text by a decoder.

8. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for constructing a speech recognition error correction data set as described in any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for constructing a speech recognition error correction data set as described in any one of claims 1 to 7 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.