Speech recognition text processing method and device, electronic equipment and storage medium
By combining word segmentation dictionaries, statistical language models, and neural network language models, primary and secondary error correction processing is performed on speech recognition text, which solves the problem of poor speech recognition performance in open environments and improves the accuracy of speech recognition.
Patent Information
- Application Number
- CN202210248104.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-03-14
AI Technical Summary
Existing speech recognition technology performs poorly in noisy and dialect-heavy open environments, resulting in poor text correction and reduced recognition accuracy.
Primary error correction is performed using error detection rules based on word segmentation dictionary and statistical language model. Secondary error correction is performed by combining predefined language model and neural network language model. Rule dictionary is constructed using word2vec model. Bidirectional RNN model is used for candidate word recall and pinyin similarity calculation.
It improves the accuracy of speech recognition text, especially in professional fields, enhancing the efficiency of correcting proper nouns, reducing the model's search space, and improving the accuracy of error correction.
Smart Images

Figure CN114596846B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to a speech recognition text processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] At present, speech recognition technology is widely used in various scenarios, such as speech transcription in mobile phones and speech recognition in intelligent customer service. Due to excessive noise in an open environment and numerous domestic dialects, the speech recognition system often has a low recognition rate for accented speech, which greatly affects the post-processing. Therefore, the text after speech recognition generally needs to be corrected.
[0003] The scheme commonly used for text correction includes three parts: error detection, candidate recall, and candidate sorting. The technologies used can be divided into: general correction library based on rules, such as Pycorrector (an open source framework on GitHub, the most commonly used open source); correction algorithm based on large-scale sample training of deep learning model (represented by Baidu correction); and DCQC correction framework based on professional field. Among them, Pycorrector uses the dictionary of jieba word segmentation tool to correct words not registered in the jieba word segmentation tool, which has good effect in general fields. However, in professional fields, the effect is often poor due to the lack of a large number of professional field words. The deep learning model correction method relies on a large amount of text corpus, which is difficult to implement in scenarios lacking annotated corpus.
[0004] That is, the text correction processing after speech recognition is poor, which affects the accuracy of speech recognition. SUMMARY
[0005] Therefore, the present application provides a speech recognition text processing method and device, electronic equipment and storage medium to solve at least one of the above problems.
[0006] According to a first aspect of the present application, a speech recognition text processing method is provided, which comprises:
[0007] Obtaining a speech recognition text, and performing error detection on the speech recognition text based on a pre-set error detection rule to obtain error word groups, the error detection rule being set based on a word segmentation dictionary and a statistical language model;
[0008] Performing primary correction processing on the error word groups according to a pre-set correction rule, the correction rule being constructed based on a predetermined language model;
[0009] In response to the failure of the primary correction processing of part of the error word groups, inputting the part of the error word groups into a pre-trained neural network language model for secondary correction processing.
[0010] The error word group is corrected according to results of the primary error correction processing and the secondary error correction processing to generate a corrected speech recognition text.
[0011] Preferably, the statistical language model is an n-gram language model, and the error detection on the speech recognition text based on the preset error detection rule comprises:
[0012] The speech recognition text is segmented based on the segmentation dictionary;
[0013] The error detection is performed on a probability of occurrence of each word in context based on the n-gram language model.
[0014] Preferably, the predetermined language model is a word2vec model, and the construction of the error correction rule based on the predetermined language model comprises:
[0015] The predetermined professional word is input into the word2vec model to output a plurality of candidate words with similar pinyin;
[0016] The error correction rule is constructed according to the predetermined professional word and the corresponding plurality of candidate words.
[0017] Specifically, the primary error correction processing on the error word group according to the preset error correction rule comprises:
[0018] The error word group is matched with a candidate word in the error correction rule;
[0019] In response to a successful matching operation, the error word group is corrected according to a predetermined professional word corresponding to the matched candidate word.
[0020] Preferably, the neural network language model is a bidirectional RNN model, and the secondary error correction processing on the partial error word group input into the pre-trained neural network language model comprises:
[0021] The pinyin of the error word group in the partial error word group, the context of the error word group and the pinyin of the context are input into the bidirectional RNN model for secondary error correction processing to generate a plurality of candidate words corresponding to the error word group.
[0022] Further, the method further comprises:
[0023] The secondary error correction processing is performed according to a pinyin similarity between the plurality of candidate words corresponding to the error word group and the error word group.
[0024] Specifically, the bidirectional RNN model is trained in the following manner:
[0025] acquire historical speech recognition text, the historical speech recognition text comprising: historical correct text and historical error text;
[0026] train the bidirectional RNN model according to the characters and pinyin of the historical correct text and the historical error text.
[0027] According to a second aspect of the present application, a speech recognition text processing device is provided, the device comprising:
[0028] an error detection unit configured to acquire speech recognition text and perform error detection on the speech recognition text based on a pre-set error detection rule to obtain error phrases, the error detection rule being set based on a word segmentation dictionary and a statistical language model;
[0029] a primary error correction processing unit configured to perform primary error correction processing on the error phrases according to a pre-set error correction rule, the error correction rule being constructed based on a predetermined language model;
[0030] a secondary error correction processing unit configured to input part of the error phrases to a pre-trained neural network language model for secondary error correction processing in response to a failure of the primary error correction processing of the part of the error phrases;
[0031] a speech recognition text error correction unit configured to perform error correction processing on the error phrases according to results of the primary error correction processing and the secondary error correction processing to generate corrected speech recognition text.
[0032] According to a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
[0033] According to a fourth aspect of the present application, a computer readable storage medium is provided, having a computer program stored thereon, the computer program being executable on a processor to implement the steps of the above method.
[0034] According to the above technical solution, the acquired speech recognition text is detected for errors based on a pre-set error detection rule to obtain error phrases, then the error phrases are processed for primary error correction according to an error correction rule, when the primary error correction processing of part of the error phrases fails, the part of the error phrases is input to a neural network language model for secondary error correction processing, and then the error phrases are processed for error correction according to results of the primary error correction processing and the secondary error correction processing to generate corrected speech recognition text, thus the accuracy of speech recognition can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and the other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0036] Figure 1 is a flow chart of a speech recognition text processing method according to an embodiment of the present application;
[0037] Figure 2 is a flow chart of a text error correction method for speech recognition text according to an embodiment of the present application;
[0038] Figure 3 is an architecture schematic diagram of a bidirectional RNN model according to an embodiment of the present application;
[0039] Figure 4 is a structural block diagram of a speech recognition text processing device according to an embodiment of the present application;
[0040] Figure 5 is an example structural diagram of a text error correction device for speech recognition text according to an embodiment of the present application;
[0041] Figure 6 is a schematic block diagram of a system structure of an electronic device 600 according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0043] Because of the existence of dialects and accents in different regions, the text after speech recognition contains a large number of homophonic words instead of homonyms, which increases the difficulty of error correction of the speech recognition text. At the same time, the current text error correction technology after speech recognition has poor effect, which affects the accuracy of speech recognition. Based on this, the embodiments of the present application provide a processing scheme of speech recognition text. The scheme constructs a text error correction word group pair after speech recognition for the error text after speech recognition, so that the text after speech recognition can be corrected, and the accuracy of speech recognition is improved.
[0044] It should be noted that the acquisition, storage, use, processing, etc. of data in the technical solutions of the present application comply with relevant provisions of national laws and regulations. The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0045] Figure 1 is a flowchart of a voice recognition text processing method according to an embodiment of the present application, as shown in Figure 1 , the method comprises:
[0046] Step 101, acquiring a voice recognition text, and performing error detection on the voice recognition text based on a pre-set error detection rule to obtain an error word group, the error detection rule being set based on a word segmentation dictionary (for example, the dictionary of the jieba word segmenter) and a statistical language model.
[0047] Preferably, the statistical language model can be an n-gram (N-gram) language model. Specifically, the voice recognition text can be first processed by word segmentation based on the word segmentation dictionary; then, the probability of occurrence of each word in the context after word segmentation processing is detected based on the n-gram language model.
[0048] Step 102, performing primary error correction processing on the error word group according to a pre-set error correction rule, the error correction rule being constructed based on a predetermined language model.
[0049] The predetermined language model here can be a word2vec (a model used to generate word vectors) model. In actual operation, a predetermined professional term can be input into the word2vec model to output a plurality of candidate words similar in pinyin; then, the error correction rule can be constructed according to the predetermined professional term and the corresponding plurality of candidate words.
[0050] When performing step 102, the error word group can be matched with the candidate words in the error correction rule; when the matching operation is successful, the error word group is corrected according to the predetermined professional term corresponding to the matched candidate word, that is, the predetermined professional term corresponding to the matched candidate word is the correct word of the error word group.
[0051] Step 103, in response to the failure of the primary error correction processing of part of the error word group, inputting the part of the error word group into a pre-trained neural network language model for secondary error correction processing.
[0052] Preferably, the neural network language model herein can be a bidirectional RNN (Recurrent Neural Network) model. In actual operation, the bidirectional RNN model can be trained in the following manner: obtaining historical speech recognition texts, the historical speech recognition texts including historical correct texts and historical error texts; and then training the bidirectional RNN model according to the characters and pinyin of the historical correct texts and the historical error texts.
[0053] In performing step 103, the pinyin of the error word group, the context of the error word group and the pinyin of the context in the part of the error word groups can be input to the bidirectional RNN model for secondary error correction processing to generate a plurality of candidate words corresponding to the error word group. Then, the secondary error correction processing is performed according to the pinyin similarity between the plurality of candidate words corresponding to the error word group and the error word group.
[0054] Step 104: performing error correction processing on the error word group according to the results of the primary error correction processing and the secondary error correction processing to generate the error-corrected speech recognition text.
[0055] By performing error detection on the obtained speech recognition text based on the pre-set error detection rule, the error word group is obtained, and then the error word group is subjected to primary error correction processing according to the error correction rule. When the primary error correction processing of part of the error word group fails, the part of the error word group is input to the neural network language model for secondary error correction processing. Then, the error correction processing is performed on the error word group according to the results of the primary error correction processing and the secondary error correction processing to generate the error-corrected speech recognition text. In this way, the accuracy of speech recognition can be improved.
[0056] In order to better understand the present application, the following will be described in detail in combination with the flowchart shown in Figure 2 .
[0057] Referring to Figure 2 , the text error correction process after speech recognition specifically includes:
[0058] Step 1: performing speech recognition on the obtained speech file, i.e., performing speech-to-text operation on the speech input file.
[0059] Step 2: Segment the text after speech recognition, and then perform error detection on the text according to a language model (for example, an unsupervised language model). In the error detection of this step, the embodiments of the present invention adopt a method combining dictionary segmentation and model judgment. The segmentation dictionary can be a relatively common dictionary. For example, the dictionary of the jieba tokenizer. For the vast majority, the input phrases are common. After the text is segmented, the language model judges whether a sentence is reasonable. If the frequency of a phrase is lower, then it is most likely that an incorrect word has occurred.
[0060] In actual operation, the language model can be an n-gram language model. When judging whether a sentence is reasonable, if the conditional probability of a local n-gram is significantly lower than the probability of the entire sentence, it indicates that there may be an incorrect word at this position.
[0061] In specific implementation, the language model can also use a neural network model or other statistical models. The embodiments of the present invention adopt a character-based n-gram language model, which mainly counts the frequency of the current character appearing in the context of normal corpus. The more frequent the appearance, the more reasonable it is. The lower the frequency of appearance, the more likely the sentence is incorrect.
[0062] For example, for the sentence "Currently, speech recognition is widely used in various scenarios, such as speech transcription in mobile phones and speech recognition of intelligent customer service. Due to excessive noise in the open environment and the large number of domestic dialects, the speech recognition system often has a low recognition rate for accented speech, causing great problems in subsequent processing. The text after speech recognition often needs to be corrected." Count the frequency of each word and the previous word. The statistics are as follows: {('语','音'):6,('识','别'):5,('音','识'):4,('的','语'):2...}. Then calculate the probability of each word pair appearing above. For example, the probability of ('语', '音') is calculated by dividing the number of times ('语', '音') appears, which is 6, by the number of words starting with '语', which is 8. So, P(音|语) = 6 / 8 = 0.75, that is, the probability of the word '音' appearing when '语' appears is 0.75. According to the Markov hypothesis, the probability of local phrases can be calculated. In this way, phrases with lower probabilities can be determined as incorrect phrases.
[0063] Step 3: Recall candidate words for the possible incorrect phrases in Step 2. Common error correction methods can be using an unsupervised language model for training or the rule dictionary matching method. Since there is less corpus in the professional field, especially in the speech recognition scenario itself, there are a large number of errors in the recognition of proper nouns. Therefore, using only the language model often has poor results. The rule dictionary matching method can correct errors more accurately, but constructing a rule dictionary requires accumulating a large number of error samples and a huge amount of manual input. Therefore, the embodiment of the present invention adopts a method combining a rule dictionary and a language model.
[0064] Specifically, the embodiment of the present invention constructs a rule dictionary based on training a word2vec model with a large amount of unlabeled corpus after speech recognition. By inputting professional words into the trained word2vec model, the model outputs the most likely incorrect words. The method of calculating pinyin similarity is used to screen out possible incorrect word pairs for the possible incorrect words, and then a rule dictionary is constructed based on the professional words and the screened incorrect word pairs.
[0065] That is to say, a word2vec model is trained with a large amount of corpus after speech recognition. After obtaining the word2vec model, similar words are obtained by inputting business professional words into the word2vec model. For example, when "ETC" is input into the word2vec model, the 10 words closest to "ETC" are obtained, including incorrect words such as "异地非", "亦非", "一起飞", and "一起非", as follows:
[0066] ('异地非',0.8128223419189453)
[0067] ('牡丹卡',0.7696257829666138)
[0068] ('亦非',0.7594119906425476)
[0069] ('车贷',0.7453207645225525)
[0070] ('一起非',0.7332978844642639)
[0071] ('车辆',0.7260703444480896)
[0072] ('pos机',0.7176908254623413)
[0073] ('一起飞',0.7103822019432068)
[0074] ('速通卡',0.7018517851829529)
[0075] ('Provident fund', 0.6822041604995728)
[0076] After obtaining 10 similar words close to the professional terms, possible error correction pairs can be obtained. For example, 'off-site non' -> 'ETC'. Then, pinyin similarity is used for screening. In the embodiments of the present invention, the method of dividing the total number of common syllables by the number of characters is adopted. For example, the syllables of 'off-site non' are 'yi di fei', and the syllables of 'ETC' are 'yi ti ci'. Then the similarity between the two is 1 / 3, while the syllable similarity between car loan and ETC is 0. In this way, the error correction pair 'car loan' -> 'ETC' is screened out.
[0077] Finally, manual confirmation is performed to construct a regular word library. By adopting this method, the cost of manually constructing a regular dictionary can be reduced.
[0078] For the possible error words in step 2, the regular word library is retrieved. If a match is found in the regular dictionary, the corresponding corrected word is directly outputted. If no match is found in the regular word library, the next step is entered, and candidate words are recalled through a language model.
[0079] Generally, neural network language models are mostly adopted for language models. However, traditional neural network language models generally predict the current character or word based on context. The search space for the predicted word is the entire word list, while speech recognition often has homophonic and near-homophonic errors. In the embodiments of the present invention, the pinyin of the current error word and the pinyin of the context are also used as features for input, which can reduce the search space and improve the accuracy. The neural network language model adopted in the embodiments of the present invention is a bidirectional RNN model, and the model architecture is as Figure 3 shown.
[0080] Based on the traditional RNN language model, the present invention uses pinyin as a feature and combines it with characters as input to the encoding layer. Specifically, the pinyin is shifted one position to the left, so that the context and the syllables of the current character are used as features for input to the network to predict the current character, greatly improving the accuracy.
[0081] Step 4: Score the results of candidate word recall in step 3, sort them in descending order, and output the minimum value. Similarly, in the case where the professional field corpus is relatively small, in the embodiments of the present invention, the scoring is performed by calculating the pinyin similarity of the recalled candidate words and performing a weighted average of the string edit distance. The specific calculation formula is:
[0082]
[0083] Among them, sim() is the pinyin similarity function, S 1pinyin , 2pinyin ,
[0083] , 、S 2pinyinS1, S2 are pinyin of strings, LD() is edit distance function, max() is maximum function, and len() is string length.
[0084] Step 5: According to the words in the hit rule dictionary in step 3, the weighted average result S in step 4 is directly output, and if the weighted average result S is lower than a threshold value, the correct words are indicated, and the correct words are output at this time, and if the weighted average result S is higher than the threshold value, no error correction is performed and the words are output.
[0085] The corrected result is shown in Table 1.
[0086]
[0087] Table 1
[0088] As can be known from the above description, the embodiment of the application adopts a method of combining a rule dictionary and a language model, and for a professional field-specific proper noun, a rule dictionary is constructed based on a word2vec model, professional words are manually input, and the word2vec model outputs the most possible error words, so that the efficiency of a professional field error correction dictionary can be improved. For the candidate word recall part in error correction, a method of adding speech information features is adopted, which can effectively reduce the model search space and improve the model accuracy, so that the accuracy of speech recognition can be improved.
[0089] Based on the similar inventive concept, the embodiment of the application also provides a speech recognition text processing device, which is preferably used to implement the process of the above method embodiment.
[0090] Figure 4 is a structural block diagram of the speech recognition text processing device, as Figure 4 shown, the device comprises an error detection unit 1, a primary error correction processing unit 2, a secondary error correction processing unit 3, and a speech recognition text error correction unit 4, wherein:
[0091] The error detection unit 1 is used to acquire a speech recognition text, and performs error detection on the speech recognition text based on a pre-set error detection rule to obtain an error word group, wherein the error detection rule is set based on a word segmentation dictionary and a statistical language model.
[0092] Preferably, the statistical language model is an n-gram language model, and the error detection unit 1 is specifically used to:
[0093] perform word segmentation processing on the speech recognition text based on the word segmentation dictionary;
[0094] perform error detection on the probability of occurrence of each word in context based on the n-gram language model.
[0095] The primary error correction processing unit 2 is configured to perform primary error correction processing on the error word group according to a preset error correction rule, which is constructed based on a predetermined language model.
[0096] Preferably, the predetermined language model is a word2vec model.
[0097] In one embodiment, constructing the error correction rule based on the predetermined language model includes inputting a predetermined professional word into the word2vec model to output a plurality of candidate words with similar pinyin, and constructing the error correction rule according to the predetermined professional word and the plurality of candidate words.
[0098] The primary error correction processing unit 2 can specifically perform matching operation on the error word group and the candidate words in the error correction rule, and when the matching operation is successful, perform error correction processing on the error word group according to the predetermined professional word corresponding to the matched candidate word.
[0099] The secondary error correction processing unit 3 is configured to input the partial error word group into a pre-trained neural network language model to perform secondary error correction processing in response to failure of the primary error correction processing on the partial error word group.
[0100] Preferably, the neural network language model is a bidirectional RNN model, which can be trained in the following manner: obtaining historical speech recognition text, the historical speech recognition text including historical accurate text and historical error text; and training the bidirectional RNN model according to the characters and pinyin of the historical accurate text and the historical error text.
[0101] In one embodiment, the secondary error correction processing unit 3 inputs the pinyin of the error word group, the context of the error word group and the pinyin of the context in the partial error word group into the bidirectional RNN model to perform secondary error correction processing to generate a plurality of candidate words corresponding to the error word group, and then performs secondary error correction processing according to the pinyin similarity between the plurality of candidate words corresponding to the error word group and the error word group.
[0102] The speech recognition text error correction unit 4 is configured to perform error correction processing on the error word group according to the results of the primary error correction processing and the secondary error correction processing to generate error-corrected speech recognition text.
[0103] Error detection unit 1 detects errors in the acquired speech recognition text based on pre-set error detection rules, obtaining erroneous word groups. Subsequently, primary error correction unit 2 performs primary error correction processing on the erroneous word groups according to the error correction rules. When the primary error correction processing of some erroneous word groups fails, secondary error correction unit 3 inputs some erroneous word groups into the neural network language model for secondary error correction processing. Afterward, speech recognition text error correction unit 4 performs error correction processing on the erroneous word groups based on the results of the primary and secondary error correction processing, generating corrected speech recognition text. In this way, the accuracy of speech recognition can be improved.
[0104] The specific execution process of each of the above units can be found in the description in the above method embodiments, and will not be repeated here.
[0105] In practice, the above-mentioned units can be combined or set individually, and the present invention is not limited thereto.
[0106] Figure 5 This is an example structural diagram of a text correction device after speech recognition according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes: a speech recognition module 201, an error detection module 202, a rule dictionary retrieval module 203, a professional domain terminology storage module 204, a rule dictionary mining module 205, a candidate word recall module 206, a candidate word ranking module 207, and an error correction result output module 208, wherein:
[0107] The speech recognition module 201 converts speech into text after the user inputs it via voice.
[0108] Error detection module 202 uses a dictionary combined with a model to identify erroneous words in the text and sends the detected erroneous words to rule dictionary retrieval module 203.
[0109] The rule dictionary retrieval module 203 performs retrieval based on the error word pairs mined from the rule dictionary, providing a rule dictionary query and matching function.
[0110] The professional domain proper noun storage module 204 is mainly responsible for the user input and storage management functions of professional domain proper nouns. Users can classify and manage them according to professional domains and provide the functions of adding, deleting, modifying and querying professional domain proper nouns.
[0111] The rule dictionary mining module 205 constructs a rule dictionary based on a word2vec model trained based on a professional field corpus, inputs the professional field-specific terms in the module 204 into the word2vec model, outputs the K closest word groups, then converts the specific terms and the K word groups into pinyin to calculate the edit distance between the pinyins, filters out the word groups with too large edit distance, and then manually confirms to construct the rule dictionary.
[0112] The candidate word recall module 206 inputs the context of the current error word, the pinyin of the context, and the pinyin of the error word as features into a neural network language model to perform candidate word recall.
[0113] The candidate word sorting module 207 adopts the edit distance between the pinyins of the candidate words and the error word to perform weighted average.
[0114] The error correction result output module 208 outputs the correct word if the weighted average result of the module 207 is below a threshold, and does not perform error correction if the weighted average result is above the threshold.
[0115] As can be seen from the above description, the rule dictionary constructed by the word2vec model can improve the efficiency of the professional field error correction dictionary, and the method of adding the pinyin information feature in the candidate word recall part can effectively reduce the model search space and improve the model accuracy.
[0116] The embodiment also provides an electronic device, which can be a desktop computer, a tablet computer, a mobile terminal, and the like, and is not limited thereto. In the embodiment, the electronic device can be implemented by referring to the method embodiment and the implementation of the speech recognition text processing device, the contents of which are incorporated herein, and repeated descriptions are omitted.
[0117] Figure 6 A schematic block diagram of a system configuration of an electronic device 600 according to an embodiment of the present application is shown in FIG. 6. As shown in the figure, the electronic device 600 can include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. It is worth noting that the figure is exemplary; other types of structures can also be used to supplement or replace the structure to implement telecommunication functions or other functions. Figure 6
[0118] In an embodiment, the speech recognition text processing function can be integrated into the central processor 100. The central processor 100 can be configured to perform the following control:
[0119] The speech recognition text is acquired, and errors are detected in the speech recognition text based on pre-set error detection rules to obtain erroneous word groups. The error detection rules are set based on a word segmentation dictionary and a statistical language model.
[0120] The erroneous phrases are subjected to primary error correction processing according to pre-set error correction rules, which are constructed based on a predetermined language model;
[0121] In response to the failure of the primary error correction process for some erroneous word groups, the erroneous word groups are input into a pre-trained neural network language model for secondary error correction.
[0122] The erroneous word groups are corrected based on the results of the primary error correction process and the secondary error correction process to generate corrected speech recognition text.
[0123] As described above, the electronic device provided in this application embodiment detects errors in the acquired speech recognition text based on pre-set error detection rules to obtain erroneous word groups. Then, it performs primary error correction processing on the erroneous word groups according to error correction rules. When the primary error correction processing of some erroneous word groups fails, some erroneous word groups are input into a neural network language model for secondary error correction processing. Afterward, the erroneous word groups are corrected according to the results of the primary and secondary error correction processing to generate corrected speech recognition text. In this way, the accuracy of speech recognition can be improved.
[0124] In another embodiment, the speech recognition text processing device can be configured separately from the central processing unit 100. For example, the speech recognition text processing device can be configured as a chip connected to the central processing unit 100, and the speech recognition text processing function can be implemented through the control of the central processing unit.
[0125] like Figure 6 As shown, the electronic device 600 may also include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily need to include these components. Figure 6 All components shown; in addition, the electronic device 600 may also include Figure 6 For components not shown, please refer to existing technologies.
[0126] like Figure 6 As shown, the central processing unit 100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device. The central processing unit 100 receives inputs and controls the operation of various components of the electronic device 600.
[0127] The memory 140, for example, can be one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The above-mentioned information related to failure can be stored, and in addition, a program for executing the information related to failure can be stored. The central processing unit 100 can execute the program stored in the memory 140 to implement information storage or processing, etc.
[0128] The input unit 120 provides input to the central processing unit 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to supply power to the electronic device 600. The display 160 is used to display display objects such as images and characters. The display can be, for example, an LCD display, but is not limited thereto.
[0129] The memory 140 can be a solid state memory such as a read only memory (ROM), a random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as an EPROM, etc. The memory 140 can also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 can include an application / function storage 142 for storing application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
[0130] The memory 140 can further include a data storage 143 for storing data such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. A driver storage 144 of the memory 140 can include various drivers of the electronic device for a communication function and / or for performing other functions of the electronic device such as a messaging application, an address book application, etc.
[0131] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processing unit 100 to provide input signals and receive output signals, which can be the same as in the case of a conventional mobile communication terminal.
[0132] Based on different communication technologies, multiple communication modules 110, such as a cellular network module, a Bluetooth module, and / or a wireless local area network module, etc., can be provided in the same electronic device. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and to receive audio input from the microphone 132 to implement the usual telecommunication functions. The audio processor 130 can include any suitable buffers, decoders, amplifiers, etc. In addition, the audio processor 130 is also coupled to the central processor 100 to enable recording on the local device via the microphone 132 and to enable playing of stored sounds on the local device via the speaker 131.
[0133] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the voice recognition text processing method.
[0134] To sum up, the embodiment of the present application detects errors of the acquired voice recognition text based on the pre-set error detection rule to obtain error word groups, then performs primary error correction processing on the error word groups according to the error correction rule, when the primary error correction processing on part of the error word groups fails, inputs the part of the error word groups to the neural network language model to perform secondary error correction processing, and then performs error correction processing on the error word groups according to the results of the primary error correction processing and the secondary error correction processing to generate the error-corrected voice recognition text, so that the accuracy of voice recognition can be improved.
[0135] Preferred embodiments of the application are described above with reference to the accompanying drawings. Many features and advantages of the embodiments are apparent from the detailed specification, and it is therefore intended by the appended claims to cover all such features and advantages of the embodiments within their true spirit and scope. Further, since numerous modifications and changes can be made to the embodiments by those having ordinary skill in the art without departing from the scope of the application, it is not intended that the application be limited to the exact construction and operation described herein, and accordingly, all suitable modifications and equivalents should be considered as falling within the scope of the application.
[0136] Those skilled in the art will appreciate that embodiments of the present application can be devised for use with various computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers and the like. Embodiments of the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote memory storage devices.
[0137] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 one or more flow or blocks
[0138] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 one or more flow or blocks
[0139] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 one or more flow or blocks
[0140] The principles and implementations of the present application have been described above with the specific embodiments. The explanations of the above embodiments are only to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific embodiments and application scope can be changed, and the above description should not be understood as the limitation of the present application.
Claims
1. A method of processing speech recognition text, characterized by, The method comprises: acquiring speech recognition text, and performing error detection on the speech recognition text based on a pre-set error detection rule to obtain error word groups, the error detection rule being set based on a word segmentation dictionary and a statistical language model; performing primary error correction processing on the error word groups according to a pre-set error correction rule, the error correction rule being constructed based on a predetermined language model, the predetermined language model being a word2vec model; in response to failure of the primary error correction processing of part of the error word groups, inputting the part of the error word groups into a pre-trained neural network language model for secondary error correction processing, comprising: inputting error word group pinyin in the part of the error word groups, context of the error word group and pinyin of the context into the neural network language model for secondary error correction processing to generate a plurality of candidate words corresponding to the error word group; calculating pinyin similarity between the plurality of candidate words corresponding to the error word group and the error word group; and if the pinyin similarity is lower than a pre-set threshold, performing secondary error correction processing; performing error correction processing on the error word groups according to results of the primary error correction processing and the secondary error correction processing to generate error-corrected speech recognition text; wherein constructing the error correction rule based on the predetermined language model comprises: inputting a predetermined professional term into the word2vec model to output a plurality of candidate words with similar pinyin; and constructing the error correction rule according to the predetermined professional term and the corresponding plurality of candidate words; the word2vec model is trained based on unannotated speech recognition corpus.
2. The method of claim 1, wherein, The statistical language model is an N-gram language model, and the error detection on the speech recognition text based on the pre-set error detection rule comprises: performing word segmentation processing on the speech recognition text based on the word segmentation dictionary; performing error detection on a probability of each word in context after word segmentation processing based on the n-gram language model.
3. The method of claim 1, wherein, The primary error correction processing on the error word groups according to the pre-set error correction rule comprises: matching the error word groups with candidate words in the error correction rule; in response to success of the matching operation, performing error correction processing on the error word groups according to a predetermined professional term corresponding to the matched candidate word.
4. The method of claim 1, wherein, The neural network language model is a bidirectional RNN model.
5. The method of claim 4, wherein, The bidirectional RNN model is trained in the following manner: acquiring historical speech recognition text, the historical speech recognition text comprising: historical accurate text and historical error text; training the bidirectional RNN model according to text and pinyin of the historical accurate text and the historical error text.
6. A speech recognition text processing apparatus characterized by comprising: The apparatus comprises: an error detection unit configured to acquire speech recognition text, and perform error detection on the speech recognition text based on a pre-set error detection rule to obtain error word groups, the error detection rule being set based on a word segmentation dictionary and a statistical language model; a primary error correction processing unit configured to perform primary error correction processing on the error word groups according to a pre-set error correction rule, the error correction rule being constructed based on a predetermined language model, the predetermined language model being a word2vec model; The secondary error correction processing unit is configured to input the partial error word group into a pre-trained neural network language model for secondary error correction processing in response to the primary error correction processing of the partial error word group failing. The secondary error correction processing unit is specifically configured to input error word group pinyin, context of the error word group, and pinyin of the context in the partial error word group into the neural network language model for secondary error correction processing to generate a plurality of candidate words corresponding to the error word group; calculate pinyin similarity between the plurality of candidate words corresponding to the error word group and the error word group; and perform secondary error correction processing if the pinyin similarity is lower than a preset threshold. The speech recognition text error correction unit is configured to perform error correction processing on the error word group according to results of the primary error correction processing and the secondary error correction processing to generate corrected speech recognition text. The method for constructing the error correction rule based on the predetermined language model includes: inputting a predetermined professional word into the word2vec model to output a plurality of candidate words with similar pinyin; and constructing the error correction rule according to the predetermined professional word and the plurality of corresponding candidate words. The word2vec model is trained based on unannotated speech recognition corpus.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the method in any one of claims 1 to 5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Text error correction method after voice conversion
CN112084775A
Text error correction method and device
CN112199945A
Text error correction method and device, medium and electronic equipment
CN112784581A