Voice command word recognition post-processing method, system and equipment and storage medium
By obtaining phoneme probability matrix and path scores, multi-dimensional recognition judgment and secondary confirmation are performed, the problems of misrecognition, mixed recognition and external word recognition in the recognition of offline voice command words on the end side are solved, and the recognition accuracy and anti-interference ability are improved.
Patent Information
- Application Number
- CN202510933856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-07-08
AI Technical Summary
In the recognition of offline voice command words on the terminal side, due to excessive dependence on the acoustic model and resource limitation, the problems of misrecognition, mixed recognition and external word recognition occur frequently, and it is impossible to effectively balance the anti-interference ability and recognition accuracy.
By obtaining the phoneme probability matrix and command word path scores output by the acoustic model, multi-dimensional recognition problem judgment is carried out, including misidentification, mixed recognition and secondary confirmation of word recognition from set, and analyzing the phoneme probability matrix and command word structure relationship to generate the final recognition result.
In the scenario of restricted offline resources on the end side, the risks of misrecognition, mixed recognition and external word recognition are significantly reduced, and the accuracy and anti-interference ability of voice command word recognition are improved, and the rapid and efficient recognition optimization is achieved.
Smart Images

Figure CN120431904A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech decoding, and in particular to a speech command word recognition post-processing method, system, device and storage medium. Background Art
[0002] In the terminal-side offline voice command word recognition scenario, the existing technology has problems when decoding and recognizing command words by building an acoustic model. This includes over-reliance on the acoustic model effect, which makes it difficult for the multi-condition recognition mechanism to meet all conditions when interfered with. Relaxing the conditions will lead to a significant increase in the misrecognition rate. When there are strict prefix-suffix inclusion, approximation, or symmetry in the command word list, the model is prone to mixed recognition due to terminal-side resource limitations. In addition, in digital-related command words, the model often misidentifies out-of-set words (such as non-target commands such as fan gear 4) as target words. The above situations are essentially due to the fact that under the constraint of terminal resources, the existing recognition schemes find it difficult to balance anti-interference ability and recognition accuracy. In addition, there is a lack of effective processing mechanism for the structural relevance of command words and the scope of out-of-set words, resulting in frequent misrecognition, mixed recognition, and out-of-set word recognition problems, which urgently need to be solved through post-processing technology optimization.
[0003] Therefore, the existing technology is overly dependent on acoustic models and has limited terminal resources, making it unable to accurately recognize command words, resulting in frequent recognition errors, which is a problem that needs to be solved urgently. Summary of the Invention
[0004] The main purpose of this application is to provide a voice command word recognition post-processing method, system, device and storage medium, aiming to solve the technical problem that the existing technology is unable to accurately recognize command words due to excessive reliance on acoustic models and limited terminal resources, resulting in frequent recognition errors.
[0005] In order to achieve the above-mentioned object of the invention, the present application proposes a post-processing method for speech command word recognition, the method comprising: obtaining a phoneme probability matrix and a command word path score output by an acoustic model; Based on the phoneme probability matrix and command word path score, it is preliminarily determined whether there is misrecognition, mixed recognition or out-of-set word recognition; If it is initially determined that there is misrecognition, the score vector is extracted based on the phoneme probability matrix and the number of non-target phonemes is counted to generate a first confirmation result; If it is initially determined that there is mixed recognition, the phoneme sequence of the subsequent frame or the historical frame is obtained from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition, and analyzed based on the command word structure relationship to obtain a second confirmation result; If it is initially determined that there is out-of-word recognition, the key phoneme with the highest score is extracted from the phoneme probability matrix, and the candidate phoneme library is queried to generate a third confirmation result; Based on the first confirmation result, the second confirmation result, or the third confirmation result, a final recognition result is output.
[0006] Furthermore, the step of obtaining the phoneme probability matrix and command word path score output by the acoustic model includes: Receive the phoneme probability distribution output by the acoustic model in each time frame to form a phoneme probability matrix; Based on the phoneme probability matrix, obtaining an optimal phoneme path that matches the command word list through a decoding algorithm, and calculating a comprehensive score of the path; Cache the phoneme probability matrix of the current recognition frame and the historical N frames, where N is a positive integer preset according to the maximum phoneme length of the command word, for subsequent delayed recognition or historical frame analysis; The command word path score is recorded synchronously for use in preliminary judgment of the identification result type.
[0007] Furthermore, the step of preliminarily determining whether there is misrecognition, mixed recognition, or out-of-word recognition based on the phoneme probability matrix and the command word path score includes: If the command word path score is lower than the preset misrecognition threshold, it is preliminarily determined that there is misrecognition; Determine the structural relationship between the current command and each entry in the command word list; If the current command has a preset structural relationship with any word in the command word list, it is initially determined that there is mixed recognition; If it is recognized that the current command word contains numbers and the current command word path score is lower than the out-of-set word trigger threshold, it is preliminarily judged that out-of-set word recognition exists.
[0008] Furthermore, the preset structural relationship includes strict prefix inclusion, strict suffix inclusion, non-strict inclusion, approximate inclusion, and symmetric relationship; if the current command has a preset structural relationship with any word in the command word list, the step of preliminarily determining that there is mixed recognition includes: Extract the phoneme sequence path corresponding to the current recognition result; Perform prefix comparison between the current recognition path and other entries in the command word list. If the phoneme sequence of the short path word completely matches the beginning of the long path word, strict prefix inclusion exists and the initial judgment is that it is a prefix inclusion mixed recognition. If the final phoneme sequence of the long-path word completely matches the short-path word, there is strict suffix inclusion, and it is initially determined to be a suffix inclusion type mixed recognition; Analyze whether the current recognition path is a non-continuous subset of other long path terms in the command word list. If so, there is non-strict inclusion, and it is preliminarily determined to be non-strict inclusion mixed recognition; Calculate the phoneme sequence similarity between the current recognition path and other entries in the command word list. If the similarity exceeds the preset threshold and there are shared phoneme segments, there is approximate inclusion, and it is preliminarily determined to be approximate inclusion type mixed recognition; If it is recognized that the difference between the current command word and other entries in the command word list is symmetrical, then there is a symmetrical relationship, and it is preliminarily determined to be symmetrical mixed recognition.
[0009] Furthermore, if it is preliminarily determined that there is misrecognition, the step of extracting the score vector from the phoneme probability matrix and counting the number of non-target phonemes to generate a first confirmation result includes: If it is initially determined that there is misrecognition, the phoneme probability values corresponding to all non-target command words are extracted from the phoneme probability matrix of the current frame to form a score vector; Counting the number of non-target phonemes in the score vector whose probability values are higher than the target phoneme or whose difference with the target phoneme is within a first preset difference; If the number exceeds a preset number threshold, the current recognition result is determined to be a misrecognition, and a first confirmation result is generated.
[0010] Furthermore, if it is preliminarily determined that mixed recognition exists, the step of obtaining a phoneme sequence of a subsequent frame or a historical frame from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition, and performing analysis based on the command word structure relationship to obtain a second confirmation result includes: If it is a strict prefix inclusion, when the included word is recognized, the subsequent first preset number of frames of phoneme sequence are obtained at a delay to determine whether there is phoneme information related to the included word. If so, it is determined to be mixed recognition and a second confirmation result is generated; If it is a strict suffix inclusion, when the included word is recognized, obtaining a second preset number of frame phoneme sequences in the cache data, determining whether there is phoneme information related to the included word, and if so, determining it as mixed recognition, generating a second confirmation result; If it is not strictly included, within the time range of the short-path phoneme sequence, identify whether there is historical or subsequent frame information of the long-path specific phoneme. If so, it is determined to be mixed recognition, and a second confirmation result is generated; If it is approximately included, delaying the acquisition of a first preset number of subsequent frames of phoneme sequences or acquiring a second preset number of frames of phoneme sequences in the cached data according to the inclusion form, and determining whether there is phoneme information related to the included word. If so, it is determined to be mixed recognition, and a second confirmation result is generated; If it is a symmetrical relationship, when the phoneme score of the symmetrical position of the symmetrical word is lower than the first score threshold, the scores of the two phonemes symmetrical in the symmetrical phoneme position are identified. If the score difference is greater than the first score difference threshold, the current recognition result is determined to be mixed recognition, and a second confirmation result is generated.
[0011] Furthermore, if it is preliminarily determined that out-of-word recognition exists, the step of extracting the key phoneme with the highest score from the phoneme probability matrix, querying the candidate phoneme library, and generating a third confirmation result includes: Extracting key phonemes associated with the current command word in the phoneme probability matrix and determining the phoneme with the highest score; Based on the key phoneme with the highest score, query the pre-established candidate phoneme library to obtain the scores of the relevant candidate phonemes; If the score of the relevant candidate phoneme exceeds the preset candidate threshold or the difference with the key phoneme score is less than the set value, it is determined that the current recognition is an out-of-word recognition, and a third confirmation result is generated.
[0012] A second aspect of the present application also includes a voice command word recognition and post-processing system, comprising: An acquisition module is used to obtain the phoneme probability matrix and command word path score output by the acoustic model; A preliminary judgment module is used to preliminarily judge whether there is misrecognition, mixed recognition or out-of-set word recognition based on the phoneme probability matrix and the command word path score; A misidentification secondary confirmation module is used to extract the score vector based on the phoneme probability matrix and count the number of non-target phonemes to generate a first confirmation result if the initial misidentification is determined to be present; A mixed recognition secondary confirmation module is used to obtain the phoneme sequence of subsequent frames or historical frames from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition if mixed recognition is initially determined to exist, and analyze it based on the command word structure relationship to obtain a second confirmation result; The out-of-word secondary confirmation module is used to extract the key phoneme with the highest score from the phoneme probability matrix if it is initially determined that an out-of-word exists, query the candidate phoneme library, and generate a third confirmation result; The output module is used to output a final recognition result based on the first confirmation result, the second confirmation result or the third confirmation result.
[0013] The third aspect of the present application also includes a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0014] The fourth aspect of the present application also includes a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0015] This application can effectively improve the accuracy and anti-interference ability of voice command word recognition by obtaining the phoneme probability matrix and path score and performing multi-dimensional recognition problem judgment and processing. For misrecognition, a secondary confirmation mechanism is activated to eliminate unreliable recognition by counting the number of non-target phonemes; for mixed recognition, subsequent or historical frame phoneme sequence analysis is extracted based on the command word structure relationship to solve the confusion problem caused by different types of structures; for out-of-set words, key phonemes are compared with the candidate phoneme library to eliminate number-related out-of-bounds recognition. This solution does not require retraining the model and can use the post-processing mechanism to efficiently handle three types of recognition problems. In scenarios where offline resources on the end side are limited, it can not only balance recognition sensitivity and misrecognition rate, but also improve the recognition robustness of complex command word lists through structured analysis, significantly reducing the risks of misrecognition, mixed recognition and out-of-set word recognition, and achieving fast and efficient recognition optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flowchart of a method for post-processing voice command word recognition according to an embodiment of the present application; Figure 2 This is a schematic block diagram of the structure of a voice command word recognition and post-processing system according to an embodiment of the present application; Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of the present application.
[0017] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0019] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "above", and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and or" used herein includes all or any module and all combinations of one or more associated listed items.
[0020] Those skilled in the art will understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art in the art to which this invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless specifically defined as such, will not be interpreted in an idealized or overly formal sense.
[0021] Reference Figure 1 The embodiment of the present invention provides a method for post-processing speech command word recognition, including steps S1-S6, specifically: S1. Obtain the phoneme probability matrix and command word path score output by the acoustic model; S2, based on the phoneme probability matrix and the command word path score, preliminarily judge whether there is misrecognition, mixed recognition or out-of-set word recognition; S3. If it is preliminarily determined that there is misrecognition, extract the score vector based on the phoneme probability matrix and count the number of non-target phonemes to generate a first confirmation result; S4. If it is preliminarily determined that there is mixed recognition, obtain the phoneme sequence of the subsequent frame or the historical frame from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition, analyze it based on the command word structure relationship, and obtain a second confirmation result; S5. If it is preliminarily determined that out-of-word recognition exists, extract the key phoneme with the highest score from the phoneme probability matrix, query the candidate phoneme library, and generate a third confirmation result; S6. Output a final recognition result based on the first confirmation result, the second confirmation result, or the third confirmation result.
[0022] As described in step S1, the phoneme probability distribution output by the acoustic model at each time frame is first received in real time through the interface. For example, a vector containing the probability values corresponding to all phonemes is generated for each frame, and the vectors of consecutive frames are arranged in chronological order to form a two-dimensional phoneme probability matrix (e.g., the dimension is T×N, where T is the number of frames and N is the number of phoneme categories). At the same time, the probability matrix is processed using decoding algorithms such as Viterbi, and the command word list is traversed to match the optimal phoneme path. The comprehensive path score is calculated by accumulating or multiplying the probability values of each phoneme. To support subsequent delayed recognition and historical frame analysis, the system will cache the phoneme probability matrix of the current recognition frame and N historical frames according to preset rules (N is usually set according to the maximum phoneme length of the command word, such as N is set to 10 if the longest command word contains 8 phonemes), and synchronously record the path score of each command word in the cache data structure.
[0023] At the data processing level, the phoneme probability matrix is normalized to eliminate the impact of numerical fluctuations. Algorithms such as Dynamic Time Warping (DTW) can be introduced into path score calculation to optimize matching accuracy. In different implementations, caching strategies can use a ring buffer to conserve memory or dynamically adjust the N value based on the scenario (e.g., increasing N in noisy environments to retain more historical information).
[0024] This step uses a caching mechanism to provide a data foundation for delayed review analysis of subsequent mixed recognition and secondary confirmation of misidentification, avoiding resource consumption caused by repeated calls to the acoustic model. For example, when processing the "turn on the air conditioner" command, the acoustic model outputs a 10-frame phoneme probability matrix. The decoding algorithm finds the corresponding phoneme path and calculates the score, while caching these 10 frames of data. If a subsequent mixed recognition is determined (such as possible confusion with "turn on the air conditioner to dehumidify"), the cached historical frame data can be directly called for subsequent analysis without regenerating the probability matrix, improving processing efficiency.
[0025] As described in step S2, the system first establishes a statistically based scoring threshold discrimination model: by collecting the score distribution data of correct and incorrect recognition of command words in actual scenarios (for example, collecting 1,000 sets of recognition samples in noisy environments), the critical threshold for false recognition is fitted (usually set to 0.7, which can be dynamically adjusted through cross-validation). When the combined score of the command word path decoded by the acoustic model falls below this threshold, a preliminary false recognition flag is immediately triggered. For example, if the user issues the command "turn on the lights" and the decoding score is only 0.65 (below the threshold of 0.7), the system preliminarily determines that there is a risk of false recognition.
[0026] At the data processing level, score calculation incorporates temporal smoothing: a weighted average of the path scores for five consecutive frames is taken (with the most recent frame receiving a weight of 0.3, and older frames receiving a weight that decreases sequentially) to mitigate misjudgments caused by noise in a single frame. In different implementations, the threshold can be dynamically adjusted based on the scenario—raising it to 0.8 in quiet environments to reduce misjudgments and lowering it to 0.6 in noisy environments to ensure recognition. This adaptive threshold strategy keeps the misjudgment rate below 5% across different scenarios.
[0027] At the same time, the system pre-stores a structural relationship database of the command word list, and extracts the structural association between the current recognition command and other entries in the list through a string matching algorithm, such as calculating the prefix matching degree, suffix overlap rate and subsequence inclusion relationship of the phoneme sequence.
[0028] Specifically, the defined structural associations include: Strict prefix inclusion: That is, one command word is the prefix of another command word, such as "turn on the air conditioner" and "turn on the air conditioner to dehumidify". For example, when "turn on the air conditioner" is recognized, the system extracts its phoneme sequence "dǎ", "kāi", "kōng", "tiáo", and compares it with the first half of the phoneme sequence of "turn on the air conditioner to dehumidify". If it matches exactly, it is determined that there is a risk of misrecognition due to prefix inclusion. This process is implemented through a string prefix matching algorithm, and the matching accuracy can be refined to the pronunciation feature parameters of phonemes (such as pitch and length).
[0029] Strict suffix inclusion: That is, one command word is the suffix of another command word, such as "turn off the light" and "turn off the light ten minutes later". For example, it is a comparison of the last phoneme sequences of short-path words and long-path words. Here, short and long are comparative descriptions obtained from the comparison of phoneme sequences. Taking "turn off the light" as an example, if its phoneme sequence "guān", "dēng" is exactly the same as the last phoneme sequence of "turn off the light ten minutes later", the suffix inclusion type misrecognition mark is triggered. The system achieves efficient matching by traversing the phoneme sequence in reverse, and a minimum matching length threshold (such as 80% of the number of phonemes in the short-path word) can be set to reduce misjudgment.
[0030] Non-strict inclusion: That is, the recognition path of one command word is a subset of another command word, such as "lowest brightness" and "brightest". For example: The subsequence matching algorithm is used to analyze whether the current recognition path is a non-continuous subset of the long-path word. For example, if the phoneme sequence "zuì", "liàng" of "brightest" exists in the phoneme sequence "zuì", "dī", "liàng", "dù" of "lowest brightness" in a non-continuous manner, and the path score is lower than a preset threshold (such as 0.7), it is determined as non-strict inclusion type misrecognition. Here, the longest common subsequence (LCS) is calculated through the dynamic programming algorithm. For example, a mark is triggered when the proportion of the subsequence length to the number of phonemes in the long-path word exceeds 50%.
[0031] Approximate inclusion means that two command words are mostly similar, such as "white light lamp" and "turn off the light". The edit distance algorithm (such as Levenshtein distance) is used to calculate the similarity of phoneme sequences. Taking "white light lamp" and "turn off the light" as an example, the system compares the phoneme sequence "bái", "guāng", "dēng" with "guān", "dēng". If the similarity exceeds 0.8 (determined by calculating the minimum cost of substitution, insertion, and deletion operations) and the length of the shared phoneme segment ≥ 2, it is marked as approximate inclusion type misrecognition.
[0032] Symmetry refers to the difference between the results of two command words, such as "Play previous song" and "Play next song." For command words with symmetrical structures, such as "Play previous song" and "Play next song," the system first locates the phonemes in symmetrical positions (such as "up" and "down") and calculates the score difference. If the score difference is less than 0.1 and the path structure is mirror-symmetric (for example, the rest of the structure is identical except for the symmetrical phoneme), it is determined to be a symmetrical mixed recognition risk. This process uses a predefined symmetric word list and position index to achieve rapid positioning.
[0033] For number-related command words (such as fan speed), the system establishes a digital range constraint library: First, the system identifies the numerical component in the command word (using pronunciations such as "yīèrsān" in the phoneme sequence). If the current command word is "fourth gear" and the fan only supports "first through third gears," and the path score is ≤0.75, the system triggers a preliminary judgment of an out-of-set word. For example, if the user mistakenly says "fifth gear," the system detects that the number "five" is outside the preset range (1-3), and the score of 0.68 is below the threshold, preliminarily determining that it is an out-of-set word.
[0034] In step S3, accurate secondary confirmation of misidentification is achieved by quantifying the degree of interference of non-target phonemes. When step S2 preliminarily determines that there is a risk of misidentification (such as the command word path score is lower than 0.7), the system extracts the phoneme probability values corresponding to all non-target command words from the current frame phoneme probability matrix to form a score vector with a dimension of N×1 (N is the total number of phoneme categories). For example, the phoneme of the target command word "turn on the light" is "kāidēng", then the score vector needs to exclude the probability values of these two phonemes and retain the probability data of other phonemes such as "shānguān". When processing data, the probability matrix is first softmax normalized to eliminate numerical fluctuations between different frames, and then the target phonemes are quickly filtered through the mask matrix to improve extraction efficiency. Subsequently, the system counts the number of non-target phonemes in the score vector that meet the following conditions: The probability value of a single phoneme is higher than the maximum probability corresponding to the target phoneme; or the difference from the probability of the target phoneme is less than a first preset difference (such as 0.15, which can be obtained by fitting historical misrecognition data). Taking the recognition of "turn on the light" in a noisy environment as an example, if the acoustic model outputs the phoneme probability of "shān" (mountain) as 0.6 due to noise, while the target phoneme "kāidēng" has a maximum probability of 0.55, "shān" will be counted as an interfering phoneme. If the number of similar interfering phonemes exceeds a preset threshold (such as 2), the current recognition is determined to be a misrecognition, and a first confirmation result is generated, rejecting the execution (confirming that the current recognition is a misrecognition).
[0035] The advantage of this step is that it replaces traditional full re-recognition with "quantification of non-target phoneme interference," eliminating misidentifications caused by noise without requiring additional model calculations. For example, if a user says "open the curtains" and the system mistakenly recognizes "turn on the air conditioner," the probabilities of the non-target phoneme "chuānglián" are 0.6 and 0.5, respectively, while the target phoneme "kōngtiáo" has the highest probability of 0.45. If the number of interfering phonemes reaches two (exceeding the threshold of 1), the system will immediately detect the misidentification and correct it, reducing the misidentification rate by 45% in noisy environments. Furthermore, this mechanism does not rely on model iteration; it adapts to different scenarios solely through post-processing rules, enabling lightweight and efficient optimization on the end device.
[0036] As described in step S4 above, accurate disambiguation of mixed recognition is achieved through temporal phoneme analysis based on the structural relationship of command words. Specifically, there are five types of differentiated processing processes for abnormalities: When it is preliminarily determined in step S2 that there is mixed recognition, it is necessary to obtain the phoneme sequence of the subsequent frame or historical frame from the phoneme probability matrix according to the corresponding abnormality type (strict prefix inclusion, strict suffix inclusion, non-strict inclusion, approximate inclusion and symmetric relationship), and analyze it based on the command word structure relationship to obtain the second confirmation result. Specifically, for strict prefix inclusion (such as "turn on the air conditioner" and "turn on the air conditioner to dehumidify"), when the included word is recognized, the subsequent phoneme sequence of 5 frames is obtained with a delay, and the subsequent key phonemes of the included word (such as "chúshī") are matched frame by frame through a sliding window. For example, if more than 3 frames are matched in a row and the single-frame probability is ≥0.6 or the matching degree exceeds 80%, it is determined that the current recognition result is mixed recognition. It can avoid the early confirmation of short-path words and improve the recognition rate of long-path words through time buffering. Compared with the no-delay strategy, the prefix inclusion type mixed recognition rate is reduced; For strict suffix inclusion (such as "turn off the lights" and "turn off the lights ten minutes later"), when the included word is recognized, the phoneme sequence of the first five frames is extracted from the cached historical 10 frames. The prefix phoneme of the long path word (such as "shífēnzhōng") is matched using the reverse KMP algorithm. If there are more than two consecutive starting phonemes in the historical frames and the single-frame probability is ≥0.5, or the prefix matching length accounts for more than 60% of the long path word, a correction is triggered. By backtracking the historical frames, missed recognition caused by temporal dependence is compensated, thereby improving the recognition accuracy of suffix inclusion scenarios. For non-strict inclusion (such as "brightest" and "lowest brightness"), the longest common subsequence of the short path word and the long path word is calculated through dynamic programming. If the length of the subsequence accounts for more than 50% of the number of phonemes in the long path word and the sum of the missing phoneme scores of the long path word in the subsequent frames exceeds 0.7, it is determined as a mixed recognition. For example: The LCS of "brightest" (phonemes "zuìliàng") and "lowest brightness" ("zuìdīliàngdù") is 2, accounting for 50% of the long path word. If the scores of "dīdù" in the subsequent frames are 0.6 and 0.58 respectively, and the total score exceeds 0.7, it is determined that the current recognition result is a mixed recognition and can be corrected to "lowest brightness" in the later stage. This method can solve the mixed recognition problem caused by non-continuous subsets. Compared with the scheme that only relies on path scores, the mixed recognition rate of non-strict inclusion types is reduced.
[0037] For approximate inclusion (such as "white light" and "turn off the light"), after calculating the edit distance, the phoneme sequence is extracted by delaying or backtracking according to the inclusion form. For example, when calculating the edit distance between the current recognition path and the approximate word (the Levenshtein distance between "white light" and "turn off the light" is 2), if it is an approximate prefix inclusion, it is delayed by 3 frames, and if it is an approximate suffix inclusion, it is backtracked by 2 frames to extract the phoneme sequence. If there are different phonemes and the probability ≥ 0.6 or the overall similarity exceeds 0.8, it is corrected. For example, when recognizing "turn off the light", if the edit distance from "white light" is 2, and the phonemes "báiguāng" appear in the delayed frames (probabilities 0.7 and 0.6), it is determined as an approximate inclusion type of mixed recognition and corrected to "white light". By adapting different approximate structures through dynamic strategies, the recognition accuracy of approximately pronounced words is improved.
[0038] For symmetric mixed recognition (such as "previous" and "next" in "previous song" and "next song"), the phoneme probabilities of 2 frames before and after the symmetric position are obtained, and the score difference is calculated. If the score difference of the symmetric phonemes ≤ 0.2 and the context phoneme paths are exactly the same, two-way confirmation is started. If the phoneme scores in the subsequent frames in the symmetric direction are higher (such as the score of "next" is 0.7, higher than 0.5 of "previous"), it is corrected to the corresponding direction word. Example: When recognizing "play the previous song", the score of the phoneme "previous" is 0.55, and the score of "next" is 0.58. The score difference 0.03 ≤ 0.2, and the context phonemes of "next" in the subsequent frames are more matched, so it is corrected to "play the next song". It can solve the problem of direction misjudgment caused by symmetric structures and improve the recognition accuracy of symmetric words.
[0039] This step effectively solves the confusion problem of the model recognizing command words caused by the structural relationship of command words through the cache of historical frames and the delay acquisition mechanism, and improves the recognition robustness.
[0040] As described in S5 above, when it is preliminarily determined that there is out-of-set word recognition (the command word is recognized to contain numbers and the path score is lower than the out-of-set word trigger threshold), the first step is to eliminate out-of-bounds recognition by comparing the key phonemes with the candidate phoneme library. Specifically, the system first extracts the key phonemes associated with the current command word from the phoneme probability matrix (such as the phoneme "sì" corresponding to the number "four"), and determines the phoneme with the highest score. Then, based on the key phonemes, the system queries the pre-established candidate phoneme library (such as the target phonemes such as "yīèrsān" pre-stored in the fan gear scene) to obtain the scores of the relevant candidate phonemes. If there are candidate phonemes with scores exceeding the preset candidate threshold (such as 0.6) or the difference with the key phoneme score is less than the set value (such as 0.15), the current recognition is determined to be out-of-set word recognition (such as recognizing "fourth gear" when the fan only supports three gears), and a third confirmation result is generated to confirm that it is out-of-set word recognition, and the output result of the current model is rejected. For example, when the user mistakenly says "Fan level five", the system extracts the phoneme "wǔ" with a score of 0.5 and the candidate phoneme "sān" with a score of 0.65. Because the difference of 0.15 ≤ the set value, it is judged as an out-of-word word, avoiding the execution of invalid instructions and further reducing the probability of incorrect recognition due to out-of-word recognition.
[0041] As described in step S6, based on the confirmation results of misrecognition, mixed recognition, and out-of-word recognition, the final recognition result is output. If the final confirmation is misrecognition or out-of-word recognition, the current recognition result is rejected; if it is mixed recognition, it is corrected to the correct command word to ensure the output of a reliable instruction.
[0042] In one embodiment, the step of obtaining the phoneme probability matrix and command word path score output by the acoustic model includes: S10, receiving the phoneme probability distribution output by the acoustic model in each time frame to form a phoneme probability matrix; S11. Based on the phoneme probability matrix, obtain the optimal phoneme path that matches the command word list through a decoding algorithm, and calculate the comprehensive score of the path; S12, caching the phoneme probability matrix of the current recognition frame and the historical N frames, where N is a positive integer preset according to the maximum phoneme length of the command word, for subsequent delayed recognition or historical frame analysis; S13. Synchronously record the command word path score for use in preliminary judgment of the identification result type.
[0043] In this embodiment, an interface receives the phoneme probability distribution output by the acoustic model for each time frame in real time. The probability vectors for each frame are arranged in chronological order to form a two-dimensional phoneme probability matrix (e.g., T×N dimensions, where T is the number of frames and N is the number of phoneme categories). The matrix is processed using a decoding algorithm such as Viterbi. The command word list is traversed to match the optimal phoneme path. A comprehensive score is calculated by accumulating or multiplying the probabilities of each phoneme. The value N is preset based on the maximum phoneme length of the command word (e.g., N is set to 10 if the longest command word contains 8 phonemes). A circular buffer is used to cache the current and past N frames of the matrix, and the path scores are simultaneously recorded in the cache structure. During data processing, the matrix is normalized to eliminate fluctuations, and the DTW algorithm is used in the score calculation to optimize matching accuracy. The caching strategy allows for dynamic adjustment of the value N (e.g., increasing N in noisy environments), conserving memory while retaining sufficient historical information. This step provides the data foundation for subsequent mixed recognition delay analysis and false recognition reconfirmation, avoiding repeated model calls. For example, when processing "turn on the air conditioner", 10 frames of matrices are cached. After decoding to obtain the path score, if subsequent judgments are mixed with "turn on the air conditioner for dehumidification", the cached data analysis can be directly called to improve efficiency.
[0044] In one embodiment, the step of preliminarily determining whether there is misrecognition, mixed recognition, or out-of-word recognition based on the phoneme probability matrix and the command word path score includes: S20: If the command word path score is lower than the preset misrecognition threshold, it is preliminarily determined that misrecognition occurs; S21, determining the structural relationship between the current command and each entry in the command word list; S22: If the current command has a preset structural relationship with any word in the command word list, it is preliminarily determined that there is mixed recognition; S23. If it is recognized that the current command word contains a number and the current command word path score is lower than the out-of-set word trigger threshold, it is preliminarily determined that out-of-set word recognition exists.
[0045] In this embodiment, the system first compares the command word path score with a preset false recognition threshold (e.g., 0.7, based on a distribution fit of correct and false recognition scores in historical data). If the score falls below the threshold, a preliminary misrecognition risk is determined. This process uses a weighted average of the scores for five consecutive frames to smooth out the effects of noise. Simultaneously, a string matching algorithm is used to extract the structural relationship between the current command and the command word list. Five predefined modes are defined: strict prefix-suffix containment, non-strict containment, approximate containment, and symmetric relationship. For prefix containment, such as "turn on the air conditioner" and "turn on the air conditioner dehumidification," a forward longest match is used to determine whether the short path word completely matches the initial phoneme of the long path word. For suffix containment, such as "turn off the lights" and "turn off the lights in ten minutes," a reverse match is performed on the final phoneme sequence. Non-strict containment uses dynamic programming to calculate subsequence matching. Approximate containment uses edit distance to determine phoneme sequence similarity. Symmetric relationship locates differences in the scores of symmetrical phonemes (e.g., "up and down"). If a command word containing a number (e.g., "four gears") is recognized and its score falls below the out-of-set threshold (e.g., 0.75), a predefined numeric range (e.g., fan gears 1-3) is used to preliminarily determine whether it is an out-of-set word. This mechanism uses multi-dimensional rules to quickly screen for anomalies. For example, when a user says "fan level five", the score of 0.68 is lower than the threshold and the number is out of bounds. The preliminary judgment is completed within 0.05 seconds, reducing computing power consumption by 40% compared to full model analysis.
[0046] In one embodiment, the preset structural relationship includes strict prefix inclusion, strict suffix inclusion, non-strict inclusion, approximate inclusion, and symmetric relationship; if the current command and any term in the command word list have the preset structural relationship, the step of preliminarily determining that there is mixed recognition includes: S30, extracting the phoneme sequence path corresponding to the current recognition result; S31. Perform prefix comparison on the current recognition path and other entries in the command word list. If the phoneme sequence of the short path word completely matches the starting part of the long path word, strict prefix inclusion exists and it is preliminarily determined to be prefix inclusion mixed recognition. S32. If the final phoneme sequence of the long path word completely matches the short path word, then strict suffix inclusion exists, and it is preliminarily determined to be suffix inclusion type mixed recognition; S33, analyzing whether the current recognition path is a non-continuous subset of other long path terms in the command word list. If so, non-strict inclusion exists, and it is preliminarily determined to be non-strict inclusion mixed recognition; S34, calculating the phoneme sequence similarity between the current recognition path and other entries in the command word list. If the similarity exceeds a preset threshold and there is a shared phoneme segment, there is approximate inclusion, and it is preliminarily determined to be approximate inclusion type mixed recognition; S35. If it is recognized that the difference between the current command word and other entries in the command word list is symmetrical, then a symmetrical relationship exists, and it is preliminarily determined to be symmetrical mixed recognition.
[0047] In this embodiment, the system extracts five structural relationships from the command word list: strict prefix inclusion, strict suffix inclusion, non-strict inclusion, approximate inclusion, and symmetric relationship. After extracting the phoneme sequence path corresponding to the current recognition result, a multi-dimensional algorithm is used to perform a preliminary mixed recognition judgment. During prefix comparison, if the phoneme sequence of the short path word completely matches the initial part of the long path word, such as the phoneme sequence of "turn on the air conditioner" completely matches the first half of "turn on the air conditioner to dehumidify", strict prefix inclusion exists and the preliminary judgment is prefix inclusion mixed recognition. If the phoneme sequence at the end of the long path word completely matches the short path word, such as the phoneme sequence of "turn off the lights" is consistent with the end of "turn off the lights in ten minutes", strict suffix inclusion exists and the preliminary judgment is suffix inclusion mixed recognition. The system analyzes whether the current recognition path is a non-contiguous subset of other long path terms. For example, if the phoneme sequence of "brightest" is a non-contiguous subset of the phoneme sequence of "lowest brightness", the preliminary judgment is non-strict inclusion mixed recognition. By calculating the similarity of phoneme sequences, if the similarity between the phoneme sequences of "white light" and "turn off the light" exceeds the preset threshold and there are shared phoneme segments, approximate inclusion exists, and the initial judgment is made for approximate inclusion type mixed recognition. If the difference between the current command word and other entries is symmetrical, such as the symmetrical structure of the "up" and "down" differences between "play previous song" and "play next song", a symmetrical relationship exists, and the initial judgment is made for symmetrical mixed recognition. This process uses forward longest matching, reverse matching, dynamic programming to calculate the longest common subsequence, and edit distance algorithms. Structural analysis can be completed within 50ms on the end side, and mixed recognition risks can be flagged in advance, improving detection efficiency compared to traditional models.
[0048] In one embodiment, if it is preliminarily determined that there is misrecognition, the step of extracting a score vector from the phoneme probability matrix and counting the number of non-target phonemes to generate a first confirmation result includes: S40, if it is preliminarily determined that there is misrecognition, extract the phoneme probability values corresponding to all non-target command words from the current frame phoneme probability matrix to form a score vector; S41, counting the number of non-target phonemes in the score vector whose probability values are higher than the target phoneme or whose difference with the target phoneme is within a first preset difference; S42: If the number exceeds a preset number threshold, the current recognition result is determined to be a misrecognition, and a first confirmation result is generated.
[0049] In this embodiment, when a preliminary misrecognition is determined, the system extracts the phoneme probabilities corresponding to all non-target command words from the current frame's phoneme probability matrix. This is then filtered through a mask matrix to form a score vector. For example, if the target command word "turn on the light" is "kāidēng," the score vector retains the probability data for other phonemes, such as "shānguān," and the probability matrix undergoes softmax normalization to eliminate numerical fluctuations. The score vector then counts the number of non-target phonemes that meet certain criteria: if the probability of a single phoneme exceeds the maximum probability of the target phoneme, or if the difference from the probability of the target phoneme is less than a first preset difference (e.g., 0.15, based on fitting historical misrecognition data), the interfering phonemes are counted. If this number exceeds a preset threshold (e.g., 2, which can be adjusted dynamically based on the scenario), a misrecognition is determined, and a first confirmation result, rejecting the execution, is generated.
[0050] In terms of implementation, the threshold policy supports dynamic adaptation: in quiet scenarios, the number threshold is set to 1 for strict filtering, while in noisy scenarios, it is relaxed to 3 to prevent missed detections. The difference threshold can be adjusted in real time based on the signal-to-noise ratio (SNR). For example, for every 5dB decrease in SNR, the difference threshold increases by 0.05. The statistical algorithm utilizes parallel vector operations for acceleration, keeping single-frame processing time under 10ms. This mechanism quantifies the interference level of non-target phonemes, replacing traditional full-scale re-recognition and eliminating noise-induced false positives without requiring additional model calculations. For example, if the system mistakenly recognizes a user saying "open the curtains" as "turn on the air conditioner," if the probabilities of the non-target phoneme "chuānglián" are 0.6 and 0.5, respectively, while the target phoneme has the highest probability of 0.45, and the number of interfering phonemes exceeds the threshold by two, the system immediately declares a false positive. This reduces the false positive rate in noisy environments by 45%. This adaptability to different scenarios does not rely on model iteration, enabling lightweight and efficient optimization on the device side.
[0051] In one embodiment, if it is preliminarily determined that mixed recognition exists, the step of obtaining a phoneme sequence of a subsequent frame or a historical frame from a phoneme probability matrix according to the abnormality type corresponding to the mixed recognition, and performing analysis based on the command word structure relationship to obtain a second confirmation result includes: S50, if it is a strict prefix inclusion, when the included word is recognized, delaying obtaining a first preset number of subsequent frames of phoneme sequence to determine whether there is phoneme information related to the included word, and if so, determining it as mixed recognition, generating a second confirmation result; S51, if it is a strict suffix inclusion, when the included word is recognized, obtaining a second preset number of frame phoneme sequences in the cached data, determining whether there is phoneme information related to the included word, and if so, determining it as mixed recognition, generating a second confirmation result; S52: If it is not strictly included, identify whether there is historical or subsequent frame information of the long-path specific phoneme within the time range of the short-path phoneme sequence. If so, determine it as mixed recognition and generate a second confirmation result. S53: If the inclusion is approximate, obtaining a subsequent first preset number of frames of phoneme sequences or obtaining a second preset number of frames of phoneme sequences in the cached data after a delay according to the inclusion form, and determining whether there is phoneme information related to the included word. If so, it is determined to be mixed recognition, and a second confirmation result is generated; S54. If it is a symmetrical relationship, when the phoneme score of the symmetrical position of the symmetrical word is lower than the first score threshold, the scores of the two phonemes symmetrical in the symmetrical phoneme position are identified. If the score difference is greater than the first score difference threshold, the current recognition result is determined to be mixed recognition, and a second confirmation result is generated.
[0052] In this embodiment, when a preliminary determination of mixed recognition occurs, the system analyzes the time-series phoneme sequence from the phoneme probability matrix based on the anomaly type to generate a second confirmation result. For strict prefix inclusion, upon identifying the included word, the subsequent frame phoneme sequence is delayed to match the key phoneme of the included word. For strict suffix inclusion, the historical frame phoneme sequence is retrieved and the prefix phoneme of the long path word is traced back. For non-strict inclusion, within a short path time range, historical or subsequent frame information of specific phonemes in the long path is detected. For approximate inclusion, the phoneme sequence is delayed or traced back based on the inclusion form to match differential phonemes. For symmetrical relationships, when the symmetrical phoneme score falls below a threshold, the difference in symmetrical phoneme scores is compared. This mechanism utilizes cached historical frame data and, through lightweight algorithms such as DTW temporal alignment and reverse matching, completes analysis on the client side within 50ms. For example, in a smart home, delayed recognition of "turn on the air conditioner" avoids misidentification as "turn on the air conditioner to dehumidify," significantly reducing the mixed recognition rate and adapting to complex command word structures without requiring model iteration.
[0053] In one embodiment, if it is preliminarily determined that out-of-word recognition exists, the step of extracting the key phoneme with the highest score from the phoneme probability matrix, querying the candidate phoneme library, and generating the third confirmation result includes: S60, extracting key phonemes associated with the current command word from the phoneme probability matrix, and determining the phoneme with the highest score; S61. Based on the key phoneme with the highest score, query a pre-established candidate phoneme library to obtain scores of relevant candidate phonemes; S62: If the score of the relevant candidate phoneme exceeds the preset candidate threshold or the difference with the key phoneme score is less than the set value, it is determined that the current recognition is an out-of-word recognition, and a third confirmation result is generated.
[0054] In this embodiment, when it is preliminarily determined that there is out-of-set word recognition, the system extracts the key phonemes associated with the current command word from the phoneme probability matrix (such as the phoneme "sì" corresponding to the number "four"), and determines the phoneme with the highest score. Based on the phoneme, the system queries the pre-established candidate phoneme library (such as the target phonemes such as "yīèrsān" pre-stored in the fan gear scene) to obtain the scores of the candidate phonemes. If the candidate phoneme score exceeds the preset threshold (such as 0.6) or the difference with the key phoneme score is less than the set value (such as 0.15), it is determined to be out-of-set word recognition (such as recognizing "fourth gear" when the fan only supports three gears). The threshold can be dynamically adjusted according to the environment (such as relaxing the difference to 0.2 in a noisy environment), and the computing power consumption on the end side is reduced by lightweight rule matching instead of model iteration. For example, when a user mistakenly says "Fan level five", the extracted phoneme "wǔ" scores 0.5, and the candidate phoneme "sān" scores 0.65. Because the difference 0.15 ≤ the set value, it is judged as an out-of-word word, avoiding the execution of invalid instructions and reducing the out-of-word recognition rate by more than 60%.
[0055] Reference Figure 2 , is a structural block diagram of a voice command word recognition and post-processing system in one embodiment of the present application, the device includes: An acquisition module 100 is used to obtain the phoneme probability matrix and command word path score output by the acoustic model; A preliminary judgment module 200 is used to preliminarily judge whether there is misrecognition, mixed recognition or out-of-word recognition based on the phoneme probability matrix and the command word path score; The misidentification secondary confirmation module 300 is used to extract the score vector based on the phoneme probability matrix and count the number of non-target phonemes to generate a first confirmation result if the preliminary judgment is that there is misidentification; The mixed recognition secondary confirmation module 400 is used to obtain the phoneme sequence of the subsequent frame or the historical frame from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition if the mixed recognition is initially determined to exist, and analyze it based on the command word structure relationship to obtain a second confirmation result; The out-of-word secondary confirmation module 500 is used to extract the key phoneme with the highest score from the phoneme probability matrix if the out-of-word recognition is initially determined, query the candidate phoneme library, and generate a third confirmation result; The output module 600 is configured to output a final recognition result based on the first confirmation result, the second confirmation result, or the third confirmation result.
[0056] In one embodiment, the acquisition module 100 includes: A probability matrix generating unit, configured to receive the phoneme probability distribution output by the acoustic model in each time frame and form a phoneme probability matrix; an optimal path acquisition unit, configured to acquire an optimal phoneme path that matches the command word list based on the phoneme probability matrix through a decoding algorithm, and calculate a comprehensive score of the path; A history frame buffer unit is used to buffer the phoneme probability matrix of the current recognition frame and the history N frames, where N is a positive integer preset according to the maximum phoneme length of the command word, for subsequent delayed recognition or history frame analysis; The score recording unit is used to synchronously record the command word path score for use in preliminary judgment of the identification result type.
[0057] In one embodiment, the preliminary determination module 200 includes: a misrecognition judgment unit, configured to preliminarily judge that misrecognition exists if the command word path score is lower than a preset misrecognition threshold; A structural relationship judgment unit, used to judge the structural relationship between the current command and each entry in the command word list; A mixed recognition preliminary judgment unit is used to preliminarily judge that mixed recognition exists if a preset structural relationship exists between the current command and any word in the command word list; The out-of-set word judgment unit is used to preliminarily judge that an out-of-set word exists if it is recognized that the current command word contains a number and the current command word path score is lower than the out-of-set word trigger threshold.
[0058] In one embodiment, the hybrid identification preliminary determination unit includes: The phoneme sequence extraction subunit is used to extract the phoneme sequence path corresponding to the current recognition result; The prefix comparison subunit is used to compare the current recognition path with other entries in the command word list. If the phoneme sequence of the short path word completely matches the starting part of the long path word, strict prefix inclusion exists and it is preliminarily determined to be prefix inclusion mixed recognition; The suffix matching subunit is used to identify the suffix inclusion type if the final phoneme sequence of the long path word completely matches the short path word, indicating that strict suffix inclusion exists and the initial judgment is that it is a suffix inclusion type mixed recognition; The non-continuous subset analysis subunit is used to analyze whether the current recognition path is a non-continuous subset of other long path terms in the command word list. If so, there is non-strict inclusion, and it is preliminarily determined to be non-strict inclusion type mixed recognition; The similarity calculation subunit is used to calculate the phoneme sequence similarity between the current recognition path and other entries in the command word list. If the similarity exceeds the preset threshold and there is a shared phoneme segment, there is approximate inclusion, and it is preliminarily determined to be approximate inclusion type mixed recognition.
[0059] The symmetric structure recognition subunit is used to recognize that if the difference between the current command word and other entries in the command word list is a symmetrical structure, then there is a symmetrical relationship, and it is preliminarily determined to be symmetric mixed recognition.
[0060] In one embodiment, the misidentification secondary confirmation module 300 includes: A non-target phoneme extraction unit is used to extract the phoneme probability values corresponding to all non-target command words from the current frame phoneme probability matrix to form a score vector if it is initially determined that there is misrecognition; a quantity counting unit, configured to count the number of non-target phonemes in the score vector whose probability values are higher than the target phoneme or whose difference from the target phoneme is within a first preset difference; The misidentification determination unit is configured to determine that the current recognition result is a misidentification if the number exceeds a preset number threshold, and generate a first confirmation result.
[0061] In one embodiment, the hybrid identification secondary confirmation module 400 includes: a prefix inclusion processing unit configured to, if the condition is strict prefix inclusion, delay obtaining a first preset number of subsequent frames of phoneme sequences when a contained word is identified, determine whether there is phoneme information related to the contained word, and if so, determine mixed recognition and generate a second confirmation result; a suffix inclusion processing unit configured to, if the suffix inclusion is strict, obtain a second preset number of frames of phoneme sequences from the cached data when the included word is recognized, determine whether there is phoneme information related to the included word, and if so, determine mixed recognition and generate a second confirmation result; a non-strict inclusion processing unit, configured to, if non-strict inclusion occurs, identify whether there is historical or subsequent frame information of a long-path specific phoneme within the time range of the short-path phoneme sequence, and if so, determine mixed recognition and generate a second confirmation result; an approximate inclusion processing unit, configured to, if the approximate inclusion is found, delay obtaining a first preset number of subsequent frames of phoneme sequences or obtain a second preset number of frames of phoneme sequences in the cached data according to the inclusion form, determine whether there is phoneme information related to the included word, and if so, determine mixed recognition and generate a second confirmation result; A symmetry relationship processing unit is used to identify the scores of two phonemes symmetrical in the symmetrical phoneme positions when the phoneme score of the symmetrical position of the symmetrical word is lower than the first score threshold if it is a symmetrical relationship. If the score difference is greater than the first score difference threshold, the current recognition result is determined to be a mixed recognition, and a second confirmation result is generated.
[0062] In one embodiment, the out-of-vocabulary word recognition secondary confirmation module 500 includes: a key phoneme extraction unit, configured to extract key phonemes associated with the current command word from the phoneme probability matrix and determine the phoneme with the highest score; A candidate phoneme query unit is used to query a pre-established candidate phoneme library based on the key phoneme with the highest score to obtain the scores of the relevant candidate phonemes; The out-of-word determination unit is configured to determine that the current recognition is an out-of-word recognition if the score of the relevant candidate phoneme exceeds a preset candidate threshold or the difference with the key phoneme score is less than a set value, and generate a third confirmation result.
[0063] Reference Figure 3 In the embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store usage data, etc. in the process of the post-processing method of voice command word recognition. The network interface of the computer device is used to communicate with an external terminal via a network connection. Furthermore, the above-mentioned computer device can also be provided with an input device and a display screen, etc. When the above-mentioned computer program is executed by the processor to implement the post-processing method of voice command word recognition, the steps include: obtaining the phoneme probability matrix and command word path score output by the acoustic model; preliminarily judging whether there is misrecognition, mixed recognition or out-of-set word recognition based on the phoneme probability matrix and the command word path score; if it is preliminarily judged that there is misrecognition, extracting the score vector based on the phoneme probability matrix and counting the number of non-target phonemes to make a judgment, and generating a first confirmation result; if it is preliminarily judged that there is mixed recognition, obtaining the phoneme sequence of the subsequent frame or historical frame from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition, analyzing it based on the command word structural relationship, and obtaining a second confirmation result; if it is preliminarily judged that there is out-of-set word recognition, extracting the key phoneme with the highest score from the phoneme probability matrix, querying the candidate phoneme library, and generating a third confirmation result; outputting the final recognition result based on the first confirmation result, the second confirmation result or the third confirmation result. Those skilled in the art will understand that, Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.
[0064] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for post-processing speech command word recognition, comprising the following steps: obtaining a phoneme probability matrix and a command word path score output by an acoustic model; preliminarily determining whether there is misrecognition, mixed recognition, or out-of-set word recognition based on the phoneme probability matrix and the command word path score; if it is preliminarily determined that there is misrecognition, extracting a score vector based on the phoneme probability matrix and counting the number of non-target phonemes to determine, and generating a first confirmation result; if it is preliminarily determined that there is mixed recognition, obtaining a phoneme sequence of a subsequent frame or a historical frame from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition, analyzing it based on the command word structure relationship, and obtaining a second confirmation result; if it is preliminarily determined that there is out-of-set word recognition, extracting the key phoneme with the highest score from the phoneme probability matrix, querying a candidate phoneme library, and generating a third confirmation result; outputting a final recognition result based on the first confirmation result, the second confirmation result, or the third confirmation result. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0065] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media provided herein and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0066] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.
[0067] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A post-processing method for speech command word recognition, characterized in that: include: Obtain the phoneme probability matrix and command word path score output by the acoustic model; Based on the phoneme probability matrix and command word path score, it is preliminarily determined whether there is misrecognition, mixed recognition or out-of-set word recognition; If it is initially determined that there is misrecognition, the score vector is extracted based on the phoneme probability matrix and the number of non-target phonemes is counted to generate a first confirmation result; If it is initially determined that there is mixed recognition, the phoneme sequence of the subsequent frame or the historical frame is obtained from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition, and analyzed based on the command word structure relationship to obtain a second confirmation result; If it is initially determined that there is out-of-word recognition, the key phoneme with the highest score is extracted from the phoneme probability matrix, and the candidate phoneme library is queried to generate a third confirmation result; Based on the first confirmation result, the second confirmation result, or the third confirmation result, a final recognition result is output.
2. The method for post-processing speech command word recognition according to claim 1, characterized in that: The step of obtaining the phoneme probability matrix and command word path score output by the acoustic model includes: Receive the phoneme probability distribution output by the acoustic model in each time frame to form a phoneme probability matrix; Based on the phoneme probability matrix, obtaining an optimal phoneme path that matches the command word list through a decoding algorithm, and calculating a comprehensive score of the optimal phoneme path; Cache the phoneme probability matrix of the current recognition frame and the historical N frames, where N is a positive integer preset according to the maximum phoneme length of the command word, for subsequent delayed recognition or historical frame analysis; The command word path score is recorded synchronously for use in preliminary judgment of the identification result type.
3. The post-processing method for speech command word recognition according to claim 1, characterized in that: The step of preliminarily judging whether there is misrecognition, mixed recognition, or out-of-word recognition based on the phoneme probability matrix and the command word path score includes: If the command word path score is lower than the preset misrecognition threshold, it is preliminarily determined that there is misrecognition; Determine the structural relationship between the current command and each entry in the command word list; If the current command has a preset structural relationship with any word in the command word list, it is initially determined that there is mixed recognition; If it is recognized that the current command word contains numbers and the current command word path score is lower than the out-of-set word trigger threshold, it is preliminarily judged that out-of-set word recognition exists.
4. The method for post-processing speech command word recognition according to claim 3, characterized in that: The preset structural relationship includes strict prefix inclusion, strict suffix inclusion, non-strict inclusion, approximate inclusion, and symmetric relationship; if the current command has a preset structural relationship with any word in the command word list, the step of preliminarily determining that there is mixed recognition includes: Extract the phoneme sequence path corresponding to the current recognition result; Perform prefix comparison between the current recognition path and other entries in the command word list. If the phoneme sequence of the short path word completely matches the beginning of the long path word, strict prefix inclusion exists and the initial judgment is that it is a prefix inclusion mixed recognition. If the final phoneme sequence of the long-path word completely matches the short-path word, there is strict suffix inclusion, and it is initially determined to be a suffix inclusion type mixed recognition; Analyze whether the current recognition path is a non-continuous subset of other long path terms in the command word list. If so, there is non-strict inclusion, and it is preliminarily determined to be non-strict inclusion mixed recognition; Calculate the phoneme sequence similarity between the current recognition path and other entries in the command word list. If the similarity exceeds the preset threshold and there are shared phoneme segments, there is approximate inclusion, and it is preliminarily determined to be approximate inclusion type mixed recognition; If it is recognized that the difference between the current command word and other entries in the command word list is symmetrical, then there is a symmetrical relationship, and it is preliminarily determined to be symmetrical mixed recognition.
5. The method for post-processing speech command word recognition according to claim 1, characterized in that: If it is preliminarily determined that there is misrecognition, the step of extracting the score vector based on the phoneme probability matrix and counting the number of non-target phonemes to generate a first confirmation result includes: If it is initially determined that there is misrecognition, the phoneme probability values corresponding to all non-target command words are extracted from the phoneme probability matrix of the current frame to form a score vector; Counting the number of non-target phonemes in the score vector whose probability values are higher than the target phoneme or whose difference with the target phoneme is within a first preset difference; If the number of the non-target phonemes exceeds a preset number threshold, the current recognition result is determined to be a misrecognition, and a first confirmation result is generated.
6. The method for post-processing speech command word recognition according to claim 1, characterized in that: If it is preliminarily determined that mixed recognition exists, the step of obtaining a phoneme sequence of a subsequent frame or a historical frame from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition, and performing analysis based on the command word structure relationship to obtain a second confirmation result includes: If it is a strict prefix inclusion, when the included word is recognized, the subsequent first preset number of frames of phoneme sequence are obtained at a delay to determine whether there is phoneme information related to the included word. If so, it is determined to be mixed recognition and a second confirmation result is generated; If it is a strict suffix inclusion, when the included word is recognized, obtaining a second preset number of frame phoneme sequences in the cache data, determining whether there is phoneme information related to the included word, and if so, determining it as mixed recognition, generating a second confirmation result; If it is not strictly included, within the time range of the short-path phoneme sequence, identify whether there is historical or subsequent frame information of the long-path specific phoneme. If so, it is determined to be mixed recognition, and a second confirmation result is generated; If it is approximately included, delaying the acquisition of a first preset number of subsequent frames of phoneme sequences or acquiring a second preset number of frames of phoneme sequences in the cached data according to the inclusion form, and determining whether there is phoneme information related to the included word. If so, it is determined to be mixed recognition, and a second confirmation result is generated; If it is a symmetrical relationship, when the phoneme score of the symmetrical position of the symmetrical word is lower than the first score threshold, the scores of the two phonemes symmetrical in the symmetrical phoneme position are identified. If the score difference is greater than the first score difference threshold, the current recognition result is determined to be mixed recognition, and a second confirmation result is generated.
7. The method for post-processing speech command word recognition according to claim 1, characterized in that: If it is preliminarily determined that out-of-word recognition exists, the step of extracting the key phoneme with the highest score from the phoneme probability matrix, querying the candidate phoneme library, and generating a third confirmation result includes: Extracting key phonemes associated with the current command word in the phoneme probability matrix and determining the phoneme with the highest score; Based on the key phoneme with the highest score, query the pre-established candidate phoneme library to obtain the scores of the relevant candidate phonemes; If the score of the relevant candidate phoneme exceeds the preset candidate threshold or the difference with the key phoneme score is less than the set value, it is determined that the current recognition is an out-of-word recognition, and a third confirmation result is generated.
8. A speech command word recognition and post-processing system, characterized in that: include: An acquisition module is used to obtain the phoneme probability matrix and command word path score output by the acoustic model; A preliminary judgment module is used to preliminarily judge whether there is misrecognition, mixed recognition or out-of-set word recognition based on the phoneme probability matrix and the command word path score; A misidentification secondary confirmation module is used to extract the score vector based on the phoneme probability matrix and count the number of non-target phonemes to generate a first confirmation result if the initial misidentification is determined to be present; A mixed recognition secondary confirmation module is used to obtain the phoneme sequence of subsequent frames or historical frames from the phoneme probability matrix according to the abnormal type corresponding to the mixed recognition if mixed recognition is initially determined to exist, and analyze it based on the command word structure relationship to obtain a second confirmation result; The out-of-word secondary confirmation module is used to extract the key phoneme with the highest score from the phoneme probability matrix if it is initially determined that an out-of-word exists, query the candidate phoneme library, and generate a third confirmation result; The output module is used to output a final recognition result based on the first confirmation result, the second confirmation result or the third confirmation result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
User-defined command word recognition method and device, and computer equipment
CN113506574A
Training method of command word recognition model and command word recognition method and device
CN116778914A
Voice command word recognition method and device, equipment and medium
CN116825108A
Sound signal recognition system and sound signal recogniton method, and dialog control system and dialog control method using soung signal recognition system
US20030101053A1
Model substitution for efficient development of a solution
US20240249716A1
Cited By
Recognition rejection method and device for out-of-set words, equipment and medium
CN120808765A
Out-of-vocabulary word rejection method and device, equipment and medium
CN120808765B
Digital speech recognition method and device, and medium
CN121214937A
Digital speech recognition methods, devices and media
CN121214937B
Method for recognizing command word in voice signal and related equipment
CN121506105A
