A method and system for real-time enhancement of speech recognition based on in-vocabulary words from a finite vocabulary

By constructing a finite vocabulary and matching the nearest neighbors of pinyin, the accuracy problem of speech recognition in scenarios with non-standard pronunciation and proper nouns is solved, and higher recognition accuracy is achieved.

CN120089132BActive Publication Date: 2025-11-11GUANGZHOU UNIVERSITY OF CHINESE MEDICINE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510098097.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-11-11
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

Existing speech recognition technology suffers a significant drop in accuracy when faced with non-standard pronunciations or proper nouns.

Method used

A finite vocabulary is constructed by converting the output words of the initial speech recognition into pinyin strings, matching the first pinyin string with the nearest neighbor in the finite vocabulary, and outputting the corresponding words in the vocabulary. The nearest neighbor matching strategy is used to correct misidentifications.

Benefits of technology

It improves the accuracy of speech recognition, reduces recognition errors caused by non-standard pronunciation and accent differences, and enhances the accuracy of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120089132B_ABST
    Figure CN120089132B_ABST
Patent Text Reader

Abstract

This invention discloses a real-time speech recognition enhancement method and system based on a finite vocabulary. The method includes the following steps: constructing a finite vocabulary, which includes storing multiple words within the vocabulary and multiple first pinyin strings, each first pinyin string being a pinyin string corresponding to a word in the vocabulary; performing preliminary speech recognition based on user input to obtain an output word; converting the output word into a pinyin string to obtain a second pinyin string; matching the second pinyin string in the finite vocabulary to obtain a first pinyin string with the nearest pinyin distance; and outputting the corresponding word in the vocabulary based on the obtained first pinyin string with the nearest pinyin distance. Compared with traditional speech recognition methods, this invention reduces recognition errors caused by non-standard pronunciation, homophones, etc., and improves the accuracy of speech recognition; while simultaneously controlling the complexity of retrieval and matching, ensuring real-time recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of speech recognition enhancement technology, and more specifically, to a real-time speech recognition enhancement method and system based on words in a finite vocabulary. Background Technology

[0002] Speech recognition technology, as an important research area in intelligent recognition, has a history of over 60 years. Speech recognition is the process of converting sound into text; Chinese speech recognition converts speech into Chinese characters based on the speaker's pronunciation. However, due to individual pronunciation differences, non-standard Chinese pinyin pronunciation can significantly reduce the accuracy of speech recognition.

[0003] With technological advancements, speech recognition has made significant progress in both accuracy and speed. In quiet environments, with standard accents and common vocabulary, speech recognition accuracy has reached levels comparable to human speech. However, if the speaker's pronunciation is not standard and the dialogue contains proper nouns, such as specific names of people, places, or organizations, the accuracy will be greatly reduced. Summary of the Invention

[0004] One objective of this invention is to provide a real-time speech recognition enhancement method based on a finite vocabulary, thereby solving the technical problem of low speech recognition accuracy in the prior art. Another objective of this invention is to provide a real-time speech recognition enhancement system based on a finite vocabulary.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0006] The first aspect of this invention provides a real-time speech recognition enhancement method based on words in a finite vocabulary, comprising the following steps:

[0007] Construct a finite vocabulary, wherein the finite vocabulary includes storing multiple words in the vocabulary and multiple first pinyin strings, each of the first pinyin strings being the pinyin string corresponding to a word in the vocabulary;

[0008] Based on the user's voice input, preliminary speech recognition yields the output word;

[0009] The output word is converted into a pinyin string to obtain a second pinyin string;

[0010] The second pinyin string is matched in the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance;

[0011] Output the corresponding word from the database based on the nearest neighbor pinyin string obtained from the pinyin distance.

[0012] Furthermore, the construction of the finite lexicon includes:

[0013] Store a finite number of words in the database as the first word list, and sort them in ascending order according to the machine code of the Chinese characters. The sorted list forms the second word list. Make a deep copy of the second word list to form the third word list.

[0014] Store all first pinyin strings as a list of first pinyin strings, and generate a multi-level subset system based on the first pinyin string list to construct a multi-level pinyin space.

[0015] Furthermore, a multi-level subset system is generated based on the first list of pinyin strings to construct a multi-level pinyin space, including:

[0016] 3A: Record the position numbers of all the first pinyin strings in the first pinyin string list to obtain the first position list;

[0017] 3B: All of the first pinyin strings form the initial set;

[0018] 3C: Count and record the number of the first pinyin string in the current set. If the number of the first pinyin string in the current set is less than the first number threshold, no splitting is required. If the number of the first pinyin string in the current set is not less than the first number threshold, proceed to steps 3D to 3I.

[0019] 3D: In the current set, take the two first pinyin strings with the largest pinyin distance as the initial two subset center points; determine whether the split number threshold is 2. If so, skip step 3E to step 3G and execute step 3H.

[0020] 3E: Take any first pinyin string in the current set that is not listed as the center point of a subset as the third pinyin string, calculate the pinyin distance between the third pinyin string and each existing subset center, and then calculate the sum of all pinyin distances and the coefficient of variation to obtain the sum of pinyin distances and the coefficient of variation of pinyin distances.

[0021] 3F: When the coefficient of variation of the pinyin distance is less than the first coefficient of variation threshold, the third pinyin string corresponding to the largest pinyin distance is taken as the new subset center point;

[0022] 3G: Determine whether the center point of the existing subset has reached the split number threshold. If not, return to step 3E.

[0023] 3H: Calculate the pinyin distance between all first pinyin strings in the current set and the center point of each subset, and assign each first pinyin string to one of the existing subsets according to the nearest principle;

[0024] 3I: Treat each subset as the current set and execute step 3C.

[0025] Furthermore, the pinyin distance includes:

[0026] A phonetic unit is defined as the pinyin formed from a single character. A pinyin unit includes an initial consonant, a final vowel, and a tone.

[0027] Calculate the absolute value p of the difference in the number of pinyin units between two pinyin strings, and denote PinyinDistance as 7*p;

[0028] Calculate the difference between the pinyin units at each corresponding position in the two pinyin strings and accumulate them into PinyinDistance to obtain the pinyin distance between the two pinyin strings.

[0029] Furthermore, the construction of the finite lexicon also includes actively adding tuples of recognized words and real words, including:

[0030] Acquire user-input speech and recognize it to obtain the output words;

[0031] Determine whether the output word is one of the words in the second word list. If yes, the process ends. If not, provide several words from the library. The user selects the word from the library that the user's input voice actually expresses as the third word. Sort the output words according to the machine code of the Chinese characters from smallest to largest and insert them into the second word list. Record the insertion position and insert the third word into the same position in the third word list.

[0032] Furthermore, after obtaining the output word from the initial speech recognition based on the user's input, the current time is also recorded.

[0033] Furthermore, before matching the second pinyin string in the finite vocabulary to obtain the first pinyin string with the nearest neighbor pinyin distance, the process also includes:

[0034] The output word is subjected to a binary search in the second word list. If found, the word at the same position in the third word list is used as the output, and the real-time speech recognition enhancement ends. If not found, the subsequent steps are executed.

[0035] Furthermore, the second pinyin string is matched against the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance, including:

[0036] 7A: If the number of the first pinyin strings in the current set is less than the first quantity threshold, proceed to steps 7B to 7C; if the number of the first pinyin strings in the current set is not less than the first quantity threshold, proceed to steps 7D to 7E.

[0037] 7B: Calculate the pinyin distance between the second pinyin string and every first pinyin string in the current set;

[0038] 7C: The primary sorting condition is to use the pinyin distance from smallest to largest. When the pinyin distances are the same, the output word and the words in the library corresponding to the first pinyin string are matched character by character and the number of different Chinese characters is calculated to obtain the distance between the Chinese character strings. The secondary sorting condition is to use the distance between the Chinese character strings from smallest to largest. The first matchNum first pinyin strings that are closest to the second pinyin string in the current set are obtained and output as the matchNum first pinyin strings.

[0039] 7D: Calculate the pinyin distance between the second pinyin string and the center points of multiple subsets of the current set, and obtain K candidate subsets based on the smallest K distance values;

[0040] 7E: Take each subset of the K candidate subsets as the current set and return to step 7A; each time, obtain matchNum first pinyin strings, use the pinyin distance from smallest to largest as the primary sorting condition, and the Chinese character string distance from smallest to largest as the secondary sorting condition, select the first matchNum first pinyin strings that are closest to the second pinyin string from all the obtained first pinyin strings, and output the matchNum first pinyin strings.

[0041] Furthermore, based on the first pinyin string of the nearest neighbor obtained from the pinyin distance, the corresponding words in the database are output, including:

[0042] 9A: In the first word list, obtain the words in the library corresponding to the matchNum first pinyin strings output in step 7E;

[0043] 9B: Compare the current time with the stored time. If the two output words are the same and the difference in storage time is not less than the preset time threshold, then proceed to step 9C; if the two output words are different or the difference in storage time is less than the preset time threshold, then proceed to step 9D.

[0044] 9C: Provide the user with matchNum words from the database via text or voice, determine the unique word from the database based on the user's answer, and output it; before outputting, create a new subprocess, and if idle is detected in the subprocess, insert the output word into the second word list in ascending order of the machine internal code of the Chinese characters;

[0045] 9D: The first word in the matchNum list is used as the output.

[0046] A second aspect of the present invention provides a real-time speech recognition enhancement system based on words in a finite lexicon, comprising:

[0047] The lexicon module constructs a finite lexicon, which includes storing a finite number of words in the lexicon and multiple first pinyin strings, each of which is a pinyin string corresponding to a word in the lexicon.

[0048] The preliminary recognition module performs preliminary speech recognition based on the user's input speech to obtain the output word;

[0049] A conversion module converts the output word into a pinyin string to obtain a second pinyin string;

[0050] The matching module matches the second pinyin string in the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance;

[0051] The output module outputs the corresponding word in the library based on the first nearest-neighbor pinyin string obtained from the pinyin distance.

[0052] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0053] This invention constructs a finite vocabulary and converts the output words obtained from initial speech recognition into pinyin strings. These strings are then matched against the vocabulary to more accurately find words within the dictionary that match the user's actual intent. Compared to traditional speech recognition methods, this invention reduces recognition errors caused by non-standard pronunciation and homophones, thus improving the accuracy of speech recognition. Utilizing a nearest neighbor matching strategy based on pinyin distance, it can find the closest correct pinyin string when there are deviations in the initial recognition results, thereby correcting incorrectly recognized words. This matching method considers potential issues such as inaccurate pronunciation and accent differences during speech recognition, further enhancing recognition accuracy. Attached Figure Description

[0054] Figure 1 This is a flowchart illustrating a real-time speech recognition enhancement method based on words in a finite vocabulary, provided in an embodiment of the present invention.

[0055] Figure 2 This is a schematic diagram of a real-time speech recognition enhancement system based on a finite vocabulary, provided as an embodiment of the present invention. Detailed Implementation

[0056] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.

[0057] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions;

[0058] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.

[0059] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0060] Example 1

[0061] This embodiment provides a real-time speech recognition enhancement method based on words in a finite vocabulary corpus, such as... Figure 1 As shown, it includes the following steps:

[0062] Construct a finite vocabulary, wherein the finite vocabulary includes storing multiple words in the vocabulary and multiple first pinyin strings, each of the first pinyin strings being the pinyin string corresponding to a word in the vocabulary;

[0063] Based on the user's voice input, preliminary speech recognition yields the output word;

[0064] The output word is converted into a pinyin string to obtain a second pinyin string;

[0065] The second pinyin string is matched in the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance;

[0066] Output the corresponding word from the database based on the nearest neighbor pinyin string obtained from the pinyin distance.

[0067] In a further embodiment, the construction of the finite lexicon includes:

[0068] Store a finite number of words in the database as the first word list, and sort them in ascending order according to the machine code of the Chinese characters. The sorted list forms the second word list. Make a deep copy of the second word list to form the third word list.

[0069] Store all first pinyin strings as a list of first pinyin strings, and generate a multi-level subset system based on the first pinyin string list to construct a multi-level pinyin space.

[0070] In a specific embodiment, the rule for converting each Chinese character to Pinyin is as follows: the Pinyin of each character is divided into three parts: initial consonant, final vowel, and tone. If a character has multiple pronunciations, the system prompts for manual correction and stores the information. In this embodiment, the number of words in the database is 1273, which are stored and recorded in the first word list.

[0071] In a further embodiment, a multi-level subset system is generated based on the first list of pinyin strings to construct a multi-level pinyin space, including:

[0072] 3A: Record the position numbers of all the first pinyin strings in the first pinyin string list to obtain the first position list;

[0073] 3B: All of the first pinyin strings form the initial set;

[0074] 3C: Count and record the number of first pinyin strings in the current set. If the number of first pinyin strings in the current set is less than the first quantity threshold, no splitting is required. If the number of first pinyin strings in the current set is not less than the first quantity threshold, then execute steps 3D to 3G. In this embodiment, the first quantity threshold is set to 1000 by default, and the number of pinyin strings or words returned by matching is manually set to 4 by default. Since the number of words in the library is 1273 in this embodiment, which is greater than the first quantity threshold, steps 3D to 3I are executed first.

[0075] 3D: In the current set, select the two first pinyin strings with the largest pinyin distance as the initial two subset center points, specifically:

[0076] Specifically:

[0077] The first center point is the fine-lined fragrant tea vegetable (xi4hua1xian4wen2xiang1cha2cai4), and the second center point is the velvety sharp-pointed mountain fragrant round (rong2mao2rui4jian1shan1xiang1yuan2). The distance between the two is set according to the method of "the distance between two pinyin strings" in this patent. After calculation, the results are: length difference weight = 0, initial consonant difference = 42, final vowel difference = 42, tone difference = 15, total distance = 99;

[0078] Additional explanation: xi4hua1xian4wen2xiang1cha2cai4 represents the pinyin of seven characters. 'x' is the initial consonant, 'i' the final vowel, and the pinyin string is in the fourth tone. The same logic applies to the others.

[0079] The system checks if the splitting number threshold is 2; if not, it continues execution sequentially. In this embodiment, the splitting number threshold can be adjusted according to actual conditions; in this embodiment, it is set to 4.

[0080] 3E: Take any first pinyin string in the current set that is not listed as the center point of a subset as the third pinyin string, calculate the pinyin distance between the third pinyin string and each existing subset center, and then calculate the sum of all pinyin distances and the coefficient of variation to obtain the sum of pinyin distances and the coefficient of variation of pinyin distances.

[0081] 3F: When the coefficient of variation of the pinyin distance is less than the first coefficient of variation threshold, the third pinyin string corresponding to the largest pinyin distance is taken as the new subset center point;

[0082] 3G: Determine whether the existing subset center point has reached the split number threshold. If not, return to step 3E. As mentioned earlier, the split number threshold is set to 4 in this embodiment.

[0083] All the central points of this split include:

[0084] Initial center point: Fine-lined fragrant tea vegetable (xi4hua1xian4wen2xiang1cha2cai4), velvety sharp-pointed mountain fragrant round (rong2mao2rui4jian1shan1xiang1yuan2).

[0085] New center points: long-stemmed yam (chang2jing1yang2er3suan4) and short-stemmed ophiopogon japonicus (duan3ting2shan1mai4dong1), for a total of 4 center points.

[0086] 3H: Calculate the pinyin distance between all first pinyin strings in the current set and the center point of each subset, and assign each first pinyin string to one of the existing subsets according to the nearest principle;

[0087] For example, the entry for chrysanthemum (ju2hua1):

[0088] Distance from the fine-flowered fragrant tea plant (xi4hua1xian4wen2xiang1cha2cai4): 50

[0089] Distance to Rongmao Ruijianshan Xiangyuan (rong2mao2rui4jian1shan1xiang1yuan2): 62

[0090] Distance from long-stemmed garlic (chang2jing1yang2er3suan4): 45

[0091] Distance to *Ophiopogon japonicus* (duan3ting2shan1mai4dong1): 51

[0092] The nearest centroid is *Gnaphalium affine* (chang2jing1yang2er3suan4), therefore chrysanthemum is assigned to subset 3 (the subset centered on "*Gnaphalium affine*").

[0093] 3I: Treat each subset as the current set and execute step 3C;

[0094] The final number of words in each subset:

[0095] Subset 1 (Center point fine floral pattern fragrant tea vegetable (xi4hua1xian4wen2xiang1cha2cai4)): 439 words.

[0096] Subset 2 (Center point: Rongmao Ruijian Shanxiangyuan (rong2mao2rui4jian1shan1xiang1yuan2)): 63 words.

[0097] Subset 3 (Liparis viridiflora (Changjing Yangersuan)): 190 words.

[0098] Subset 4 (Liriope muscari (Duan ting Shanmaidong)): 581 words.

[0099] Since the number of words in each subset is less than the first quantity threshold of 1000, this splitting is completed and no further recursive splitting is required.

[0100] In a further embodiment, the pinyin distance includes:

[0101] Defining the pinyin converted from a character as a pinyin unit, and a pinyin unit includes an initial, a final, and a tone;

[0102] Calculating the absolute value p of the difference in the number of pinyin units between two pinyin strings, and recording PinyinDistance as 7*p;

[0103] Calculating the difference between the pinyin units at each same position of two pinyin strings and accumulating it into PinyinDistance to obtain the pinyin distance between the two pinyin strings.

[0104] In a specific embodiment, calculating the difference between the pinyin units at each same position of two pinyin strings has the following rules:

[0105] 1) If the tones are different, the difference is 3.

[0106] 2) If the initials are different but belong to a pair of ambiguous sounds, such as z and zh, the difference is 2. If the initials are different and do not belong to a pair of ambiguous sounds, the difference is 6. The definition rules of the pair of ambiguous sounds are in accordance with 10.4.6.

[0107] 3) If the finals are different but belong to a pair of ambiguous sounds, such as an and ang, the difference is 2. If the finals are different and do not belong to a pair of ambiguous sounds, the difference is 6. The definition rules of the pair of ambiguous sounds are in accordance with 6).

[0108] 4) For a pinyin without an initial, the initial is recorded as empty. For example: the pinyin of "er". The empty initial and the non-empty initial are also different, and the difference is 6.

[0109] 5) Accumulating the differences in the three parts of tone, initial, and final between one pinyin unit and another pinyin unit as the difference between them.

[0110] 6) z and zh, c and ch, s and sh, an and ang, en and eng, in and ing, ian and iang, uan and uang. Users can customize the pair of ambiguous sounds.

[0111] In the above rules, the specific values ​​of each gap can be set as needed. This embodiment only provides one example.

[0112] In addition, the embodiments of the present invention also provide the following specific process for calculating the pinyin distance:

[0113] The first step is to calculate the length difference weight. The number of syllables in the two pinyin strings are as follows:

[0114] Fine-flowered fragrant tea dish: xi4, hua1, xian4, wen2, xiang1, cha2, cai4 (7 syllables in total).

[0115] Rongmao Ruijian Shanxiangyuan: rong2,mao2,rui4,jian1,shan1,xiang1,yuan2 (7 syllables in total).

[0116] Then the length difference p is:

[0117] |7-7|=0

[0118] Then let PinyinDistance be 7*p=7*0=0;

[0119] The second step is to calculate the initial consonant differences. The calculation process is as follows:

[0120] Comparison and difference calculation of the initial consonants of corresponding syllables:

[0121]

[0122]

[0123] Total initial consonant difference: 6+6+6+6+6+6+6=42 Result: 42;

[0124] The third part calculates the differences in vowels. The calculation process is as follows: comparison of vowels in corresponding syllables and calculation of differences:

[0125]

[0126] Total difference in vowels: 6+6+6+6+6+6+6=42 Result: 42

[0127] Step 4: Calculate pitch differences:

[0128] Comparison and difference calculation of the tones of corresponding syllables:

[0129]

[0130]

[0131] Total pitch difference: 3+3+0+3+0+3+3=15

[0132] The total pinyin distance = 0 (length difference weight) + 42 (initial difference) + 42 (final difference) + 15 (tone difference) = 99.

[0133] In a further embodiment, the construction of the finite vocabulary also includes actively adding pairs of recognized words and real words, and dynamically adjusting the correspondence between recognized words and real words in an interactive manner, including:

[0134] Acquire user-input speech and recognize it to obtain the output words;

[0135] Determine if the output word is in the second word list. If yes, end the process; otherwise, provide several words from the library. The user selects the word from the library that the user's input speech actually represents as the third word. Sort the output words according to the machine code of the Chinese characters in ascending order and insert them into the second word list. Record the insertion position. Insert the third word into the same position in the third word list. Specifically:

[0136] The user verbally states the target word "ginseng" to the system. The system receives the voice signal and generates the output word "human body" through its speech recognition module. It then checks if the output word "human body" is in the second word list. The result is "no". Next, the system provides the user with options for ginseng, scrophularia, lotus, and salvia miltiorrhiza. The user selects "ginseng". The system then sorts the Chinese characters by their machine code in ascending order and uses a binary search algorithm to determine the insertion position of "human body" in the second word list as 1270. It then inserts "human body" into the 1270th position of the second word list, and then inserts "ginseng" into the 1270th position of the third word list.

[0137] By setting up a third word list, it is ensured that all words in the third word list are correct. When the user utters "ginseng" again and the system identifies it as "person", the system can immediately find "person" in the second word list and then find the correct word "ginseng" in the third word list.

[0138] Example 2

[0139] This embodiment, based on Embodiment 1, continues to disclose the following content:

[0140] In this embodiment, a third-party speech recognition module is used to recognize the user's input speech. After obtaining the output words, the current time is also recorded.

[0141] In a further embodiment, before matching the second pinyin string in the finite vocabulary to obtain the first pinyin string with the nearest neighbor in pinyin distance, the method further includes:

[0142] The output word is subjected to a binary search in the second word list. If found, the found word in the library is used as the output, and the real-time speech recognition enhancement ends. If not found, the subsequent steps are executed.

[0143] Specifically:

[0144] The user orally states the target word "Coptis chinensis" through voice, and the system calls a third-party voice recognition module to recognize and obtain the output word "Coptis chinensis". Archive the output word "Coptis chinensis" this time and record the archiving time this time. Conduct a binary search for the output word in the second word list. The result is "not found". Execute the subsequent steps.

[0145] Convert the output word Coptis chinensis from a Chinese character string to a pinyin string huang2lian2.

[0146] In a further embodiment, match the second pinyin string in the finite vocabulary to obtain the first pinyin string with the closest pinyin distance, including:

[0147] 7A: If the number of first pinyin strings in the current set is less than the first quantity threshold, execute steps 7B to 7C; if the number of first pinyin strings in the current set is not less than the first quantity threshold, execute steps 7D to 7E; specifically, the number of pinyin strings in the current set is 1273, which is not less than the first quantity threshold, steps 7D to 7E;

[0148] 7B: Calculate the pinyin distance between the second pinyin string and each first pinyin string in the current set;

[0149] 7C: Take the pinyin distance from small to large as the primary sorting condition. When the pinyin distances are the same, according to the principle of matching each character of the output word and the in-library word corresponding to the first pinyin string and finally calculating the number of different Chinese characters, obtain the Chinese character string distance, and take the Chinese character string distance from small to large as the secondary sorting condition, and obtain the first matchNum first pinyin strings in the current set that are closest to the second pinyin string, and output the matchNum first pinyin strings;

[0150] 7D: Calculate the pinyin distance between the second pinyin string and the centers of multiple subsets in the current set, and obtain K candidate subsets according to the smallest first K distance values; specifically:

[0151] Calculate the pinyin distance between Coptis chinensis (huang2lian2) and the centers of 4 subsets in the current set:

[0152] Distance from Isodon tenuiflorus var. leptanthus (xi4hua1xian4wen2xiang1cha2cai4): 65

[0153] Distance from Turpinia arguta var. acutata (rong2mao2rui4jian1shan1xiang1yuan2): 59

[0154] Distance from Liparis viridiflora (chang2jing1yang2er3suan4): 44

[0155] Distance to *Ophiopogon japonicus* (duan3ting2shan1mai4dong1): 40

[0156] Based on the smallest K (specifically, K is set to 1 in this embodiment) distance values, a candidate subset is determined—the subset centered on *Ophiopogon japonicus* (duan3ting2shan1mai4dong1).

[0157] 7E: Take each subset of the K candidate subsets as the current set and return to step 7A; each time, obtain matchNum first pinyin strings, using the pinyin distance from smallest to largest as the primary sorting condition and the Chinese character string distance from smallest to largest as the secondary sorting condition. From all the obtained first pinyin strings, select the first matchNum first pinyin strings that are closest to the second pinyin string, and output the matchNum first pinyin strings. Specifically:

[0158] Taking the subset centered at *Duan3ting2shan1mai4dong1* as the current set, and executing step 7A, the following steps are taken:

[0159] 7A: The number of pinyin strings in the current set is 581, which is less than the first quantity threshold. Execute steps 7B to 7C to obtain the output.

[0160] 7B: Calculate the pinyin distance between huang2lian2 and every pinyin string in the current set;

[0161] 7C: The primary sorting criterion is the distance between the pinyin characters, from smallest to largest. When the pinyin distances are the same, the output word and the corresponding words in the database are matched character by character, and the number of different Chinese characters is calculated to obtain the distance between the Chinese character strings. The secondary sorting criterion is the distance between the Chinese character strings, from smallest to largest. The four nearest neighbors of huang2lian2 in the current set are obtained: huang2lan2, cong1lian2, huang2jin3, and hong2liao. These four pinyin strings are output and returned.

[0162] In a further embodiment, based on the first nearest-neighbor pinyin string obtained from the pinyin distance, the corresponding word in the database is output, including:

[0163] 9A: In the first word list, obtain the words in the library corresponding to the matchNum first pinyin strings output in step 7E; specifically:

[0164] In the first word list, read out the words in the library corresponding to the four pinyin strings returned in step 7E;

[0165] 9B: Compare the current time with the stored time. If the two output words are the same and the difference in storage time is not less than a preset time threshold, proceed to step 9C; if the two output words are different, or the difference in storage time is less than the preset time threshold, proceed to step 9D. Specifically:

[0166] Compare the output words and save times of this and previous tests. The two output words are different, and the save times differ by more than 60 seconds. Use the word with the earliest position among the four words in the database as the output. One real-time system service session ends.

[0167] 9C: Provide the user with matchNum words from the database via text or voice, determine the unique word from the database based on the user's answer, and output it; before outputting, create a new subprocess, and if idle is detected in the subprocess, insert the output word into the second word list in ascending order of the machine internal code of the Chinese characters;

[0168] 9D: The first word in the matchNum list is used as the output.

[0169] Example 3

[0170] This embodiment, based on the real-time speech recognition enhancement method using a finite vocabulary in Embodiments 1 and 2, provides another specific embodiment for recognition enhancement:

[0171] The user verbally states the target word "ginseng," and the system uses a third-party speech recognition module to output the word "human body." The system saves the output word "human body" and records the saving time. A binary search is performed on the second word list using the output word "human body." The result is "found," and the position number is obtained as 1270. The word "ginseng," located at position 1270 in the third word list, is then output by the system. This process ends. One real-time system service session concludes.

[0172] Example 4

[0173] This embodiment provides a real-time speech recognition enhancement system based on words in a finite vocabulary corpus, such as... Figure 2 As shown, the real-time speech recognition enhancement system applies the real-time speech recognition enhancement method based on a finite vocabulary as described in Examples 1 and 2, including:

[0174] The lexicon module constructs a finite lexicon, which includes storing multiple words in the lexicon and multiple first pinyin strings, each of which is a pinyin string corresponding to a word in the lexicon.

[0175] The preliminary recognition module performs preliminary speech recognition based on the user's input speech to obtain the output word;

[0176] A conversion module converts the output word into a pinyin string to obtain a second pinyin string;

[0177] The matching module matches the second pinyin string in the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance;

[0178] The output module outputs the corresponding word in the library based on the first nearest-neighbor pinyin string obtained from the pinyin distance.

[0179] The same or similar labels correspond to the same or similar parts;

[0180] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0181] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A real-time speech recognition enhancement method based on words in a finite vocabulary, characterized in that, Includes the following steps: Construct a finite vocabulary, wherein the finite vocabulary includes storing multiple words in the vocabulary and multiple first pinyin strings, each of the first pinyin strings being the pinyin string corresponding to a word in the vocabulary; Based on the user's voice input, preliminary speech recognition yields the output word; The output word is converted into a pinyin string to obtain a second pinyin string; The second pinyin string is matched in the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance; Based on the first nearest neighbor pinyin string obtained from the pinyin distance, output the corresponding word in the database; The construction of the finite lexicon includes: Store a finite number of words in the database as the first word list, and sort them in ascending order according to the machine code of the Chinese characters. The sorted list forms the second word list. Make a deep copy of the second word list to form the third word list. Store all first pinyin strings as a list of first pinyin strings, and generate a multi-level subset system based on the first pinyin string list to construct a multi-level pinyin space; A multi-level subset system is generated based on the first list of pinyin strings, and a multi-level pinyin space is constructed, including: 3A: Record the position numbers of all the first pinyin strings in the first pinyin string list to obtain the first position list; 3B: All of the first pinyin strings form the initial set; 3C: Count and record the number of the first pinyin string in the current set. If the number of the first pinyin string in the current set is less than the first number threshold, no splitting is required. If the number of the first pinyin string in the current set is not less than the first number threshold, proceed to steps 3D to 3I. 3D: In the current set, take the two first pinyin strings with the largest pinyin distance as the initial two subset center points; determine whether the split number threshold is 2. If so, skip step 3E to step 3G and execute step 3H. 3E: Take any first pinyin string in the current set that is not listed as the center point of a subset as the third pinyin string, calculate the pinyin distance between the third pinyin string and each existing subset center, and then calculate the sum of all pinyin distances and the coefficient of variation to obtain the sum of pinyin distances and the coefficient of variation of pinyin distances. 3F: When the coefficient of variation of the pinyin distance is less than the first coefficient of variation threshold, the third pinyin string corresponding to the largest pinyin distance is taken as the new subset center point; 3G: Determine whether the center point of the existing subset has reached the split number threshold. If not, return to step 3E. 3H: Calculate the pinyin distance between all first pinyin strings in the current set and the center point of each subset, and assign each first pinyin string to one of the existing subsets according to the nearest principle; 3I: Treat each subset as the current set and execute step 3C; The pinyin distance includes: A phonetic unit is defined as the pinyin formed from a single character. A pinyin unit includes an initial consonant, a final vowel, and a tone. Calculate the absolute value p of the difference in the number of pinyin units between two pinyin strings, and denote PinyinDistance as 7*p; Calculate the difference between the pinyin units at each corresponding position in the two pinyin strings and accumulate them into PinyinDistance to obtain the pinyin distance between the two pinyin strings.

2. The real-time speech recognition enhancement method based on a finite vocabulary as described in claim 1, characterized in that, The construction of the finite vocabulary also includes actively adding pairs of recognized words and real words, including: Acquire user-input speech and recognize it to obtain the output words; Determine whether the output word is one of the words in the second word list. If yes, the process ends. If not, provide several words from the library. The user selects the word from the library that the user's input voice actually expresses as the third word. Sort the output words according to the machine code of the Chinese characters from smallest to largest and insert them into the second word list. Record the insertion position and insert the third word into the same position in the third word list.

3. The real-time speech recognition enhancement method based on a finite vocabulary as described in claim 2, characterized in that, After obtaining the output word based on the user's voice input, the system also records the current time.

4. The real-time speech recognition enhancement method based on a finite vocabulary as described in claim 3, characterized in that, Before matching the second pinyin string in the finite vocabulary to obtain the first pinyin string with the nearest neighbor in pinyin distance, the process also includes: The output word is subjected to a binary search in the second word list. If found, the word at the same position in the third word list is used as the output, and the real-time speech recognition enhancement ends. If not found, the subsequent steps are executed.

5. The real-time speech recognition enhancement method based on a finite vocabulary as described in claim 4, characterized in that, The second pinyin string is matched against the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance, including: 7A: If the number of the first pinyin strings in the current set is less than the first quantity threshold, proceed to steps 7B to 7C; if the number of the first pinyin strings in the current set is not less than the first quantity threshold, proceed to steps 7D to 7E. 7B: Calculate the pinyin distance between the second pinyin string and every first pinyin string in the current set; 7C: The primary sorting condition is to use the pinyin distance from smallest to largest. When the pinyin distances are the same, the output word and the words in the library corresponding to the first pinyin string are matched character by character and the number of different Chinese characters is calculated to obtain the distance between the Chinese character strings. The secondary sorting condition is to use the distance between the Chinese character strings from smallest to largest. The first matchNum first pinyin strings that are closest to the second pinyin string in the current set are obtained and output as the matchNum first pinyin strings. 7D: Calculate the pinyin distance between the second pinyin string and the center points of multiple subsets of the current set, and obtain K candidate subsets based on the smallest K distance values; 7E: Take each subset of the K candidate subsets as the current set and return to step 7A; each time, obtain matchNum first pinyin strings, use the pinyin distance from smallest to largest as the primary sorting condition, and the Chinese character string distance from smallest to largest as the secondary sorting condition, select the first matchNum first pinyin strings that are closest to the second pinyin string from all the obtained first pinyin strings, and output the matchNum first pinyin strings.

6. The real-time speech recognition enhancement method based on a finite vocabulary as described in claim 5, characterized in that, Based on the nearest neighbor pinyin string obtained from the pinyin distance, output the corresponding words in the database, including: 9A: In the first word list, obtain the words in the library corresponding to the matchNum first pinyin strings output in step 7E; 9B: Compare the current time with the stored time. If the two output words are the same and the difference in storage time is not less than the preset time threshold, then proceed to step 9C; if the two output words are different or the difference in storage time is less than the preset time threshold, then proceed to step 9D. 9C: Provide the user with matchNum words from the database via text or voice, determine the unique word from the database based on the user's answer, and output it; before outputting, create a new subprocess, and if idle is detected in the subprocess, insert the output word into the second word list in ascending order of the machine internal code of the Chinese characters; 9D: The first word in the matchNum list is used as the output.

7. A real-time speech recognition enhancement system based on words in a finite vocabulary, characterized in that, The system applies the real-time speech recognition enhancement method based on a finite vocabulary as described in any one of claims 1 to 6, including: The lexicon module constructs a finite lexicon, which includes storing multiple words in the lexicon and multiple first pinyin strings, each of which is a pinyin string corresponding to a word in the lexicon. The preliminary recognition module performs preliminary speech recognition based on the user's input speech to obtain the output word; A conversion module converts the output word into a pinyin string to obtain a second pinyin string; The matching module matches the second pinyin string in the finite word database to obtain the first pinyin string with the nearest neighbor in pinyin distance; The output module outputs the corresponding word in the library based on the first nearest-neighbor pinyin string obtained from the pinyin distance.

Citation Information

Patent Citations

  • Method for improving voice recognition rate in professional field

    CN114822545A