Speech recognition error correction methods, devices, computer equipment and storage media

CN122575339APending Publication Date: 2026-08-14ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-26
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]尽管深度学习等技术的引入显著提升了语音识别的准确率,但在实际应用环境中,语音识别仍然普遍存在错词问题,特别是存在大量发音相同或相近的字词时,语言模型或声学模型容易识别出错

Benefits of technology

[0015] Compared with related technologies, the speech recognition error correction method, apparatus, computer equipment, and storage medium provided in this embodiment extract acoustic features from the received speech to be recognized, input the extracted acoustic features into an acoustic model and decoder for frame-by-frame decoding, and use the decoded text sequence as the first decoding result; obtain at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group contains at least one candidate word, and the candidate words are arranged in descending order of frequency; compare the sorting position of each word unit in the first decoding result in the word group with the same pronunciation in each of the vocabulary mapping tables with a preset threshold, so as to obtain the final decoding result with completed error correction based on the comparison result. It can effectively correct words with the same or similar pronunciation in the first decoding result by using the constructed vocabulary mapping table, and obtain a final decoding result with higher accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122575339A_ABST
    Figure CN122575339A_ABST
Patent Text Reader

Abstract

This application relates to a speech recognition error correction method, apparatus, computer device, and storage medium. The method includes: extracting acoustic features from received speech to be recognized; inputting the extracted acoustic features into an acoustic model and a decoder for frame-by-frame decoding; using the decoded text sequence as a first decoding result; obtaining at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group containing at least one candidate word, and the candidate words are arranged in descending order of frequency; comparing the sorting position of each word unit in the first decoding result within the word group with the same pronunciation in each vocabulary mapping table with a preset threshold, so as to obtain a final decoding result with completed error correction based on the comparison result. The constructed vocabulary mapping table can effectively correct words with the same or similar pronunciation in the first decoding result, resulting in a final decoding result with higher accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of speech recognition technology, and in particular to a speech recognition error correction method, apparatus, computer device, and storage medium. Background Technology

[0002] As one of the core technologies of human-computer interaction, speech recognition technology has been widely used in many fields such as smart devices, smart homes, in-vehicle systems, real-time translation, and speech transcription, greatly improving the convenience of information input and interaction. Its core goal is to efficiently and accurately convert human speech signals into corresponding text information.

[0003] Although the introduction of technologies such as deep learning has significantly improved the accuracy of speech recognition, mispronunciation remains a common problem in real-world applications, especially when there are many words with the same or similar pronunciations, making it easy for language or acoustic models to misidentify them. Therefore, a method to correct the recognition results is urgently needed. Summary of the Invention

[0004] In view of this, this application provides a speech recognition error correction method, apparatus, computer device, and storage medium, which can correct the recognition results and improve the accuracy of speech recognition.

[0005] Firstly, this embodiment provides a speech recognition error correction method, including:

[0006] Acoustic features are extracted from the received speech to be recognized. The extracted acoustic features are then input into the acoustic model and decoder for frame-by-frame decoding. The decoded text sequence is used as the first decoding result.

[0007] Obtain at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group contains at least one candidate word, and the candidate words are arranged in descending order of frequency;

[0008] The sorting position of each lexical unit in the first decoding result within the word group with the same pronunciation in each of the lexical mapping tables is compared with a preset threshold, so as to obtain the final decoding result with error correction completed based on the comparison result.

[0009] Secondly, this embodiment provides a speech recognition error correction device, including:

[0010] The first decoding module is used to extract acoustic features from the received speech to be recognized, input the extracted acoustic features into the acoustic model and decoder for frame-by-frame decoding, and use the decoded text sequence as the first decoding result.

[0011] The second decoding module is used to obtain at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group contains at least one candidate word, and the candidate words are arranged in descending order of frequency;

[0012] The second decoding module is further configured to compare the sorting position of each lexical unit in the first decoding result within the word group with the same pronunciation in each of the lexical mapping tables with a preset threshold, so as to obtain the final decoding result with error correction completed based on the comparison result.

[0013] Thirdly, this embodiment provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the speech recognition error correction method described in the first aspect above.

[0014] Fourthly, this embodiment provides a storage medium storing a computer program that, when executed by a processor, implements the speech recognition error correction method described in the first aspect above.

[0015] Compared with related technologies, the speech recognition error correction method, apparatus, computer equipment, and storage medium provided in this embodiment extract acoustic features from the received speech to be recognized, input the extracted acoustic features into an acoustic model and decoder for frame-by-frame decoding, and use the decoded text sequence as the first decoding result; obtain at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group contains at least one candidate word, and the candidate words are arranged in descending order of frequency; compare the sorting position of each word unit in the first decoding result in the word group with the same pronunciation in each of the vocabulary mapping tables with a preset threshold, so as to obtain the final decoding result with completed error correction based on the comparison result. It can effectively correct words with the same or similar pronunciation in the first decoding result by using the constructed vocabulary mapping table, and obtain a final decoding result with higher accuracy.

[0016] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 A flowchart of Embodiment 1 of the speech recognition error correction method provided in this application;

[0019] Figure 2 A flowchart of Embodiment 2 of the speech recognition error correction method provided in this application;

[0020] Figure 3 A flowchart of Embodiment 3 of the speech recognition error correction method provided in this application;

[0021] Figure 4 A schematic diagram illustrating the state transitions for defining homophone correction rules in the finite state converter provided in this application;

[0022] Figure 5 A schematic diagram illustrating the state transitions that define the rules for converting Chinese characters to Arabic numerals for the finite state converter provided in this application;

[0023] Figure 6 A schematic diagram illustrating the state transitions that define the accent processing rules for the finite state converter provided in this application;

[0024] Figure 7 A flowchart of Embodiment 4 of the speech recognition error correction method provided in this application;

[0025] Figure 8 A hardware structure diagram of a computer device containing a speech recognition error correction device, as shown in an exemplary embodiment of this application;

[0026] Figure 9 A schematic diagram of the speech recognition error correction device provided in this application. Detailed Implementation

[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.

[0028] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0029] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0030] The following specific embodiments are given to illustrate the technical solution of this application in detail.

[0031] Figure 1 A flowchart of an embodiment of the speech recognition error correction method provided in this application. (Refer to...) Figure 1 The method provided in this embodiment may include:

[0032] Step S101: Extract acoustic features from the received speech to be recognized, input the extracted acoustic features into the acoustic model and decoder for frame-by-frame decoding, and use the decoded text sequence as the first decoding result.

[0033] Specifically, the speech to be recognized is received through methods such as microphone acquisition and audio file import. The speech to be recognized is a discrete-time signal, which is preprocessed by framing (e.g., frame length 25ms, frame shift 10ms), windowing (e.g., using Hanning window to reduce inter-frame signal abrupt interference), and pre-emphasis (e.g., using a first-order high-pass filter to enhance the intensity of high-frequency signals).

[0034] Acoustic features are extracted from the preprocessed speech signal. Optionally, the extracted acoustic features can be MFCC (Mel-Frequency Cepstral Coefficients), FBANK (Filter Bank) features, Pitch (fundamental frequency) features, and i-vector (authentication vector) features, etc. This preserves the core pronunciation features of the speech to be recognized, while achieving downsampling in the time dimension, reducing subsequent computational overhead.

[0035] The extracted acoustic features are input into a pre-trained acoustic model, which outputs a phoneme probability distribution for each frame of speech, such as the probability of each phoneme in the phoneme set {a,o,e,i,u,b,p,m,…}. This phoneme probability distribution, along with a pre-constructed decoding graph (which integrates a pronunciation dictionary, language model, and contextual constraints), is input into a decoder. The decoder uses either the Viterbi algorithm or a bundle search algorithm to perform optimal path search on the decoding graph. The decoded output is the corresponding text sequence, which serves as the first decoding result. The first decoding result includes lexical units obtained after segmenting the text sequence.

[0036] Step S102: Obtain at least one pre - constructed lexical mapping table; the lexical mapping table includes multiple entry groups grouped by pinyin, each entry group contains at least one candidate word, and the candidate words are arranged in descending order of frequency.

[0037] Specifically, collect a large amount of text data such as dictionaries, novels, news, daily conversations, etc., perform word segmentation according to the spaces in the text, count the occurrence frequency of each word, and form a corpus (for example, "record" appears 10,000 times, "airborne" appears 5,000 times, "register" appears 3,000 times, "several roads" appears 2,000 times). The purpose of the corpus is to find the optimal possible collocation relationship between words according to the context information.

[0038] Group the words in the corpus according to the pinyin of each word to obtain entry groups. For example, the entry group corresponding to the pinyin "jizai" is ["record", "airborne"], and the entry group corresponding to the pinyin "jilu" is ["register", "several roads"]; then sort the candidate words in each entry group in descending order of occurrence frequency to form a lexical mapping table. Optionally, in this embodiment, one basic lexical mapping table is constructed, and further it can be extended to multiple differential lexical mapping tables. For different lexical mapping tables, the sorting of candidate words may be different.

[0039] Step S103: Compare the sorting position of each lexical unit in the first decoding result within the entry group with the same pronunciation in each lexical mapping table with a preset threshold, so as to obtain the final decoding result after error correction according to the comparison result.

[0040] Specifically, the preset threshold is a critical value for judging whether the lexical unit in the first decoding result needs error correction. It is an adjustable parameter, and its value determines the retention ratio of the first decoding result. Specifically, it represents the user's acceptance of the first decoding result. The larger N is, the higher the user's acceptance is, and the lexical units in the first decoding result will not need to be replaced and can be directly used as the final decoding result more.

[0041] During specific execution, assume that the preset threshold N = 1. Retrieve each lexical unit ("airborne", "several roads") in the first decoding result within the entry group with the same pronunciation in the lexical mapping table to obtain the comparison result of the sorting position with the preset threshold. For example, "airborne" corresponds to the pinyin "jizai", and its sorting position in the entry group ["record", "airborne"] is 2, which is greater than the preset threshold 1; "several roads" corresponds to the pinyin "jilu", and its sorting position in the entry group ["register", "several roads"] is 2, which is greater than the preset threshold 1. Therefore, selectively replace the lexical units in the first decoding result according to the comparison result to obtain the final decoding result. It can be understood that when the preset threshold N = 2, the first decoding result can be directly used as the final decoding result.

[0042] By constructing a vocabulary mapping table based on large-scale corpus statistics in this embodiment and utilizing the prior knowledge of the frequency distribution of homophones, it is possible to effectively correct common homophone errors in speech recognition (such as misidentifying "record" as "airborne"). Compared with the method that solely relies on the language model, this method has low computational overhead, strong interpretability, and the preset threshold can be flexibly configured to meet the fault tolerance requirements of different application scenarios, effectively correcting the words with the same or similar pronunciations in the first decoding result to obtain a more accurate final decoding result.

[0043] Figure 2 This is the flowchart of the second embodiment of the speech recognition error correction method provided by this application. Referring to Figure 2 , on the basis of the above embodiment, the steps of extracting acoustic features from the received speech to be recognized, inputting the extracted acoustic features into the acoustic model and the decoder for frame-by-frame decoding, and using the decoded text sequence as the first decoding result may include:

[0044] Step S201: Input the acoustic features into the acoustic model to obtain the phoneme probability distribution of each speech frame corresponding to the acoustic features.

[0045] Specifically, the acoustic model outputs the phoneme probability distribution of each speech frame, such as the probabilities of each phoneme in the phoneme set {a, o, e, i, u, b, p, m,...}. The higher the probability value, the greater the possibility that the acoustic features of this speech frame correspond to this phoneme.

[0046] Optionally, the acoustic features include at least one of Mel Frequency Cepstral Coefficients (MFCC), Filter Bank Features (FBANK), Pitch Features (Pitch), or Identity Authentication Vectors (i-vector), or the splicing and fusion of multiple features. Different acoustic features have different advantages (such as MFCC being suitable for general scenarios, FBANK having strong anti-noise ability, and i-vector being suitable for multi-speaker scenarios). By selecting appropriate acoustic features (single feature or fusion feature), different speech recognition scenarios can be adapted.

[0047] The acoustic model is a deep neural network model or a recurrent neural network model, which can be pre-trained using the sample data of speech signals.

[0048] Step S202: Input the phoneme probability distribution and the pre-constructed decoding graph into the decoder together. The decoder performs path search on the decoding graph to output decoding labels frame by frame and accumulates to obtain an output label sequence.

[0049] Specifically, a decoding graph (usually represented by WFST) is a finite-state transducer network that converts a sequence of phonemes (or syllables, initials and finals, etc.) output by an acoustic model into a final text sequence through the constraints of a dictionary and a language model.

[0050] The structure of the decoding graph can be expressed as: . Among them, H is the acoustic model (HMM state), the input is the acoustic feature frame, and the output is the context-dependent phoneme (such as triphone); C is the context-independent mapping that converts the context-dependent phoneme into a context-independent phoneme; L is the dictionary (Lexicon) that maps the phoneme sequence to words; G is the language model (Grammar), usually an N-gram, representing the transition probability between words.

[0051] Load the finite-state transducer network as the decoding graph and input the phoneme probability distribution and the decoding graph into the decoder together. The decoding graph (WFST) can be regarded as a directed graph, where: nodes represent a state (for example, HMM state, phoneme context, word boundary, etc.); directed edges connect nodes, and each edge has an input label, an output label, and a weight. The input label is usually the acoustic modeling unit (phoneme), the output label is the final output text unit (Chinese character or word), and the weight is the negative logarithm probability (the smaller the better). It can be split into acoustic weight, language model weight, and dictionary weight. The decoder can use the Viterbi algorithm to find a path from the start state to the end state in the decoding graph, making the sum of the weights of all edges on this path (cumulative cost) the smallest. That is, calculate the comprehensive score (acoustic score and language score) of each candidate path frame by frame, select the path with the highest total score as the optimal path, output the decoding label frame by frame, and accumulate to obtain the output label sequence.

[0052] Among them, the decoding label can be divided into Chinese characters (such as the recognized characters "记", "载") and non-Chinese character placeholders: "SIL" represents silence or noise, "<SPOKEN_NOISE>" represents the existence of speech, but it belongs to out-of-vocabulary words that cannot be decoded, and "" represents the end of the sentence, that is, the speech end mark.

[0053] Step S203, delete the non-Chinese character placeholders from the output label sequence to obtain the text sequence.

[0054] Specifically, for a speech to be recognized, its decoding result may be: "SIL <SPOKEN_NOISE>记载记录<SPOKEN_NOISE>". Further delete the non-Chinese character placeholders in the output label sequence, remove "SIL", "<SPOKEN_NOISE>", "", and obtain the text sequence.

[0055] Step S204: Use the word units obtained from the segmentation of the text sequence as the first decoding result.

[0056] Specifically, the text sequence is segmented using the “” speech end mark to obtain the lexical units “airborne” and “multi-path”. The first decoding result includes the lexical units segmented in the text sequence.

[0057] By combining the phoneme probability distribution and the decoding graph in this embodiment, the original speech to be recognized is decoded to obtain the first decoding result. Non-Chinese character placeholders and text sequences segmented according to language end marks are deleted, so that the subsequent error correction stage only processes the pure text sequence and avoids noise interference.

[0058] Figure 3 A flowchart of Embodiment 3 of the speech recognition error correction method provided in this application. (Refer to...) Figure 3 The sorting position of each lexical unit in the first decoding result within the same pronunciation word group in each lexical mapping table is compared with a preset threshold to obtain the final decoding result after error correction based on the comparison result. This may include:

[0059] Step S301: If the sorting position of a word unit within a word group with the same pronunciation is within a preset threshold, then the word unit is retained as the corresponding part of the second decoding result; if the sorting position of a word unit within a word group with the same pronunciation is outside the preset threshold, then the word unit is replaced with the candidate word with the highest sorting position within the word group with the same pronunciation, and the second decoding result is obtained.

[0060] Specifically, by setting a preset threshold, word units that do not require error correction and those that do require error correction are divided. Word units that do not require error correction are directly retained, while word units that require error correction are replaced with candidate words using the optimal frequency replacement strategy based on the same pronunciation, thus obtaining the second decoding result.

[0061] During the actual execution, the first decoding result ("airborne", "several routes") and the vocabulary mapping table (the word group corresponding to the pinyin "jizai" ["record", "airborne"], and the word group corresponding to the pinyin "jilu" ["record", "several routes"]) are obtained.

[0062] In the scenario where the preset threshold N=2, the sorting position of each word unit within the corresponding term group is retrieved: "airborne" is sorted at position 2, which is within the preset threshold, so the word unit is retained; "several routes" is sorted at position 2, which is within the preset threshold, so the word unit is retained; therefore, the second decoding result is "airborne several routes" (consistent with the first decoding result).

[0063] In the scenario where the preset threshold N=1, the sorting position of each word unit is retrieved: "airborne" is sorted at position 2, which is outside the preset threshold, so it is replaced with "record" which is the first word in the corresponding word group; "several routes" is sorted at position 2, which is outside the preset threshold, so it is replaced with "record" which is the first word in the corresponding word group; the second decoding result is "record record".

[0064] Optionally, as a possible embodiment, when there are multiple vocabulary mapping tables, the above method may further include the following steps:

[0065] For each word unit in the first decoding result, the candidate word that ranks first in the corresponding word group in each word mapping table is counted; when the ranking position of the word unit in the word group with the same pronunciation is outside the preset threshold, the candidate word that appears most frequently in each word mapping table is taken as the corresponding part of the word unit in the second decoding result.

[0066] Specifically, using only a single lexical mapping table may lead to error correction bias due to the limited source of the corpus (e.g., "airborne" appears more frequently than "record" in a single corpus, but "record" is more commonly used in actual scenarios). By constructing multiple differentiated lexical mapping tables, statistical voting is conducted on the top-ranked candidate words for each lexical unit, and the most frequently occurring candidate word is selected for replacement. This approach leverages the advantages of multiple corpora, reduces the bias of a single corpus, and improves the universality and accuracy of error correction.

[0067] In practice, the following three differentiated vocabulary mapping tables can be constructed:

[0068] Vocabulary Mapping Table 1 (General Corpus: Novels and News): {"jizai":["record","airborne"],"jilu":["record","several routes"]};

[0069] Vocabulary Mapping Table 2 (Industrial Corpus: Texts Related to Professional and Technical Fields): {"jizai":["airborne","record"],"jilu":["several routes","record"]};

[0070] Vocabulary Mapping Table 3 (Common Spoken Language Corpus: Dialogue Recording Transcription): {"jizai":["Record","Airborne"],"jilu":["Several routes","Record"]}.

[0071] When the word unit's ranking position within a group of words with the same pronunciation is outside a preset threshold, for "airborne", the statistics show that "record" appears twice and "airborne" appears once. Therefore, "record" is selected to replace "airborne", resulting in the second decoding result. For "several routes", the statistics show that "several routes" appears twice and "record" appears once. Therefore, no replacement is needed, and the second decoding result is obtained.

[0072] By employing a multi-vocabulary mapping table voting mechanism in this embodiment, the error correction bias caused by the single source of the single-vocabulary mapping table corpus is resolved, making the error correction results more universal and adaptable to the speech recognition needs of different scenarios, especially suitable for situations where the frequency of homophones varies greatly in different scenarios.

[0073] Step S302: Perform string conversion on the second decoding result to obtain the final decoding result.

[0074] Specifically, by converting strings, the remaining format and accent issues in the second decoding result are further addressed, enabling multi-stage layered processing from initial error correction to refined error correction, thereby further improving the accuracy of error correction.

[0075] Optionally, as a possible embodiment, a finite-state converter is used to transform the second decoding result; the finite-state converter receives the second decoding result as an input tag and outputs the final decoding result as an output tag. The finite-state converter predefines a mapping rule between the input string and the output string, and the mapping rule includes at least one of the following:

[0076] Homophone correction rules are used to replace specific characters in a preset vocabulary with another homophone; Chinese character to Arabic numeral conversion rules are used to convert Chinese numerals to Arabic numerals; accent processing rules are used to delete or replace characters caused by dialects or retroflex endings.

[0077] Specifically, leveraging the state transition characteristics of a finite state converter, the second decoding result is used as the input label. Through pre-defined state transition rules (the mapping relationship between input and output labels), the input label is transformed character-by-character and word-by-word, removing accent interference, correcting format deviations, and optimizing semantic expression, ultimately outputting a standardized and accurate final decoding result. This approach encapsulates complex transformation rules into a state transition network, resulting in high computational efficiency and suitability for real-time error correction scenarios.

[0078] During specific implementation, the OpenFST tool is used to construct an FST (finite state transducer), define states (starting state 0, intermediate state 1, ending state 2), set the mapping rules for input labels and output labels (i.e., string conversion rules), and construct a state transition network: the starting state 0 receives an input label and transfers to the intermediate state 1. After the intermediate state 1 completes label conversion, it transfers to the ending state 2, and outputs the converted label sequence.

[0079] Figure 4 The state transition schematic diagram for defining the homophone correction rule for the finite state transducer provided by this application is shown. The homophone correction rule is to replace the original character with another homophone at a certain position in a specific word. For example: Rule 1: Replace "机 (jī)" in "机载 (jī zài)" with "记 (jì)" and "载 (zài)" with "在 (zài)" to get "记在 (jì zài)"; Rule 2: Replace "愤 (fèn)" in "发愤图强 (fā fèn tú qiáng)" with "奋 (fèn)" to get "发奋图强 (fā fèn tú qiáng)". In this way, specific words can be corrected without changing other words or single characters. Referring to Figure 4 , for the input label "机 (jī)", the output label is "记 (jì)", state 0 → 1, for the input label "载 (zài)", the output label is "在 (zài)", state 1 → 2, and "记在 (jì zài)" is obtained.

[0080] Figure 5 The state transition schematic diagram for defining the Chinese character and Arabic numeral conversion rule for the finite state transducer provided by this application is shown. The Chinese character and Arabic numeral conversion rule is to convert the Chinese character representing a number into an Arabic numeral. For example: "十一 (shí yī)" → "11", "二零二三年 (èr líng èr sān nián)" → "2023年", "三百二十亿 (sān bǎi èr shí yì)" → "32000000000". Referring to Figure 5 , for the input label "十 (shí)", the output label is "1", state 0 → 1; for the input label "一 (yī)", the output label is "1", state 1 → 2.

[0081] Figure 6 The state transition schematic diagram for defining the accent processing rule for the finite state transducer provided by this application is shown. The accent processing rule is to process the redundancy or variants caused by dialects or personal pronunciation habits. For example: deletion of erhua sound: "小人儿书 (xiǎo rénr shū)" → "小人书 (xiǎo rén shū)"; nasal sound correction: "湖南 (hú nán)" → "湖南 (hú nán)" (if the user pronounces it as "福南 (fú nán)", it can be converted to "湖南 (hú nán)"); flat and retroflex sound correction: "十四 (shí sì)" → "十四 (shí sì)" (if the user pronounces it as "sisi", it is converted to "shisi" through the rule). Referring to Figure 6 , for the input label "小 (xiǎo)", the output label is "小 (xiǎo)", state 0 → 1; for the input label "人 (rén)", the output label is "人 (rén)", state 1 → 2; for the input label "儿 (r)", the output label (empty, deleting the erhua sound), state 2 → 3; for the input label "书 (shū)", the output label is "书 (shū)", state 3 → 4.

[0082] This approach, employing a finite state converter for string conversion, offers high computational efficiency, enables real-time error correction, and is suitable for real-time speech recognition scenarios (such as voice input methods and real-time conference transcription). Compared to traditional string replacement methods, FST can handle conversion scenarios with consecutive characters and multiple overlapping rules, achieving higher error correction accuracy and effectively resolving various residual issues related to accents, formatting, and semantics.

[0083] This embodiment achieves configurable and interpretable homophone correction through clearly defined comparison rules and replacement logic. Compared with traditional language model reordering, this method requires no additional contextual information, is computationally simple, and ensures priority for high-frequency words, conforming to linguistic statistical patterns. Furthermore, a finite-state converter is used to further convert the second decoding result into a string, allowing for targeted modification of difficult cases requiring error correction using custom rules, thereby expanding the error correction capability and improving the accuracy of speech recognition.

[0084] Figure 7 A flowchart of Embodiment 4 of the speech recognition error correction method provided in this application. (Refer to...) Figure 7 The method includes:

[0085] Step S701: Extract acoustic features from the received speech to be recognized, input the acoustic features into the acoustic model, and obtain the phoneme probability distribution of the speech frame corresponding to each acoustic feature.

[0086] In step S702, the phoneme probability distribution and the pre-constructed decoding graph are input into the decoder. The decoder performs path search on the decoding graph to output decoding tags frame by frame and accumulates the output tag sequence.

[0087] Step S703: Remove non-Chinese character placeholders from the output label sequence to obtain a text sequence; use the word units obtained by segmenting the text sequence as the first decoding result.

[0088] Step S704: For each word unit in the first decoding result, count the candidate word that ranks first in the corresponding word group in each word mapping table; and compare the ranking position of each word unit in the first decoding result in the word group with the same pronunciation in each word mapping table with a preset threshold.

[0089] Step S705: If the sorting position of a word unit within a group of words with the same pronunciation is within a preset threshold, then the word unit is retained as the corresponding part of the second decoding result; if the sorting position of a word unit within a group of words with the same pronunciation is outside the preset threshold, then the candidate word with the highest frequency in each word mapping table is taken as the corresponding part of the word unit in the second decoding result.

[0090] Step S706: The second decoding result is converted using a finite state converter to obtain the final decoding result.

[0091] Specifically, the implementation principles and processes of steps S701 to S706 can be found in the descriptions in the previous embodiments, and will not be repeated here.

[0092] This embodiment employs a three-tiered progressive decoding framework—standard decoding, statistical mapping error correction, and custom rule error correction—which effectively reduces various types of recognition errors, such as homophones, near-homophones, non-standard number formats, and dialect accents, without significantly increasing computational overhead. It is also easy to configure and effectively improves the accuracy of speech recognition.

[0093] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0094] Corresponding to the aforementioned embodiment of a speech recognition error correction method, this application also provides an embodiment of a speech recognition error correction device.

[0095] An embodiment of a speech recognition error correction device disclosed in this application can be applied to a computer device. The device embodiment can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of the computer device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 8 The diagram shown is a hardware structure diagram of a computer device containing the speech recognition error correction device of this application. Except for... Figure 8 In addition to the processor, memory, network interface, and non-volatile memory shown, the computer device in which the device is located in the embodiment may also include other hardware depending on the actual function of the speech recognition error correction device, which will not be described in detail here.

[0096] Figure 9 This is a schematic diagram of the speech recognition error correction device provided in this application. (Refer to...) Figure 9 The apparatus provided in this embodiment includes:

[0097] The first decoding module 10 is used to extract acoustic features from the received speech to be recognized, input the extracted acoustic features into the acoustic model and decoder for frame-by-frame decoding, and use the decoded text sequence as the first decoding result.

[0098] The second decoding module 20 is used to obtain at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group contains at least one candidate word, and the candidate words are arranged in descending order of frequency;

[0099] The second decoding module 20 is also used to compare the sorting position of each word unit in the first decoding result within the word group with the same pronunciation in each word mapping table with a preset threshold, so as to obtain the final decoding result of error correction based on the comparison result.

[0100] The apparatus of this embodiment can be used to perform... Figure 1 The steps of the method embodiment shown are similar in principle and process, and will not be repeated here.

[0101] Optionally, as one possible embodiment, the first decoding module 10 is further configured to:

[0102] The acoustic features are input into the acoustic model to obtain the phoneme probability distribution of the speech frame corresponding to each acoustic feature;

[0103] The phoneme probability distribution and the pre-constructed decoding graph are input into the decoder. The decoder performs path search on the decoding graph to output the decoding tags frame by frame and accumulates them to obtain the output tag sequence.

[0104] Remove non-Chinese character placeholders from the output label sequence to obtain the text sequence;

[0105] The lexical units obtained by segmenting the text sequence are used as the first decoding result.

[0106] Optionally, as a possible embodiment, in the first decoding module 10, the acoustic features include at least one of Mel frequency cepstral coefficients, filter bank features, pitch features, or authentication vectors, or a fusion of multiple features; the acoustic model is a deep neural network model or a recurrent neural network model.

[0107] Optionally, as one possible embodiment, the second decoding module 20 is further configured to:

[0108] If the sorting position of a word unit within a group of words with the same pronunciation is within a preset threshold, then the word unit is retained as the corresponding part of the second decoding result;

[0109] If the word unit's ranking position within a group of words with the same pronunciation is outside a preset threshold, then the word unit is replaced with the candidate word that ranks first within the group of words with the same pronunciation, and a second decoding result is obtained.

[0110] The second decoding result is converted into a string to obtain the final decoding result.

[0111] Optionally, as one possible embodiment, the second decoding module 20 is further configured to:

[0112] For each lexical unit in the first decoding result, count the candidate word that ranks first in the corresponding word group in each lexical mapping table;

[0113] When the ranking position of a word unit within a group of words with the same pronunciation is outside a preset threshold, the candidate word with the highest frequency in each word mapping table is taken as the corresponding part of that word unit in the second decoding result.

[0114] Optionally, as a possible embodiment, the above-described apparatus further includes a third decoding module, used for:

[0115] A finite-state converter is used to transform the second decoding result; the finite-state converter receives the second decoding result as the input tag and outputs the final decoding result as the output tag.

[0116] Optionally, as a possible embodiment, in the third decoding module, the finite state converter predefines a mapping rule between the input string and the output string, and the mapping rule includes at least one of the following:

[0117] Homophone correction rules are used to replace a specific character in a preset vocabulary with another homophone;

[0118] Rules for converting Chinese characters to Arabic numerals; used to convert Chinese numerals to Arabic numerals.

[0119] Accent processing rules are used to delete or replace characters caused by dialects or retroflex endings.

[0120] Continue to refer to Figure 8 This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method in any of the embodiments provided in this application.

[0121] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the methods in any of the embodiments provided in this application.

[0122] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0123] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0124] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0125] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A speech recognition error correction method, characterized in that, include: Acoustic features are extracted from the received speech to be recognized. The extracted acoustic features are then input into the acoustic model and decoder for frame-by-frame decoding. The decoded text sequence is used as the first decoding result. Obtain at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group contains at least one candidate word, and the candidate words are arranged in descending order of frequency; The sorting position of each lexical unit in the first decoding result within the word group with the same pronunciation in each of the lexical mapping tables is compared with a preset threshold, so as to obtain the final decoding result with error correction completed based on the comparison result.

2. The speech recognition error correction method according to claim 1, characterized in that, The step of comparing the sorting position of each lexical unit in the first decoding result within the word group with the same pronunciation in each of the lexical mapping tables with a preset threshold, so as to obtain the final decoding result with completed error correction based on the comparison result, includes: If the word unit's ranking position within a group of words with the same pronunciation is within the preset threshold, then the word unit is retained as the corresponding part of the second decoding result; If the word unit's ranking position within a group of words with the same pronunciation is outside the preset threshold, then the word unit is replaced with the candidate word ranked first within the group of words with the same pronunciation, and the second decoding result is obtained. The second decoding result is converted into a string to obtain the final decoding result.

3. The speech recognition error correction method according to claim 2, characterized in that, When there are multiple vocabulary mapping tables, the method further includes: For each lexical unit in the first decoding result, the candidate word that ranks first in the corresponding word group in each of the lexical mapping tables is counted. When the sorting position of the vocabulary unit within the word group with the same pronunciation is outside the preset threshold, the candidate word with the highest frequency in each of the vocabulary mapping tables is taken as the corresponding part of the vocabulary unit in the second decoding result.

4. The speech recognition error correction method according to claim 2, characterized in that, The step of converting the second decoding result into a string to obtain the final decoding result includes: A finite-state converter is used to transform the second decoding result; the finite-state converter receives the second decoding result as an input tag and outputs the final decoding result as an output tag.

5. The speech recognition error correction method according to claim 4, characterized in that, The finite state converter predefines a mapping rule between the input string and the output string, and the mapping rule includes at least one of the following: Homophone correction rules are used to replace a specific character in a preset vocabulary with another homophone; Rules for converting Chinese characters to Arabic numerals; used to convert Chinese numerals to Arabic numerals. Accent processing rules are used to delete or replace characters caused by dialects or retroflex endings.

6. The speech recognition error correction method according to claim 1, characterized in that, The process of extracting acoustic features from the received speech to be recognized, inputting the extracted acoustic features into an acoustic model and decoder for frame-by-frame decoding, and using the decoded text sequence as the first decoding result includes: The acoustic features are input into the acoustic model to obtain the phoneme probability distribution of the speech frame corresponding to each acoustic feature; The phoneme probability distribution and the pre-constructed decoding graph are input into the decoder. The decoder performs path search on the decoding graph to output decoding tags frame by frame and accumulates the output tag sequence. Remove non-Chinese character placeholders from the output label sequence to obtain the text sequence; The lexical units obtained by segmenting the text sequence are used as the first decoding result.

7. The speech recognition error correction method according to any one of claims 1 to 6, characterized in that, The acoustic features include at least one of Mel frequency cepstral coefficients, filter bank features, pitch features, or authentication vectors, or a fusion of multiple features; the acoustic model is a deep neural network model or a recurrent neural network model.

8. A speech recognition error correction device, characterized in that, include: The first decoding module is used to extract acoustic features from the received speech to be recognized, input the extracted acoustic features into the acoustic model and decoder for frame-by-frame decoding, and use the decoded text sequence as the first decoding result. The second decoding module is used to obtain at least one pre-constructed vocabulary mapping table; the vocabulary mapping table includes multiple word groups grouped by pinyin, each word group contains at least one candidate word, and the candidate words are arranged in descending order of frequency; The second decoding module is further configured to compare the sorting position of each lexical unit in the first decoding result within the word group with the same pronunciation in each of the lexical mapping tables with a preset threshold, so as to obtain the final decoding result with error correction completed based on the comparison result.

9. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the speech recognition error correction method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the speech recognition error correction method according to any one of claims 1 to 7.