An efficient and adaptive hot word correction method and system for speech recognition engines

Through the deep learning method and speech synthesis technology based on the BERT framework, an adaptive hot word error correction system is constructed, which solves the hot word update and timeliness problems in speech recognition technology, improves the error correction accuracy and user experience, and realizes speech Collaborative optimization of recognition systems and error correction models.

CN118471201BActive Publication Date: 2024-09-20DATATANG(BEIJING)TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410910592.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-09-20
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

It is difficult for existing speech recognition technology to quickly adapt to the update and timeliness of hot words, resulting in poor error correction accuracy and poor user experience. Moreover, traditional error correction models lack a cooperative adaptation mechanism with the speech recognition system, making it difficult to handle hot words in specific contexts. Wrong word.

Method used

Adopt the deep learning method based on the BERT framework, record and analyze historical errors of hot words through speech synthesis and speech recognition technology, systematically learn and optimize the error correction model, realize adaptive data amplification and hot word error correction reasoning, combined with SAM-BERT and HIFI-GAN and other technologies to build an efficient hot word error correction system.

Benefits of technology

It realizes the collaborative optimization of the speech recognition engine and the error correction model, improves the accuracy and robustness of hot word recognition, solves the problems of slow training speed of traditional models and insufficient automatic update capabilities, and improves the overall performance of the speech recognition system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118471201B
    Figure CN118471201B
Patent Text Reader

Abstract

The present invention provides an efficient and adaptive hot word error correction method and system for speech recognition engines. The system includes a data collection and classification module, an adaptive data amplification module, a hot word error correction training module and a hot word error correction reasoning module. The data collection and classification module collects large-scale data on misrecognition situations that occur in practical applications and classifies the collected data. The adaptive data amplification module collects and increases hot word-related error instances for a specific speech recognition engine, and constructs a training data set for hot word error correction model training. The hot word error correction training module uses a deep learning algorithm to construct an error correction model for hot word errors in the speech recognition engine. The hot word error correction reasoning module is used to detect and correct errors in text information output by the speech recognition engine, and output corrected text information. Through the scheme of the present invention, the overall performance and accuracy of the model in hot word error correction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of speech signal processing, and in particular relates to a highly efficient and adaptive hot word error correction method and system for a speech recognition engine. Background Art

[0002] In recent years, the effect of Automatic Speech Recognition (ASR) has been very stable, and its word error rate has continued to decrease every year. ASR technology has achieved remarkable application results in the fields of telephone calls, human-computer interaction, automatic dictation, etc. However, in actual applications, the rapid development of mobile Internet and social networks has continuously spawned a large number of new hot topics and related hot words. These hot words not only have extremely high attention and frequency of use, but also often contain special meanings in specific situations and show significant timeliness characteristics. Therefore, in the field of speech recognition technology, how to quickly and efficiently adapt to and integrate this type of continuously updated hot word library is a challenging task for improving speech recognition accuracy and user experience.

[0003] Text error correction for speech recognition is a natural language processing technology that aims to correct errors in the text output by the speech recognition engine. It involves the correction of typos, grammar correction, and hot word correction in specific scenarios. Hot word error correction technology can effectively reduce the error rate of speech recognition in specific scenarios. Traditional hot word error correction mainly adopts rule-based or translation model-based methods, among which the rule-based method mainly relies on manually defined replacement word dictionaries, while the use of language models for text error correction is the current mainstream method, and the neural network-based model has replaced the statistical translation model for error correction. The current main hot word error correction methods include methods based on Chinese word segmentation, n-gram language model, linguistic rules and confusion word library, methods based on statistical machine translation and neural machine translation, methods based on hash strings and dependency syntax, and methods based on deep learning, etc. The relevant patents and technical research are as follows:

[0004] Patent CN113066494A discloses a text error correction model generation method and system, a text error correction method, system, device and medium, which uses a coding and decoding structure to train the error correction model, encodes the text after speech recognition, and obtains the feature vector of the speech recognition text; inputs the feature vector of the reference text and the feature vector of the speech recognition text into the decoder for decoding, and calculates the loss function according to the decoding result, and generates the text error correction model by optimizing the loss function training. This method can not only correct the replacement type errors in the common ASR recognition text, but also perform text correction for text insertion errors and text deletion errors. In addition, the invention can also make the corrected sentences more fluent and more conducive to people's reading and comprehension. However, this method fails to learn and adapt to the error characteristics of the speech recognition system in a specific application scenario, so it cannot effectively achieve collaborative operation with the actual running speech recognition system. In other words, this method does not take into account the particularity of different speech recognition systems and the typical error modes that may occur during the error correction process, which makes it unable to closely cooperate with the speech recognition system to jointly optimize the accuracy of hot word recognition.

[0005] Patent CN113178194A discloses a speech recognition method and system for interactive hot word updating, the method comprising: recognizing the received audio, outputting the recognition text result after transcription and judging whether it is accurate, if accurate, outputting the recognition text result, if inaccurate, adding a hot word; combining the recognition text result with the hot word for recognition, outputting the combined text result after transcription and performing the above judgment, if accurate, outputting the combined text result; if inaccurate, adding a hot word, repeating the previous step until accurate, and outputting the combined text result; the system comprises: a speech recognition unit, receiving audio and recognizing it, generating a recognition text result after transcription; a text judgment unit, judging whether the recognition text result is accurate; a judgment processing unit, outputting the recognition text result if accurate, and adding a hot word if inaccurate; a hot word adding unit, adding a hot word; the speech recognition unit combines the recognition text result with the hot word for recognition, and outputs the combined text result after transcription. This method proposes an interactive hot word update strategy involving human participation, which is applied to the field of speech recognition. In this process, the collection and update of hot word information needs to rely on human intervention, which means that the system cannot automatically and efficiently complete the real-time update and maintenance of hot word data. In other words, this method does not have the ability to automatically and efficiently update hot words, but requires human intervention when hot words change to ensure the timeliness and accuracy of the hot word library.

[0006] Patent CN112836496A discloses a text error correction method based on BERT and feedforward neural network, which can quickly and accurately identify and correct errors on large-scale corpus. The method first preprocesses the text, then semantically encodes the text with BERT, and then uses the overall semantic information of the text to determine whether the text is correct, and then uses the sequence annotation method to find the specific location of the error in the text for the text judged as wrong, and finally combines the context information of the error and uses the feedforward neural network to generate the corresponding correct text. The text error correction method constructed by the invention has the characteristics of fast reasoning speed and good interpretability. The method uses the BERT model based on the Transformer architecture for training, but this model relies on autoregressive training, and its training cycle is long, which is difficult to adapt to the characteristics of fast update and strong timeliness of hot words. In addition, when collecting erroneous text sample data, the method mainly relies on a large-scale general corpus, and does not fully consider the language characteristics in different fields or specific situations. Therefore, when dealing with hot word error correction tasks with distinct field characteristics, it may not achieve the desired effect.

[0007] It can be seen that the current text error correction methods have several limitations. First, text error correction models are often designed to operate independently of speech recognition systems and lack a coordinated adaptation mechanism with specific speech recognition technologies, which means that they fail to effectively deal with the types of errors generated by different recognition systems and lack portability across devices or platforms. Secondly, the current error correction model training data mainly relies on large-scale and general language materials. Although this ensures the performance of the model in general scenarios, its domain adaptability is insufficient when dealing with professional fields or texts with specific contextual characteristics. Finally, due to the frequent updates and high timeliness of hot words, most existing models find it difficult to quickly and efficiently optimize and keep up with the changing pace of hot words to achieve effective error correction of newly emerging hot words. Summary of the invention

[0008] In order to solve the above problems, the present invention proposes an efficient and adaptive hot word error correction method and system for speech recognition engines. The method uses speech synthesis and speech recognition technology to record and analyze the historical errors of hot words in speech transcription text, and systematically learns and stores these error information; a deep learning method based on the BERT framework is used to train a hot word error correction model suitable for a specific speech recognition engine. The model is committed to learning the error instances generated by the speech recognition engine so as to have the ability to accurately correct the error recognition results in practical applications; in the actual hot word error correction process, for those texts that are still incorrect after error correction, the system will automatically feed them back to the error data annotation stage to further collect and improve the error case library. These rich error information is then used to continuously optimize and adjust the hot word error correction model. The present invention uses deep learning technology to adapt to specific speech recognition engines and effectively identify and correct hot word errors generated in the speech-to-text process.

[0009] On the one hand, the present invention provides an efficient and adaptive hot word error correction system for speech recognition engines, the system comprising a data collection and classification module, an adaptive data amplification module, a hot word error correction training module and a hot word error correction reasoning module, the data collection and classification module performs large-scale data collection on misrecognition situations occurring in actual applications, and classifies the collected data, the adaptive data amplification module systematically collects and increases hot word-related error instances for a specific speech recognition engine, and constructs a training data set for hot word error correction model training; the hot word error correction training module uses a deep learning algorithm to construct an error correction model for hot word errors of the speech recognition engine; the hot word error correction reasoning module is used to detect and correct errors in text information output by the speech recognition engine, and when errors still exist in the corrected text, it is automatically pushed to an error data annotation unit to deeply collect and analyze the error information, and when there are no errors in the corrected text, the corrected text information is output.

[0010] Furthermore, the data collection and classification module divides the data into hot data, warm data and cold data, and gradually adjusts the original hot data to warm data according to the preset time nodes, and the warm data is further transformed into cold data, forming a dynamic data update process. At the same time, in order to optimize the results of speech recognition output, the language model used in the speech recognition engine is first optimized, and a fine-tuning strategy is adopted for cold data and warm data. Through the pre-trained language model, the warm data and cold data are gradually integrated into the model training process.

[0011] Furthermore, the adaptive data augmentation module includes a text preprocessing unit, a speech synthesis unit, a speech recognition engine, a text memory unit, an error data marking unit and a training data generation unit; the text preprocessing unit performs preliminary preprocessing operations on the original input text, including removing duplicate data and performing desensitization processing, and normalizing the text format, and the preprocessed text data is respectively transmitted to the speech synthesis unit and the error data marking unit; the speech synthesis unit converts the preprocessed hot data into corresponding speech data according to the characteristics of the speech recognition engine, and the generated speech data is used as the input data of the speech recognition engine; the speech recognition engine recognizes the speech data and converts it into text form, and analyzes its The error characteristics in the recognition process are used to collect specific cases of hot word errors in a targeted manner; the text memory unit is used to store the erroneous text output generated by the speech recognition engine during the processing process, and these error messages will be promptly passed to the subsequent error data annotation unit; the error data annotation unit compares and analyzes the error information provided by the received text memory unit with the real text data after preprocessing, identifies the location of the error in the text, and provides accurate annotation results; the training data generation unit integrates and constructs a training data set for training the hot word error correction model based on the real text content, the erroneous text output by the speech recognition engine, and the error location information determined by the error data annotation unit.

[0012] Furthermore, the speech synthesis adopts SAM-BERT as the acoustic model, the vocoder adopts the high-fidelity generative adversarial network HIFI-GAN architecture, and integrates speech data of a large number of speakers, multiple dialects and accents in the acoustic model training stage, enriching the expressiveness and realism of the synthesized speech.

[0013] Furthermore, the hot word error correction training module includes a model parameter adjustment unit, a shared coding unit, a position detection unit, a text error correction unit, a fusion loss unit, a training decision unit and an optimal model acquisition unit; the model parameter adjustment unit obtains the training data generated by the training data generation unit and initializes the model parameters. As the training process progresses, the unit dynamically adjusts the model parameters according to the fusion loss function and continuously optimizes the model performance; the shared coding unit uses a deep learning algorithm to conduct an in-depth analysis of the text training data and extract key features, encodes these features into feature vectors, and then transmits the encoded information to the position detection unit and the text error correction unit at the same time; the position detection unit detects the position of the error information and outputs the position information , providing position information for the text correction unit for targeted correction; the text correction unit learns the shared coding information and corrects errors according to the position information of the erroneous words; the fusion loss unit integrates the losses generated by the position detection unit and the text correction unit to form a fusion loss function, and comprehensively analyzes the overall gap between the two and the target label in the training data set; the training decision unit judges the degree of error between the model prediction result and the true label based on the fusion loss function. When the error is greater than the preset threshold, continue training and adjust related parameters. If the error is lower than the threshold, stop training; after the entire training process is completed, the optimal model acquisition unit selects the optimal hot word correction model from the iterative process to correct the errors in the text output generated by the speech recognition engine.

[0014] Furthermore, the position detection unit includes a fully connected layer subunit and a detection loss subunit. The fully connected layer subunit uses the fully connected layer to perform an error location task on the shared encoder information and outputs word position information containing errors. The detection loss subunit calculates the difference between the error position predicted by the current model and the error position in the true label as a loss indicator of the position detection part. The text error correction unit includes a mask subunit, a decoding subunit and an error correction loss subunit. The mask subunit uses the [MASK] mechanism on the shared encoding information to randomly mask the original words, prompting the model to infer the masked words based on the context content. The decoding subunit decodes the feature vector or mask state generated by the encoder back to text form. The error correction loss subunit calculates the difference between the decoded text information and the correct label in the training data, which is used to evaluate the quality of the error correction effect.

[0015] Furthermore, the loss of the position detection unit is calculated by the softmax function as follows: ,in, represents the original score of the i-th position, which reflects the possibility of an error at that position. Indicates the number of categories, which is the sequence length or the number of words in the text, The score representing the number of categories, represents the label of the (c)th category. If there is an error at this position, then =1, otherwise =0; the loss function of the text error correction unit is: P c ( y i =j|X)=softmax(W h i ' +b)[j] ; ,in, Is a character is corrected to the conditional probability of character j in the candidate list, Indicates the hidden state, is the weight parameter, is the deviation parameter, and the final calculation The cross entropy is The fusion loss function of the entire system is the weighted average of the loss values ​​calculated by the error correction module and the error detection module respectively, and the calculation method is: , is a trainable weight parameter.

[0016] Furthermore, the hot word error correction reasoning module includes a pre-recognition processing unit, a hot word error correction unit, a text generation unit, a decision judgment unit and a text output unit; the pre-recognition processing unit standardizes the text output by the received speech recognition engine to ensure that the information format input to the hot word error correction unit is standardized and consistent; the hot word error correction unit uses the trained error correction model to perform detailed correction on the pre-processed text content, and performs targeted correction on hot words and common misrecognition situations in specific scenarios; the text generation unit generates the final text content based on the error correction result; the decision judgment unit makes a decision by comparing and verifying the corrected text content with the real target text. If there is a difference between the two, the original pre-recognition result is passed to the text memory unit for subsequent analysis; if there is no difference, it means that the error correction is successful, and the corrected text is passed to the text output unit; the text output unit publishes or quotes the corrected text content that is finally confirmed to be correct.

[0017] On the other hand, the present invention provides an efficient and adaptive hot word error correction method for a speech recognition engine, the method comprising the following steps:

[0018] Step S1: Data collection and classification: collect text corpus and divide the data into hot data, warm data and cold data. Warm data and cold data are used to train the language model and perform error correction inside the speech recognition engine. Hot data is used to obtain the corresponding synthesized speech through the speech synthesis engine, and then the text information is obtained through the speech recognition engine.

[0019] Step S2: Adaptive data augmentation, receiving original input text information, performing preprocessing operations on the original input text, including removing duplicate data, performing desensitization processing, and normalizing the text format, and then using speech synthesis technology according to the characteristics of the speech recognition engine to convert the preprocessed hot data into corresponding speech information, and then input the synthesized speech information into the speech recognition engine for recognition, obtain the pre-recognized text result, and by comparing the difference between the preprocessed original input text and the pre-recognized text, mark the error position and construct a training data set for hot word error correction model training;

[0020] Step S3: Hot word error correction model training, encode the training data, then perform error position detection and text error correction on the encoded information, and finally judge the model training results through the fusion loss function. If the error is greater than the preset threshold, continue training and adjust relevant parameters. If the error is lower than the threshold, it indicates that the model has reached the expected training level, stop training, and select an optimal error correction model for reasoning;

[0021] Step S4: Hot word error correction reasoning, first send in a test audio, then recognize it through the speech recognition engine to get the pre-recognition result, then normalize the pre-recognition result, and then use the trained hot word error correction model to correct the normalized text content, and compare the corrected text content with the real target text for verification. If there is a difference between the error correction result and the real text, the pre-recognition result will be further collected and made into training data to continue training; if there is no difference, it means that the error correction is successful, and the corrected text is output.

[0022] Furthermore, hot data refers to a collection of words that currently or recently have extremely high usage frequency and immediate influence, warm data refers to words that have a relatively low usage frequency in the short term but still have a certain degree of activity, and cold data refers to a vocabulary base with a continuously low usage frequency under long-term observation.

[0023] The beneficial technical effects of the present invention are as follows:

[0024] (1) In order to ensure that the error correction model can work in real time with the speech recognition engine, the present invention designs an effective collaborative working mechanism. Once the speech recognition engine completes the process of transcribing speech into text, the error correction model immediately takes over and performs refined verification of possible hot word errors. The mechanism also supports personalized configuration according to the characteristics of different speech recognition engines, so that the error correction model can optimize its error correction strategy for the output results of a specific engine in a targeted manner, thereby improving the overall recognition accuracy. At the same time, the solution can flexibly adapt to and effectively cooperate with a variety of different types of speech recognition systems;

[0025] (2) Through adaptive data augmentation technology, we systematically collect and increase the number of error instances related to hot words, which enhances the diversity of error examples in the dataset and the effectiveness of the samples, thereby improving the accuracy and robustness of the model in identifying and correcting hot word problems;

[0026] (3) Through the efficient hot word correction model training method, the problem of non-automation and slow training speed of traditional model training process is solved;

[0027] (4) During the training phase, the MacBERT model uses a fusion loss function that combines the loss of the error detection task with the loss of the error correction task to form a fusion loss function to guide the entire model to continuously optimize and adjust during the cyclic training process, thereby improving the overall performance and accuracy of the model in hot word error correction;

[0028] (5) During the error correction stage, if it is found that the corrected text is still different from the real text, the system will store the text information that may contain incorrect hot words generated in the pre-recognition stage into the text memory unit, thereby continuously accumulating hot word error cases of real users. At the same time, the system will continue to collect and learn these error samples, and fine-tune the parameters of the hot word correction model. The fine-tuned correction model further improves the accuracy of hot word correction. The whole process forms a cyclic iterative mechanism, which continuously performs collaborative adaptive optimization of the speech recognition engine and the hot word correction model, so as to continuously improve the speech recognition and error correction capabilities in various complex and real scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present invention 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, 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 paying creative work.

[0030] Figure 1 It is a structural block diagram of a highly efficient and adaptive hot word error correction system for a speech recognition engine provided by an embodiment of the present invention;

[0031] Figure 2 is a schematic diagram of the speech recognition engine collaboration mechanism provided by an embodiment of the present invention;

[0032] Figure 3 An acoustic model structure based on BERT is provided in an embodiment of the present invention;

[0033] Figure 4 is a network structure diagram of HIFI-GAN (High Fidelity Generative Adversarial Network) provided by an embodiment of the present invention;

[0034] Figure 5 It is a structure diagram of a Paraformer model of an acoustic model provided by an embodiment of the present invention;

[0035] Figure 6 is a schematic diagram of a Contextual Information Fusion (CIF) mechanism provided by an embodiment of the present invention;

[0036] Figure 7 It is a structural diagram of an improved MacBERT model for hot word error correction model training provided by an embodiment of the present invention;

[0037] Figure 8 is a structural diagram of a Transformer model provided by an embodiment of the present invention;

[0038] Fig. 9 It is a simplified diagram of the internal structure of the encoder Encoder in the Transformer model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0040] On the one hand, the present invention provides an efficient and adaptive hot word correction system for speech recognition engines. The overall structure diagram of the system is as follows: Figure 1 As shown, the system includes a data collection and classification module, an adaptive data amplification module, a hot word error correction training module and a hot word error correction reasoning module, which are as follows:

[0041] The data collection and classification module collects large-scale data on misrecognition situations that occur in actual applications, including text data output by the speech recognition engine in various scenarios, and focuses on error cases that contain hot words (such as emerging words, industry terms or buzzwords), and divides the data into hot data, warm data and cold data; hot data refers to a collection of words that are currently or recently used with extremely high frequency and immediate influence. Such words often emerge and spread rapidly with social hot events, emerging trends, etc.; warm data refers to words that are used relatively less frequently in the short term but still have a certain degree of activity; cold data refers to words that are used less frequently in the short term but still have a certain degree of activity. Hot data refers to a vocabulary library with a low frequency of use under long-term observation. Such words may still need to be understood and processed by the model in some cases due to domain specificity, cultural differences or historical legacy, so as to ensure that the speech recognition engine can maintain a certain error correction capability even when facing uncommon expressions. By implementing a time-sensitive cooling mechanism, the original hot data is gradually adjusted to warm data according to preset time nodes (such as real-time or periodic), and the warm data is further transformed into cold data, forming a dynamic data update process, that is, an orderly progression from hot data to warm data and then to cold data. At the same time, in order to optimize the output results of speech recognition, the language model used in the speech recognition engine is first optimized, and a fine-tuning strategy is adopted for cold data and warm data. Through pre-trained language models, such as ngram, transformer, etc., warm data and cold data are gradually integrated into the model training process, so that the model can gradually learn and master more diverse expressions and special words while retaining the original basic knowledge.

[0042] The adaptive data augmentation module systematically collects and increases the error instances related to hot words for a specific speech recognition engine to enhance the diversity of error samples in the hot data set. In the pre-training stage, the module receives plain text input information and converts the text into corresponding speech information based on the characteristics of the speech recognition engine using advanced speech synthesis technology. Then, the synthesized speech information is input into the speech recognition engine for recognition, and the pre-recognized text results are obtained. By comparing the differences between the original input text and the pre-recognized text, a data set for hot word error correction model training is constructed. In the process of actual application and iterative update of the model, the module further automatically collects the error recognition cases generated during user use, so as to continuously enrich and correct the hot word error correction model, continuously optimize its performance, and ensure that the model can process various real speech more accurately and efficiently. The module includes the following six units:

[0043] Text preprocessing unit: This unit performs a series of preliminary preprocessing operations on the original input text, including removing duplicate data, desensitizing to protect privacy information, and normalizing the text format. The preprocessed text data will be sent to the speech synthesis unit and the error data labeling unit respectively.

[0044] Speech synthesis unit: This unit converts the preprocessed thermal data into corresponding speech data according to the characteristics of the speech recognition engine, and the generated speech data serves as the input data of the speech recognition engine.

[0045] Speech recognition engine: This unit can recognize speech data and convert it into text form. By analyzing the error characteristics in the recognition process, specific cases where hot word errors occur can be collected in a targeted manner.

[0046] Text memory unit: This unit is a dedicated storage unit used to record the erroneous text output generated by the speech recognition engine during the processing process. These error messages will be promptly passed to the subsequent error data annotation unit.

[0047] Error data labeling unit: This unit compares and analyzes the error information provided by the received text memory unit with the real text data after preprocessing, clearly identifies the location of the error in the text, and thus provides accurate labeling results.

[0048] Training data generation unit: This unit integrates and constructs a high-quality data set for hot word error correction model training based on real text content, the text with errors output by the speech recognition engine, and the error location information determined by the error data annotation unit, so as to facilitate model learning and improve its ability to correct hot word errors in specific fields.

[0049] The hot word error correction training module uses a deep learning algorithm to build a correction model specifically for hot word errors in the speech recognition engine. The model first encodes the training data, then detects and marks the locations where errors occur, modifies the text at the detected error locations, and finally decides whether to continue training. The module consists of seven core units and five sub-units, and each unit works together to complete the entire training process, as follows:

[0050] Model parameter adjustment unit: This unit first obtains the training data generated by the training data generation unit and initializes the model parameters. As the training process progresses, the unit dynamically adjusts the model parameters according to the fusion loss function to continuously optimize the model performance.

[0051] Shared encoding unit: This unit uses deep learning algorithms to conduct in-depth analysis of text training data and extract key features, converting these features into a more efficient and compact representation, namely feature vectors. Subsequently, the encoded information is simultaneously transmitted to the position detection unit and the text error correction unit.

[0052] Position detection unit: This unit mainly detects the position of the error information, outputs the position information, and provides the position information for the text error correction unit for targeted error correction. The unit includes a fully connected layer subunit and a detection loss subunit. The fully connected layer subunit uses the fully connected layer to perform the error location task on the shared encoder information and outputs the word position information containing the error; the detection loss subunit calculates the difference between the error position predicted by the current model and the error position in the actual label as the loss indicator of the position detection part.

[0053] Text error correction unit: This unit learns the shared coding information and corrects errors based on the position information of the erroneous words. The unit includes a masking subunit, a decoding subunit, and an error correction loss subunit. The masking subunit uses the [MASK] mechanism on the shared coding information to randomly mask the original words, prompting the model to infer the masked words based on the contextual content, thereby enhancing the model's ability to understand and reason about the context; the decoding subunit decodes the feature vector or mask state generated by the encoder of the shared coding unit back to text form; the error correction loss subunit calculates the difference between the decoded text information and the correct label in the training data, which is used to evaluate the quality of the error correction effect.

[0054] Fusion loss unit: This unit integrates the losses generated by the position detection unit and the text error correction unit to form a fusion loss function, which comprehensively analyzes the overall gap between the two and the target labels in the training dataset.

[0055] Training decision unit: This unit determines the degree of error between the model prediction result and the true label based on the fusion loss function, and decides whether to continue model training. When the error is greater than the preset threshold, continue training and adjust related parameters; if the error is lower than the threshold, it indicates that the model has reached the expected training level and stops training.

[0056] Optimal model acquisition unit: After the entire training process is completed, this unit selects the optimal hot word error correction model from the iterative process to correct errors in the text output generated by the speech recognition engine.

[0057] The hot word error correction reasoning module detects and corrects errors in the text information output by the speech recognition engine. If there are still errors in the corrected text, it will be automatically pushed to the error data annotation unit to further collect and analyze these error information. This module includes five functional units that work together, as follows:

[0058] Pre-recognition processing unit: This unit first standardizes the text output by the received speech recognition engine to ensure that the information format input to the hot word correction unit is standardized and consistent.

[0059] Hot word correction unit: This unit uses a trained correction model to perform detailed corrections on preprocessed text content, and conducts targeted corrections on hot words and common misrecognition situations in specific scenarios.

[0060] Text generation unit: This unit generates the final text content based on the error correction results.

[0061] Decision-making unit: This unit makes a decision by comparing the corrected text content with the real target text. If there is a difference between the two, the original pre-recognition result is passed to the text memory unit for subsequent analysis; if there is no difference, it means that the correction is successful, and the corrected text is passed to the text output unit.

[0062] Text output unit: This unit will publish or quote the final confirmed error-corrected text content to ensure that users receive accurate information.

[0063] The hot word error correction system proposed in this invention has powerful error learning and memory capabilities, and can flexibly adapt to and effectively cooperate with various types of speech recognition systems, such as ASR n , where ASR n Represents any specific Automatic Speech Recognition System, which can be any commercial or self-developed speech-to-text technology, such as Figure 2 shown.

[0064] When the error correction model works with the first speech recognition system ASR1, the whole process starts with an in-depth analysis of the large amount of speech-to-text data that ASR1 has processed. By adopting advanced data analysis algorithms such as machine learning, and advanced pattern mining techniques such as cluster analysis and association rule mining, the error correction model can deeply and meticulously analyze the typical error patterns and rules generated by ASR1 in actual applications, and efficiently learn and memorize these error information.

[0065] Based on a deep understanding of the error characteristics of ASR1, the error correction device further constructed a hot word (frequently misrecognized vocabulary) error correction model specifically optimized for the characteristics of ASR1. This model conducts targeted training on error patterns in the ASR1 output text, and can make corrections quickly and accurately when similar errors are identified, thereby significantly improving the overall recognition accuracy of the ASR1 system.

[0066] When it is necessary to apply this error correction device to other different speech recognition systems, such as ASR n We followed and extended the same approach and process. First, we collected extensive ASR data of the target system. n Various error instances that occur in the speech-to-text process ensure that the sample coverage is comprehensive and representative; then, the same error learning and memory mechanism is used to n In-depth research and study of unique error characteristics in order to more accurately locate and understand potential error sources and trends.

[0067] On this basis, customized construction is suitable for ASR n The unique hot word error correction model can not only capture and correct ASR n The common problem of hot word misrecognition in the system can also gradually improve the understanding and response capabilities of new error types with continuous data accumulation and iterative optimization. Ultimately, this flexible and intelligent error correction strategy enables the device to seamlessly connect various speech recognition systems, realize efficient cross-system hot word error correction functions, and effectively promote the accuracy and reliability of speech recognition technology in actual application scenarios.

[0068] At the same time, the feedback loop is optimized and a closed-loop feedback mechanism is implemented throughout the entire speech recognition hot word correction process. Each correction action will generate corresponding feedback information, including the original speech, recognition results, text after correction, and detailed error labels. These feedback data will be stored and used as supervised learning materials for the new round of model training. Through repeated iterations and optimization, the error correction model can learn lessons from past error correction experiences and continuously improve its own error correction efficiency, ultimately forming an efficient and intelligent error correction system that can both solve existing problems and prevent potential future misrecognitions.

[0069] On the other hand, the present invention also provides a highly efficient and adaptive hot word error correction method for a speech recognition engine, the method comprising the following steps:

[0070] Step S1: Data collection and classification: collect text corpus and divide the data into hot data, warm data and cold data. Warm data and cold data are used to train the language model and perform error correction inside the speech recognition engine. Hot data is used to obtain the corresponding synthesized speech through the speech synthesis engine, and then the text information is obtained through the speech recognition engine.

[0071] Step S2: Adaptive data augmentation, receiving original input text information, performing preprocessing operations on the original input text, including removing duplicate data, performing desensitization processing, and normalizing the text format, and then using speech synthesis technology according to the characteristics of the speech recognition engine to convert the preprocessed hot data into corresponding speech information, and then input the synthesized speech information into the speech recognition engine for recognition, obtain the pre-recognized text result, and by comparing the difference between the preprocessed original input text and the pre-recognized text, mark the error position and construct a training data set for hot word error correction model training;

[0072] Step S3: Hot word error correction model training, encode the training data, then perform error position detection and text error correction on the encoded information, and finally judge the model training results through the fusion loss function. If the error is greater than the preset threshold, continue training and adjust relevant parameters. If the error is lower than the threshold, it indicates that the model has reached the expected training level, stop training, and select an optimal error correction model for reasoning;

[0073] Step S4: Hot word error correction reasoning, first send in a test audio, then recognize it through the speech recognition engine to get the pre-recognition result, then normalize the pre-recognition result, and then use the trained hot word error correction model to correct the normalized text content, and compare the corrected text content with the real target text for verification. If there is a difference between the error correction result and the real text, the pre-recognition result will be further collected and made into training data to continue training; if there is no difference, it means that the error correction is successful, and the corrected text is output.

[0074] Furthermore, hot data refers to a collection of words that currently or recently have extremely high usage frequency and immediate influence, warm data refers to words that have a relatively low usage frequency in the short term but still have a certain degree of activity, and cold data refers to a vocabulary base with a continuously low usage frequency under long-term observation.

[0075] The specific working principle of the solution of the present invention is described in detail below.

[0076] Data collection

[0077] In the early stage of speech recognition hot word correction, the first task is to collect large-scale data on misrecognition situations that occur in actual applications. This process covers the text data output by the speech recognition engine in various scenarios, and focuses on error cases that contain hot words (such as emerging words, industry terms or buzzwords). Through in-depth mining and detailed analysis of these examples, we can understand the common problems and patterns of speech recognition engines when processing specific hot words, such as confusion caused by similar pronunciations, and new words that have not been updated to the vocabulary library. In addition, by establishing a detailed data annotation system, the location of misrecognized hot words, correct forms and other information are clearly marked to provide high-quality learning samples for subsequent model training. When dealing with natural language processing tasks, especially for the identification and correction of hot words with extremely strong timeliness, we can effectively classify the large-scale data collected according to their activity and frequency of use, so as to facilitate targeted training and optimization of models. This data classification method usually divides data into three levels: hot data, warm data and cold data.

[0078] Hot data refers to a collection of words that are currently or recently used with extremely high frequency and immediate influence. Such words often emerge and spread rapidly with social hot events, emerging trends, etc. They are crucial for real-time speech recognition and error correction systems, requiring models to be able to quickly capture and adapt to these dynamically changing language features.

[0079] Warm data refers to words that are used less frequently in the short term but still have a certain degree of activity. Although they are less popular than hot data, they may still appear in daily conversations or specific situations. Therefore, incorporating them into the scope of model training and updating will help improve the comprehensiveness and stability of the system.

[0080] Cold data refers to a vocabulary base with a continuously low usage frequency under long-term observation. Such vocabulary may still need to be understood and processed by the model in some cases due to domain specificity, cultural differences or historical legacy, to ensure that the speech recognition engine can maintain a certain error correction capability even when faced with uncommon expressions.

[0081] By implementing a time-sensitive cooling mechanism, the original hot data is gradually adjusted to warm data according to preset time nodes (such as real-time or periodic), and the warm data is further transformed into cold data, forming a dynamic data update process, that is, an orderly progression from hot data to warm data and then to cold data. The purpose of this is to ensure that the error correction model can focus on processing hot word information with strong timeliness and great influence, while taking into account warm and cold data to improve the comprehensiveness and long-term adaptability of the model, thereby effectively improving the accuracy and efficiency of hot word recognition and error correction.

[0082] At the same time, in order to optimize the results of speech recognition output, the language model used in the speech recognition engine is first optimized, and a fine-tuning strategy is adopted for cold data and warm data. Through pre-trained language models, such as ngram, transformer, etc., warm data and cold data are gradually integrated into the model training process, so that the model can gradually learn and master more diverse expressions and special words while retaining the original basic knowledge. Fine-tuning not only helps to avoid the phenomenon of model forgetting and error correction caused by the addition of new vocabulary, but also can reduce the huge computing resource investment required for training from scratch to a certain extent, and realize efficient and accurate language model update iteration. In addition, technical means such as transfer learning and incremental training can be used to balance the learning weights of new and old vocabulary, and further improve the performance of the model under different types of data.

[0083] Based on the large number of error instances collected, an error correction model is built using advanced machine learning techniques (such as deep neural networks, sequence models, etc.). The model first performs deep learning on each piece of error data to understand and capture the typical error patterns generated by the speech recognition engine when facing different hot words. For example, the model may learn to recognize that when a syllable is ignored or replaced, it may be because the syllable is part of a specific hot word. Through this model of learning, the model can gradually improve its ability to understand complex and changeable hot word misrecognition phenomena, and make more accurate judgments and corrections when encountering similar situations in the future.

[0084] Adaptive Data Augmentation

[0085] Adaptive data augmentation cleverly combines speech synthesis and speech recognition technology to dynamically process and enrich text data in an adaptive manner. Its core purpose is to generate a high-quality initial data set for the training of the hot word error correction model. First, the target text is converted into speech by means of speech synthesis, and then the speech is translated back into text through a specific speech recognition engine, and controllable noise and errors are introduced in the process to simulate various misrecognition situations that may occur in the real environment, so as to create a series of effective samples for training the error correction model in a targeted manner. Through this process, the error correction system can continuously expand and optimize the training corpus required for the error correction model according to actual needs, thereby improving the accuracy and robustness of the model in identifying and correcting hot word problems, so that it can show higher adaptability in various complex scenarios. In order to construct a high-quality training data set for the hot word error correction model, the adaptive data augmentation adopted by the present invention includes four key stages: text preprocessing, speech synthesis conversion, speech recognition transcription, and error data annotation, as follows:

[0086] Text preprocessing

[0087] Text preprocessing is the process of preprocessing the original input text data. This step is crucial to improving the performance of the overall system and ensuring data security and privacy protection.

[0088] When the text data enters the preprocessing, the content is first deeply cleaned to remove redundant and repeated data elements. By adopting efficient deduplication algorithms, such as hash tables, Bloom filters or similarity comparison methods, it is possible to identify and delete duplicate text records that do not affect the model training effect, thereby avoiding the reduction in learning efficiency and potential bias problems caused by sample duplication.

[0089] Secondly, data desensitizing technology is used to protect privacy, including but not limited to replacing sensitive words (such as names, addresses, telephone numbers, etc.) with fictitious or generalized identifiers, and using differential privacy, homomorphic encryption or other obfuscation technologies to effectively mask personal identity information. This not only ensures that the user's personal information will not be leaked during subsequent data analysis and model training, but also maintains the original statistical characteristics of the data to a certain extent.

[0090] The text format is then normalized, including character encoding conversion, unified punctuation usage standards, standardized capitalization, removal of irrelevant character noise (such as special symbols, redundant spaces), and precise word segmentation and word form restoration according to linguistic rules. These steps help convert unstructured text into a form that is easy for machine learning models to understand and process, thereby improving the model's ability to understand semantics.

[0091] After the above preprocessing steps, the obtained high-quality text data will be sent to different downstream modules as needed. The speech synthesis unit uses these preprocessed clean texts as input sources, and converts them into rich and diverse speech content with the help of natural language processing technology and speech synthesis algorithms, thereby enhancing the adaptability and expressiveness of the model in different regional dialect environments.

[0092] At the same time, error data annotation is carried out based on the preprocessed text. By injecting various intentional error types (such as spelling errors, grammatical errors, inappropriate wording, etc.) into the correct text, various error modes in real user scenarios are simulated in order to build a training set that comprehensively covers multiple error situations. Such a training set can significantly improve the accuracy and correction efficiency of hot word correction models and other related models in practical applications.

[0093] Speech Synthesis

[0094] The text preprocessing process is closely integrated with speech synthesis technology. According to the language information supported by the speech recognition engine, a high-performance speech synthesis engine of the corresponding language is selected. Its main task is to accurately convert the pre-processed clean text into speech output that simulates the real user's voice. In order to restore the authenticity and naturalness of the user's voice to the greatest extent, the selected speech synthesis tool must not only have excellent performance and fast response capabilities, but also adopt advanced acoustic models and vocoder architecture.

[0095] The acoustic model architecture adopted in the present invention is SAM-BERT, which is a BERT model integrated with the self-attention mechanism. It can effectively capture the contextual dependencies in the text and map them into high-quality acoustic feature representations to ensure the semantic coherence and emotional expressiveness of the synthesized speech.

[0096] At the same time, the vocoder uses the HIFI-GAN (High Fidelity Generative Adversarial Network) architecture, which can highly simulate the complex audio features produced by the human vocal organs, thereby achieving realistic reproduction of the original human voice. The vocoder contains a core mechanism based on causal convolution, which allows low-latency streaming generation mode. Whether it is frame-by-frame (low-latency streaming generation) or block processing (chunk streaming generation), it can achieve real-time and continuous voice stream output, greatly improving the real-time response experience and fluency of the voice interaction system, and ultimately making it possible to obtain an effect as close to real-life conversation as possible when the synthesized voice is input to the voice recognition engine for pre-recognition.

[0097] Figure 3 The paper shows a BERT-based acoustic model named SAM-BERT for text-to-speech conversion. This model consists of multiple components, including PNCA AR-Decoder (pseudo non-causal autoregressive encoder), Variance Adaptor, BERT Encoder, Phn Embedding, AR-Duration Pred, Energy Pred, and Pitch Pred.

[0098] BERT Encoder is a pre-trained Transformer model that takes in text input and generates a vector representation that represents the context of the text. BERT Encoder uses Positional Encoding to capture the relative order information of different positions in the text.

[0099] The input to the BERT Encoder is the output of the Phn Embedding layer, which converts the text representation into embedding vectors, which are then passed to the Variance Adaptor, a component responsible for adjusting the phoneme-level energy and pitch predictions to adapt to different speech conditions.

[0100] PNCA AR-Decoder receives the output from Variance Adaptor and encodes it using PositionalEncoding. The goal of PNCA AR-Decoder is to predict the duration, energy, and pitch of the synthesized speech.

[0101] The three sub-modules of Pitch Pred, Energy Pred and AR-Duration Pred together constitute the core part of VarianceAdaptor. Pitch Pred predicts the pitch of the phoneme, which is a key factor in determining the tone of speech; EnergyPred predicts the energy of the phoneme, which determines the loudness of the synthesized speech; AR-Duration Pred is responsible for predicting the duration of the phoneme, which is a key parameter of the synthesized speech stream. Finally, these predicted values ​​are combined to generate the waveform of the synthesized speech. The synthesized waveform can be further processed, such as filtering and normalization, to improve its naturalness and quality.

[0102] Figure 4 The network structure of the vocoder HIFI-GAN (High-Fidelity Generative Adversarial Network) is shown in the figure. This is a vocoder model for speech synthesis. HIFI-GAN consists of two parts: Discriminator and Generator.

[0103] The discriminator consists of two sub-networks, MSD (Multi-scale Discriminator) and MPD (Multi-Period Discriminator). MSD is used to process features of different scales, and MPD focuses on local details of speech signals. These two sub-networks are connected through an Or gate and together constitute the input of the discriminator. The main task of the discriminator is to distinguish the difference between the generated waveform and the real recording.

[0104] The generator includes Conv-Pre (feedforward convolution), Up-Net (upsampling network) and MRF (Markov RandomField). Conv-Pre is used to extract preliminary features of the input, Up-Net is responsible for upsampling the low-resolution feature map to a high-resolution output, and MRF is used to capture the long-range dependencies of the speech signal. The input of the generator is a Mel-spectrogram and the output is speech.

[0105] HIFI-GAN uses adversarial training to enable the generator to generate increasingly realistic speech waveforms, while the discriminator is responsible for distinguishing the generated waveforms from real recordings. This adversarial training method can effectively improve the quality and naturalness of the generated speech, making HIFI-GAN a high-quality speech synthesis tool.

[0106] By utilizing the above-mentioned acoustic model and vocoder, and carefully fine-tuning it for the diverse speaker characteristics, this synthesis engine can accurately simulate the speech characteristics of different genders (such as boys and girls) and regions, in order to achieve highly natural and diverse speech generation effects.

[0107] During the design and training phase of the acoustic model, we integrated speech data from a large number of speakers with various dialects and accents. We used deep learning algorithms to capture and model the unique acoustic characteristics of various speakers, including but not limited to pitch, rhythm, pronunciation habits, etc. This allows the constructed acoustic model to not only flexibly portray the gender-differentiated voices of men, such as the deep and powerful voices of men, and the soft and delicate voices of women, but also to accurately reproduce timbre information with local characteristics, such as the boldness of the north, the elegance of the south, and the simplicity of the west, thereby greatly enriching the expressiveness and realism of the synthesized speech.

[0108] In order to make the generated voice content better match and optimize the working efficiency of the voice recognition engine, the characteristic requirements of the target voice recognition engine are fully considered when configuring and applying the voice synthesis engine. According to the sensitivity and recognition advantages of the specific recognition engine to different speaker attributes, the parameter configuration of the synthesis engine is selected and adjusted in a targeted manner, striving to simulate the sound output that is closest to the real user's voice characteristics, thereby effectively reducing the recognition errors caused by differences in voice characteristics and improving the overall voice recognition accuracy.

[0109] Speech Recognition

[0110] When adaptively augmenting data, we select appropriate speech recognition engines to ensure high-accuracy recognition for different dialect application scenarios, such as Sichuanese, Shanghainese, and Northeastern dialect. Specifically, when processing various dialect voices generated by speech synthesis technology, the goal is to effectively convert them into pre-recognized text content.

[0111] To achieve this goal, the Paraformer structure is used as the core speech recognition technology framework. This structure can optimize recognition based on the characteristics of different dialects, so as to accurately recognize the speech after it is synthesized and output, and convert the recognition results into text form that is easy to further process and analyze. This helps to achieve efficient and accurate data amplification in diverse dialect scenarios, thereby improving the overall recognition performance and adaptability of the system.

[0112] The Paraformer model is a non-autoregressive acoustic model structure that has shown excellent capabilities in dealing with long-term dependencies and sequence modeling, such as Figure 5 As shown in the figure, the model consists of five core components: Encoder, Predictor, Sampler, Decoder and Loss Function.

[0113] The Encoder is a key part of the model input, responsible for converting the original acoustic features (such as Mel-frequency cepstral coefficients MFCCs or filter bank spectral features FBANKs) into high-level context-related embedding representations. The Encoder is designed using a variety of advanced network architectures, such as the self-attention mechanism, which allows the model to interact with the entire sequence globally during the calculation process; or the Conformer structure, which combines the Transformer's self-attention with the local receptive field advantages of the convolutional neural network; and other variants such as SAN-M, which are designed to capture the complex spatiotemporal dependencies in audio signals.

[0114] The Predictor module is a two-layer feed-forward neural network (FNN). Its function is to predict the length of the target text and extract the acoustic feature vector corresponding to each target word from the vector space generated by the encoder. This helps the model understand the general structure of the sequence to be generated in advance, thereby improving decoding efficiency and accuracy.

[0115] The Predictor module consists of two layers of deep neural networks (DNNs) to accurately predict the number of target text characters that the Decoder needs to generate and extract relevant acoustic feature vectors. Specifically, the output generated by the Predictor network is a series of continuous floating-point values ​​between 0 and 1, which are accumulated to indirectly estimate the total number of characters in the target string.

[0116] In addition, the Predictor module also uses a mechanism called Contextual Information Fusion (CIF), which can extract acoustic feature vectors closely related to the target text from the high-dimensional vector space obtained by the Encoder, such as Figure 6 As shown in the figure, the CIF process shows in detail how to effectively fuse context information and extract key features in the form of intuitive examples, where a represents the model weight, H represents the hidden layer of the neural network, and Ea represents the feature value, that is, the output obtained by the weight value a through the hidden layer H;

[0117] During the training phase, in order to ensure that the Predictor module accurately masters this prediction skill, Mean Absolute Error (MAE) is used as the loss function of supervised learning to measure the gap between the target number of characters predicted by the Predictor and the actual value, and optimize its performance through the backpropagation algorithm. Through such design and training strategies, Paraformer's Predictor can more intelligently guide the Decoder to generate high-quality text output during the speech recognition process.

[0118] Sampler is a component without learning parameters. It generates intermediate feature vectors containing semantic information based on the acoustic vector provided by Encoder and the target vector information generated by Predictor through a certain strategy (such as weighted average, interpolation, etc.). These features will be used to guide the decoding process of Decoder in subsequent steps. Paraformer draws on the research results in the field of machine translation, especially the working principle of Glancing Language Model (GLM), and introduces the Sampler module to enhance the Decoder's ability to model the internal dependencies of the target text.

[0119] The Sampler module assists the model to better understand and utilize contextual information during the training phase without interfering with the model's reasoning efficiency, thereby improving the performance of the non-autoregressive model in processing complex semantics and lexical associations. Although this module does not play a role in the actual decoding process, it has a positive effect on improving the recognition accuracy of the model and reducing substitution errors. The core processing of the Sampler module is shown in formulas (1) and (2):

[0120] (1)

[0121] in, represents the loss function of GLM, is the nth element in the target sequence, is a function that receives the input sequence and , and additional input (context information), and then returns a probability distribution based on the parameters , are the parameters of the GLM model.

[0122] (2)

[0123] Equation 2 defines the GLM function, which depends on three inputs: Represents the acoustic characteristics of the Encoder; Represents the self-attention feature of the Encoder; Represents the convolution feature of the Encoder, and a parameter and a function ,function calculate and The distance between The Sampler module uses these inputs and parameters to generate a probability distribution that reflects and The possibility of dependencies between them.

[0124] As the core decoding unit of the model, the Decoder adopts a bidirectional modeling method that is different from the traditional autoregressive model. This means that when generating each output unit, the Decoder can simultaneously consider the context information before the current moment and the possible output content in the future, significantly improving the model's ability to understand long-distance dependencies and context.

[0125] In terms of Loss Function design, Paraformer not only uses the classic cross-entropy loss function to optimize the model's probability distribution estimation of the correct label, but also introduces the Minimum Word Error Rate (MWER) optimization objective to reduce the word error rate in practical applications. In addition, the objective function of the Predictor module also includes the Mean Absolute Error (MAE) to measure the gap between its predicted target vector and the actual acoustic features, ensuring that the Predictor can continuously optimize its prediction performance throughout the model training process. By integrating multiple innovative components, the Paraformer model successfully achieves efficient modeling and accurate decoding of speech recognition tasks, effectively solving a series of challenging problems such as long-term dependencies and polyphone recognition, thereby improving the overall performance and user experience of the speech recognition system.

[0126] Error data labeling

[0127] Error data annotation is to build a high-quality and targeted training data set specifically for improving the performance and accuracy of the hot word error correction model. Specifically, it makes full use of the pre-recognition text results generated by a specific speech recognition engine. These results often contain potential typos or misrecognized words caused by recognition errors.

[0128] First, we connect to the speech recognition engine API to obtain a large number of original speech transcribed texts in actual application scenarios as the basic data source for the pre-recognition results. On this basis, we carefully compare each sentence of pre-recognition text with its corresponding real label (that is, the correct text after manual proofreading), and use the sequence labeling method in deep learning to find the specific locations of typos and replacement errors.

[0129] Furthermore, the sequence labeling algorithm in natural language processing (such as conditional random field CRF, Bi-LSTM+CRF, etc.) will be used for automatic labeling, and the position of the wrong word and the corresponding correct word information will be marked on the pre-recognized text in the form of specific labels to form rich labeled training samples.

[0130] In addition, to improve the quality and comprehensiveness of the training dataset, special processing is performed on frequently appearing and easily confused hot words to ensure that the model can fully learn the correct usage and common misuse patterns in different contexts during the training process, so that it can more accurately identify and correct hot word errors in actual applications.

[0131] When building a high-precision hot word error correction model, we use supervised learning to perform deep training using annotated corpora. ,in Represents the i-th word, which is first converted into a continuous encoding sequence through an efficient encoding mechanism , during the encoding process, and They represent the start and end marks of the text, respectively, to ensure that the model can recognize text boundaries.

[0132] Error location labels are a key element in the error correction process. They are used to pinpoint the exact area in the original text where the error occurred. For example, if the error range is in arrive , the corresponding position label is expressed as , which helps the model focus on the errors and make corrections.

[0133] For example, when the original speech content is "Natural language processing refers to the processing of linguistic problems through computers", but a speech recognition system mistakenly recognizes it as "Natural language processing actually processes linguistic problems through computers", the content contains a text of seven words, represented as , and then convert these texts into coded form , according to the actual comparison, the error label here is , which means that the second word "substance" is wrong and should be corrected to "refers to". Finally, the json format is used as the training set. The specific format content is as follows:

[0134] {

[0135] "recognition_text": "Natural language processing is essentially processing linguistic problems through computers",

[0136] "wrong_ids":[6,7],

[0137] "real_text": "Natural language processing is the use of computers to process linguistic problems"

[0138] }

[0139] Among them, recognition_text represents the pre-recognition text information output by the speech recognition engine; wrong_id represents the location information of the wrong word; and real_text represents the real text information.

[0140] Hot word correction model training

[0141] The hot word correction model training adopts the MacBERT structure, which is a series of improvements and optimizations based on the BERT model to adapt to specific Chinese error correction scenarios. The structure is as follows Figure 7 As shown in the figure, the MacBERT model constructs a complex architecture that integrates multi-task processing, which consists of three key parts: a shared encoding layer, an error detection module, and an error correction module.

[0142] First, the MacBERT model uses a shared encoder designed based on the BERT infrastructure to perform deep semantic understanding and representation extraction on the input training data. In the specific operation process, the shared encoder receives the training data, as shown in the figure, the training data are x1, x2, x3, and x4, and efficiently encodes them through a multi-layer self-attention mechanism and a feedforward neural network to generate vector representations containing rich contextual information and semantic features. The vector representations are e1, e2, e3, and e4. These encoded information extracted through deep learning are then sent to two dedicated task processing units, the error detection module and the error correction module, respectively, to train error detection and error correction in parallel, thereby improving the model training speed;

[0143] The shared encoding layer uses BERT as a shared encoder to encode the training data. BERT is composed of multiple layers of transformer encoders. Each layer of encoder contains a self-attention mechanism, which allows each word to consider all other words in the sentence when generating its representation, thereby achieving true two-way context understanding. Like the Attention model, the Transformer model also uses an encoder-decoder architecture, such as Figure 8 As shown, the internal simplified structure of each encoder encoder is as follows Fig. 9 As shown in the figure, in the Transformer architecture, the encoder is composed of multiple layers of identical modules, each layer contains two core components: the self-attention mechanism (Self-Attention Layer) and the feedforward neural network (Feedforward Neural Network). The self-attention mechanism enables each input word to not only consider its own meaning, but also fully understand its contextual semantics in the entire sentence or paragraph. This mechanism essentially allows each word node to "see" the relative importance of all other words in the sequence and adjust its own representation accordingly.

[0144] The error detection module relies on the fully connected layer technology to further analyze the encoded information to identify and locate potential errors or abnormal expressions in the text. The error correction module draws on the Masked Language Modeling (MLM) idea of ​​BERT and uses the encoded information to predict and replace possible erroneous words to achieve accurate repair of the original text content.

[0145] In the error detection module, a fully connected layer is used as the core prediction component. When the model is trained, the input is the embedding sequence E, and its output is processed by the softmax function to calculate the loss, thereby optimizing the performance of the error detection module. Specifically, the fully connected layer receives input information and generates a raw score for each possible error location, and counts the number of possible error locations through the Classifier. The softmax function then converts these scores into a probability distribution, which represents the model's estimate of the probability of an error at each location. The calculation method is as follows:

[0146] (3)

[0147] in, represents the original score of the i-th position, which is generated by the fully connected layer. This score reflects the possibility of an error at this position; Represents the number of categories, that is, the total number of possible error positions, which can be understood as the sequence length or the number of words in the text; A score indicating the number of categories; represents the label of the (c)th category. If there is an error at this position, then =1, otherwise =0.

[0148] In the error correction module, two core structures are used: masking mechanism and decoding structure. First, the principle of the masking mechanism is to perform specific processing on the encoded information of the input text. The specific operation is to randomly apply the [MASK] tag to replace part of the original vocabulary. Through this strategy, the model will face a challenge in the training stage - to infer the content of the masked words based on the context information. The purpose of this is to strengthen the model's deep understanding and reasoning ability of the text context, so that it can accurately infer the missing vocabulary based on the logical relationship between the context in the absence of direct information; Next, the decoding structure is used to restore the information. The decoder gradually generates and outputs the corresponding predicted vocabulary based on the encoded and masked information, in order to match the original correct vocabulary that was masked. This process is equivalent to simulating the process of humans restoring the original text from incomplete information, thereby exercising the model's error correction ability and language comprehension;

[0149] The error correction loss function is introduced in the training stage for model convergence. The formulas are shown in (4) and (5):

[0150] P c ( y i =j|X)=softmax(W h i ' +b)[j] (4)

[0151] (5)

[0152] in, Is a character is corrected to the conditional probability of character j in the candidate list, softmax is the softmax function, Indicates the hidden state, is the weight parameter, is the deviation parameter, and the final calculation The cross entropy is .

[0153] Finally, during the training phase, the MacBERT model adopts a fusion loss function strategy, which combines the loss of the error detection task and the loss of the error correction task to form a fusion loss function to guide the entire model to continuously optimize and adjust during the cyclic training process, thereby improving the overall performance and accuracy of the model in hot word error correction.

[0154] The fusion loss function is to perform a weighted average fusion of the loss values ​​calculated by the error correction module and the error detection module respectively, and use this as the final loss function of the entire system, as shown in formula (6):

[0155] (6)

[0156] Among them, β is a trainable weight parameter. This fusion method has the following advantages:

[0157] Dynamic weight adjustment: It can be updated through the back-propagation algorithm. As the training progresses, the value of β is automatically adjusted, so that the model can better balance the weights between error correction and error detection tasks, thus helping the model to achieve better performance on both tasks.

[0158] Loss scaling: The product of the constant 1 and β plays a scaling role, so that the total loss function can better adapt to loss values ​​of different scales, which can avoid the weight of another task being overly suppressed or amplified due to the loss of a certain task being too large or too small; at the same time, by dividing by the square of β, the value of the total loss function can always be within a certain range, avoiding excessive fluctuations in the total loss function due to changes in the β value;

[0159] By multiplying and The product of can make the total loss function pay more attention to those samples that perform poorly in both tasks, which helps the model to better optimize these samples and thus improve the overall performance.

[0160] Hot word correction reasoning

[0161] The previously trained hot word correction model is used to perform targeted correction on the high-frequency and key hot words in the normalized text output by the speech recognition engine. In order to verify the accuracy of the correction results, the system uses a similarity calculation method to compare the corrected text with the original real text. If the two are completely matched, it indicates that the correction is successful and the corrected text content can be directly output.

[0162] If it is found that there are still differences between the corrected text and the real text, it means that the error correction model needs to be optimized. At this time, the system will store the text information that may contain incorrect hot words generated in the pre-recognition stage into the text memory unit, so as to continuously accumulate hot word error cases of real users.

[0163] Based on this, the system will continuously collect and learn these error samples, and by fine-tuning the parameters of the hot word error correction model, it will have a higher error correction accuracy when facing similar errors. The whole process forms a cyclic iterative mechanism, in which the speech recognition engine and the hot word error correction model work together for adaptive optimization, continuously improving the speech recognition and error correction capabilities in various complex and real scenarios.

[0164] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An efficient and adaptive hot word correction system for speech recognition engines, characterized in that: The system includes a data collection and classification module, an adaptive data amplification module, a hot word error correction training module and a hot word error correction reasoning module; The data collection and classification module collects large-scale data on misidentification situations that occur in actual applications, and classifies the collected data into hot data, warm data, and cold data. Hot data refers to a collection of words that are currently or recently used with extremely high frequency and immediate influence, warm data refers to words that are used relatively less frequently in the short term but still have a certain degree of activity, and cold data refers to a vocabulary library with a continuously low frequency of use under long-term observation; The adaptive data augmentation module systematically collects and increases the error instances related to hot words for a specific speech recognition engine, and constructs a training data set for training the hot word error correction model. The adaptive data augmentation module includes a text preprocessing unit, a speech synthesis unit, a speech recognition engine, a text memory unit, an error data annotation unit, and a training data generation unit. The text preprocessing unit performs preliminary preprocessing operations on the original input text, including removing duplicate data and performing desensitization processing, and normalizing the text format. The preprocessed text data is respectively transmitted to the speech synthesis unit and the error data annotation unit. The speech synthesis unit converts the preprocessed hot data into corresponding speech data according to the characteristics of the speech recognition engine, and the generated speech data is used as the input data of the speech recognition engine; the speech recognition engine recognizes the speech data and converts it into text form, and collects specific cases of hot word errors in a targeted manner by analyzing the error characteristics in the recognition process; the text memory unit is used to store the erroneous text output generated by the speech recognition engine during the processing process, and these error information will be promptly transmitted to the subsequent error data annotation unit; The error data annotation unit compares and analyzes the error information provided by the received text memory unit with the real text data after preprocessing, identifies the location of the error in the text, and provides accurate annotation results; The training data generation unit integrates and constructs a training data set for training a hot word error correction model based on the real text content, the text with errors output by the speech recognition engine, and the error position information determined by the error data annotation unit; The hot word error correction training module uses a deep learning algorithm to build a hot word error correction model for the hot word errors of the speech recognition engine. The hot word error correction training module includes a model parameter adjustment unit, a shared coding unit, a position detection unit, a text error correction unit, a fusion loss unit, a training decision unit, and an optimal model acquisition unit; the model parameter adjustment unit obtains the training data generated by the training data generation unit and initializes the model parameters. As the training process progresses, the unit dynamically adjusts the model parameters according to the fusion loss function to continuously optimize the model performance; the shared coding unit uses a deep learning algorithm to deeply analyze the text training data and extract key features, encodes these features into feature vectors, and then transmits the encoded information to the position detection unit and the text error correction unit at the same time; the position detection unit detects the position of the error information, outputs the position information, and provides the position information for the text error correction unit for targeted error correction; the text error correction unit learns the shared coding information and corrects the error according to the position information of the error word; The fusion loss unit integrates the losses generated by the position detection unit and the text error correction unit to form a fusion loss function, which comprehensively analyzes the overall gap between the two and the target label in the training data set; The training decision unit determines the degree of error between the model prediction result and the true label based on the fusion loss function. When the error is greater than the preset threshold, the training continues and the relevant parameters are adjusted. If the error is lower than the threshold, the training stops. After the entire training process is completed, the optimal model acquisition unit selects the optimal hot word error correction model from the iterative process to correct the errors in the text output generated by the speech recognition engine. The hot word error correction reasoning module is used to detect and correct errors in the text information output by the speech recognition engine. When there are still errors in the corrected text, it is automatically pushed to the error data annotation unit to collect and analyze these error information in depth. When there are no errors in the corrected text, the corrected text information is output. The hot word error correction reasoning module includes a pre-recognition processing unit, a hot word error correction unit, a text generation unit, a decision judgment unit and a text output unit; the pre-recognition processing unit performs standardization processing on the text output by the speech recognition engine received to ensure that the information format input to the hot word error correction unit is standardized and consistent; the hot word error correction The unit uses the trained error correction model to perform detailed correction on the pre-processed text content, and conducts targeted correction on hot words and common misrecognition situations in specific scenarios; the text generation unit generates the final text content based on the error correction results; the decision judgment unit makes a decision by comparing and verifying the corrected text content with the actual target text. If there is a difference between the two, the original pre-recognition result is passed to the text memory unit for subsequent analysis; if there is no difference, it means that the correction is successful, and the corrected text is passed to the text output unit; the text output unit will publish or quote the corrected text content that has been finally confirmed to be correct.

2. The system according to claim 1, characterized in that According to the preset time nodes, the original hot data is gradually adjusted to warm data, and the warm data is further transformed into cold data, forming a dynamic data update process. At the same time, in order to optimize the results of speech recognition output, the language model used in the speech recognition engine is first optimized, and a fine-tuning strategy is adopted for cold data and warm data. Through the pre-trained language model, the warm data and cold data are gradually integrated into the model training process.

3. The system according to claim 1, characterized in that The speech synthesis uses SAM-BERT as the acoustic model, and the vocoder adopts the high-fidelity generative adversarial network HIFI-GAN architecture. In the acoustic model training stage, speech data of a large number of speakers, multiple dialects and accents are integrated to enrich the expressiveness and realism of the synthesized speech.

4. The system according to claim 1, characterized in that The position detection unit includes a fully connected layer subunit and a detection loss subunit. The fully connected layer subunit uses the fully connected layer to perform an error location task on the shared encoder information and outputs word position information containing errors. The detection loss subunit calculates the difference between the error position predicted by the current model and the error position in the true label as a loss indicator of the position detection part. The text error correction unit includes a mask subunit, a decoding subunit and an error correction loss subunit. The mask subunit uses the [MASK] mechanism on the shared encoding information to randomly mask the original words, prompting the model to infer the masked words based on the context content. The decoding subunit decodes the feature vector or mask state generated by the encoder back to text form. The error correction loss subunit calculates the difference between the decoded text information and the correct label in the training data, which is used to evaluate the quality of the error correction effect.

5. The system according to claim 4, characterized in that The loss of the position detection unit is calculated by the softmax function, which is calculated as: in, represents the original score of the ith position, which reflects the possibility of an error at that position. C represents the number of categories, which is the sequence length or the number of words in the text. The score representing the number of categories, loss det Represents the label of the cth category. If there is an error at this position, the loss det =1, otherwise loss det =0; The loss function of the text error correction unit is: P c (y i = j | X) = softmax(Wh′ i +b)[j]; Among them, P c (y i =j|X) is the character y i The conditional probability of character j in the corrected candidate list, h′ i represents the hidden state, W is the weight parameter, b is the bias parameter, and finally calculates P c (y i =j|X) as the cross entropy loss cor ; The fusion loss function of the entire system is the weighted average of the loss values ​​calculated by the error correction module and the error detection module respectively, and the calculation method is: β is a trainable weight parameter.

6. An efficient and adaptive hot word error correction method for speech recognition engine, characterized in that: The method comprises the following steps: Step S1: Data collection and classification, collect text corpus, and divide the collected data into hot data, warm data and cold data, where hot data refers to a collection of words that are currently or recently used with extremely high frequency and immediate influence, warm data refers to words that are used relatively less frequently in the short term but still have a certain degree of activity, and cold data refers to a vocabulary library with a continuously low frequency of use under long-term observation; warm data and cold data are used to train the language model, and error correction is performed inside the speech recognition engine. The hot data is used to obtain the corresponding synthesized speech through the speech synthesis engine, and then the text information is obtained through the speech recognition engine; Step S2: Adaptive data augmentation, receiving original input text information, performing preprocessing operations on the original input text, including removing duplicate data, performing desensitization processing, and normalizing the text format, and then using speech synthesis technology according to the characteristics of the speech recognition engine to convert the preprocessed hot data into corresponding speech information, and then input the synthesized speech information into the speech recognition engine for recognition, obtain the pre-recognized text result, and by comparing the difference between the preprocessed original input text and the pre-recognized text, mark the error position and construct a training data set for hot word error correction model training; Step S3: Hot word error correction model training, encode the training data, then perform error position detection and text error correction on the encoded information, and finally judge the model training results through the fusion loss function. If the error is greater than the preset threshold, continue training and adjust relevant parameters. If the error is lower than the threshold, it indicates that the model has reached the expected training level, stop training, and select an optimal error correction model for reasoning; Step S4: Hot word error correction reasoning, first send in a test audio, then recognize it through the speech recognition engine to get the pre-recognition result, then normalize the pre-recognition result, and then use the trained hot word error correction model to correct the normalized text content, and compare the corrected text content with the real target text for verification. If there is a difference between the error correction result and the real text, the pre-recognition result will be further collected and made into training data to continue training; if there is no difference, it means that the error correction is successful, and the corrected text is output.