Speech recognition result error correction method, device, terminal equipment and storage medium
By determining the target keywords in speech recognition for error correction, the problem of speech recognition errors is solved, and the accuracy and intention understanding of speech recognition are improved.
Patent Information
- Application Number
- CN202011555097.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-12-24
AI Technical Summary
The prior art is prone to recognition errors in speech recognition, which affects the understanding of intention and the recognition of key information, resulting in inaccurate speech recognition results.
By obtaining the intention information and initial keywords in the speech recognition results, determining the target keywords for error correction, replacing the initial keywords with the intention information, forming the speech recognition result after error correction.
Improve the accuracy of speech recognition, ensure accurate execution of voice commands, and eliminate the deviation between the initial keyword and the intent information.
Smart Images

Figure CN114678027B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of speech recognition error correction, and in particular to a speech recognition result error correction method, device, terminal equipment and storage medium. Background Art
[0002] With the development of automatic speech recognition (ASR) and natural language understanding (NLP) technologies in the field of artificial intelligence, human-computer dialogue (such as chatbots) has also been used in various terminal devices. The process of the terminal device in the dialogue is to convert the user's voice into text through the automatic speech recognition algorithm (ASR), and then use the natural speech understanding algorithm to identify the user's intention and key information, and finally execute the user's voice command or return the required information. However, due to the defects of the device itself or the user's dialect accent, it is easy to cause errors in the text converted from voice, which in turn affects the understanding of the intention and the recognition of key information, and finally cannot return the correct voice recognition results.
[0003] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, device, terminal equipment and storage medium for correcting speech recognition results in response to the above-mentioned defects of the prior art, aiming to solve the problem in the prior art that recognition errors are prone to occur during speech recognition, affecting the understanding of intent and the recognition of key information.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for correcting an error in a speech recognition result, wherein the method comprises:
[0007] Acquire a speech recognition result, and determine intent information in the speech recognition result and an initial keyword corresponding to the intent information;
[0008] Determining, based on the initial keyword, a target keyword that matches the initial keyword;
[0009] The target keyword replaces the initial keyword and is associated with the intention information to form a corresponding relationship between the intention information and the target keyword, thereby obtaining a speech recognition result after error correction.
[0010] In one implementation, the acquiring of speech recognition results and determining intent information in the speech recognition results and initial keywords corresponding to the intent information include:
[0011] Acquiring voice request information, and determining text information corresponding to the voice request information according to the voice request information;
[0012] Determining the speech recognition result according to the text information;
[0013] Performing word segmentation processing on the speech recognition result to obtain a word segmentation result;
[0014] According to the word segmentation result, the intent information in the speech recognition result and the initial keywords corresponding to the intent information are obtained.
[0015] In one implementation, determining, based on the initial keyword, a target keyword matching the initial keyword includes:
[0016] Matching the initial keyword with a preset mapping file, wherein the mapping file is provided with a target keyword corresponding to the initial keyword;
[0017] If the match is successful, the target keyword corresponding to the initial keyword is obtained.
[0018] In one implementation, determining, based on the initial keyword, a target keyword matching the initial keyword includes:
[0019] If the match is unsuccessful, obtaining historical behavior data associated with the initial keyword based on the initial keyword;
[0020] The text content with a usage frequency greater than a preset threshold in the historical behavior data is obtained, and the text content is used as the target keyword.
[0021] In one implementation, determining, based on the initial keyword, a target keyword matching the initial keyword includes:
[0022] According to the initial keyword, obtaining entry information associated with the initial keyword;
[0023] Perform weight analysis on the entry information to determine the target keyword.
[0024] In one implementation, acquiring, according to the initial keyword, entry information associated with the initial keyword includes:
[0025] Respectively obtain the pinyin information, text information and character string information corresponding to the initial keyword;
[0026] According to the pinyin information, the text information and the character string information respectively, first term information corresponding to the pinyin information, second term information corresponding to the character information and third term information corresponding to the character string information are searched out.
[0027] In one implementation, performing weight analysis on the entry information to determine the target keyword includes:
[0028] performing deduplication processing on the first term information, the second term information and the third term information to obtain candidate term information;
[0029] Obtain the weight corresponding to the candidate entry information, and calculate the score information of each candidate entry information;
[0030] According to the score information, target term information is determined from the candidate term information, and the target term information is used as the target keyword.
[0031] In one implementation, the method further includes:
[0032] Acquire historical behavior data, and count usage records of each target keyword in the historical behavior data;
[0033] Determine, according to the usage record, the number of times the intent information corresponding to each target keyword is canceled, where the number of times the operation corresponding to the intent information is canceled;
[0034] If the number of cancellations exceeds a threshold, the association between the target keyword whose number of cancellations exceeds the threshold and the intention information is disconnected.
[0035] In a second aspect, an embodiment of the present invention further provides a device for correcting speech recognition results, which includes:
[0036] An initial keyword determination module, used to obtain a speech recognition result, and determine the intent information in the speech recognition result and the initial keyword corresponding to the intent information;
[0037] A target keyword determination module, used to determine a target keyword matching the initial keyword according to the initial keyword;
[0038] The speech recognition result error correction module is used to replace the initial keyword with the target keyword and associate it with the intention information to form a corresponding relationship between the intention information and the target keyword, and obtain a speech recognition result after error correction.
[0039] In a third aspect, an embodiment of the present invention further provides a terminal device, wherein the terminal device comprises a memory, a processor, and an error correction program for speech recognition results stored in the memory and executable on the processor, and when the processor executes the error correction program for speech recognition results, the steps of the error correction method for speech recognition results described in any one of the above-mentioned schemes are implemented.
[0040] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a speech recognition result error correction program is stored, and when the speech recognition result error correction program is executed by a processor, the steps of the speech recognition result error correction method described in any one of the above schemes are implemented.
[0041] Beneficial effects: Compared with the prior art, the present invention provides a method for correcting speech recognition results. The present invention first obtains speech recognition results, and determines the intent information in the speech recognition results and the initial keywords corresponding to the intent information. At this time, the initial keywords determined are obtained directly based on the speech recognition results. Since there may be errors in speech recognition, the initial keywords may not completely match the intent information. In order to accurately execute voice instructions, it is necessary to correct the initial keywords. Since the initial keywords are obtained from the speech recognition results, the initial keywords are not completely mismatched with the intent information, but there may be some speech recognition errors that cause deviations between the initial keywords and the intent information. Therefore, this embodiment can determine the corresponding target keywords based on the initial keywords. The target keywords are obtained after correcting the initial keywords. The target keywords can eliminate the deviation between the initial keywords and the intent information, and perfectly match the intent information. After obtaining the target keyword, the present invention can replace the initial keyword with the target keyword and associate it with the intent information to form a corresponding relationship between the intent information and the target keyword, and obtain the corrected speech recognition result, thereby completing the error correction of the speech recognition result, so that voice instructions can be accurately executed, improving the accuracy of speech recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The present invention provides a flowchart of a specific implementation of the method for correcting speech recognition results provided by an embodiment of the present invention.
[0043] Figure 2 A flowchart of determining initial keywords in a method for correcting speech recognition results provided by an embodiment of the present invention.
[0044] Figure 3 The present invention provides a flowchart of a first embodiment of determining a target keyword in a method for correcting speech recognition results provided in an embodiment of the present invention.
[0045] Figure 4 The present invention provides a flowchart of a second embodiment of determining a target keyword in a method for correcting speech recognition results provided in an embodiment of the present invention.
[0046] Figure 5 It is a principle block diagram of a device for correcting speech recognition results provided by an embodiment of the present invention.
[0047] Figure 6 It is a block diagram of the internal structure principle of the terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0049] With the development of automatic speech recognition (ASR) and natural language understanding (NLP) technologies in the field of artificial intelligence, human-computer dialogue (such as chatbots) has also been used in various terminal devices. Users can control various devices with voice by "speaking", complete the set tasks and "chat" with the device without purpose. The process of the terminal device in the dialogue is to convert the user's voice into text through the automatic speech recognition algorithm (ASR), and then use the natural speech understanding algorithm to identify the user's intention and key information, and finally execute the user's voice command or return the required information. However, due to the defects of the device itself or the user's dialect accent, it is easy to cause errors in the text converted from voice, which in turn affects the understanding of the intention and the recognition of key information, and finally cannot return the correct voice recognition results.
[0050] In order to solve the problems of the prior art, the present embodiment provides a method for correcting the results of speech recognition. Through the method of this example, the speech recognition result can be corrected after the voice command issued by the user is recognized, so that the voice command can be accurately executed, and the accuracy of speech recognition is improved. In the specific implementation, the present embodiment first obtains the speech recognition result, and determines the intent information in the speech recognition result and the initial keyword corresponding to the intent information. At this time, the initial keyword determined is obtained directly according to the speech recognition result. Since there may be errors in speech recognition, the initial keyword may not completely match the intent information. In order to accurately execute the voice command, it is necessary to correct the initial keyword. Since the initial keyword is obtained from the speech recognition result, the initial keyword is not completely mismatched with the intent information, but there may be some speech recognition errors that cause the initial keyword to deviate from the intent information. Therefore, the present embodiment can determine the corresponding target keyword based on the initial keyword. The target keyword is obtained after the initial keyword is corrected. The target keyword can eliminate the deviation between the initial keyword and the intent information and perfectly match the intent information. After obtaining the target keyword, this embodiment can replace the initial keyword with the target keyword and associate it with the intention information to form a corresponding relationship between the intention information and the target keyword, thereby completing the error correction of the speech recognition result.
[0051] For example, when the user sends a voice command to the smart speaker, "I want to listen to Jacky Cheung's songs." The voice recognition result is "I want to listen to Zhang Xueyou's songs." The intent information obtained from the voice recognition result is "listen to songs" and the initial keyword is "Zhang Xueyou." However, "Zhang Xueyou" is not a singer, so the smart speaker cannot search for "Zhang Xueyou's" songs. Therefore, it is necessary to correct "Zhang Xueyou." The smart speaker can judge from "Zhang Xueyou" that its real counterpart should be "Jacky Cheung", that is, "Jacky Cheung" is the target keyword, so the target keyword "Jacky Cheung" is associated with the intent information "listen to songs", and the corresponding relationship between the target keyword "Jacky Cheung" and the intent information "listen to songs" can be obtained. Therefore, the new voice recognition result is "listen to Jacky Cheung's songs", which realizes the error correction of the voice recognition result, so that the smart speaker can play Jacky Cheung's songs to the user.
[0052] Exemplary Methods
[0053] The error correction method of the speech recognition result in this embodiment can be applied to terminal devices, such as smart phones, smart speakers, smart TVs and other devices. Figure 1 As shown in , the method specifically includes the following steps:
[0054] Step S100: Obtain a speech recognition result, and determine the intent information in the speech recognition result and an initial keyword corresponding to the intent information.
[0055] Since the present embodiment is to correct the speech recognition result, it is necessary to first obtain the speech recognition result. In the present embodiment, the speech recognition result is obtained after recognizing the voice command issued by the user, which includes intent information and initial keywords corresponding to the intent information. The intent information refers to the user intent expressed in the speech recognition result, that is, the user's needs reflected. For example, in the above example, the speech recognition result is "I want to listen to Zhang Xueyou's songs", then the intent information is "listen to songs". The initial keyword is obtained directly based on the speech recognition result, and the initial keyword corresponds to the intent information. The initial keyword refers to the content that needs to be executed corresponding to the user's intent, which is equivalent to Figure 6 For example, in the above example, if the speech recognition result is "I want to listen to Zhang Xueyou's songs", the initial keyword is "Zhang Xueyou", which means that the user wants to listen to the singer Zhang Xueyou's songs. Therefore, based on the intent information and the initial keyword, it can be concluded that the user's voice command reflects the user's demand - listen to Zhang Xueyou's songs.
[0056] In one implementation, Figure 2 As shown in , the step S100 includes the following steps:
[0057] Step S101: Acquire voice request information, and determine text information corresponding to the voice request information according to the voice request information;
[0058] Step S102: determining the speech recognition result according to the text information;
[0059] Step S103, performing word segmentation processing on the speech recognition result to obtain a word segmentation result;
[0060] Step S104: Obtain the intent information in the speech recognition result and the initial keywords corresponding to the intent information according to the word segmentation result.
[0061] During specific implementation, in order to obtain the voice recognition result, this embodiment needs to first obtain the voice command issued by the user, and perform voice recognition on the voice command to obtain the voice recognition result. Specifically, this embodiment can first obtain voice request information, which is the voice command issued by the user, and the expression is the user's demand. In this embodiment, the acquisition of voice request information can be collected by a voice collection device, such as a microphone device. When the voice collection device on the terminal device collects the voice request information, the voice request information can be a sentence or a paragraph, and the voice request information can be voice recognized to obtain the voice recognition result. In one implementation method, this embodiment can convert the voice in the voice request information into text through a speech recognition model (ASR), thereby obtaining the text information corresponding to the voice request information. When the text information is obtained, the recognition of the voice request information is completed.
[0062] Next, the present embodiment performs word segmentation processing on the text information to obtain the intention information and keyword information. Since the text information is obtained by converting the voice request information into text, the text information reflects a sentence or a paragraph in the voice request information. By performing word segmentation processing on the text information, the text content in the text information can be cut to obtain a number of words or phrases, that is, the word segmentation result is obtained, and then the words or phrases are semantically recognized to determine the intention information and initial keywords included in the text information. For example, when the text information corresponding to the voice request information is: "I want to watch the movie Nezha", after the text information is segmented, the word segmentation result can be obtained: I, want to watch, movie, Nezha, and then according to the word segmentation result, the intention information can be obtained as "watch a movie" and the initial keyword is "Nezha". Of course, after the word segmentation processing is performed in this embodiment, the obtained word segmentation result can be input into a preset intention information and keyword joint extraction model, which is used to extract intention information and keywords from the vocabulary obtained by word segmentation. For example, in this embodiment, the word segmentation results obtained: I, want to watch, movie, Nezha are input into the intention information and keyword joint extraction model, and the intention information obtained is "watch a movie" and the initial keyword is "Nezha".
[0063] In this embodiment, after obtaining the text information, this embodiment can perform an error correction on the text information in advance. This error correction is to correct the typos in the text information obtained after recognizing the voice request information, so as to ensure that the text information can accurately reflect the needs of the user. In one implementation, this embodiment can use a pre-trained error correction model (such as a Soft-mask-bert model) to correct the text information. If there are no typos in the text information, the text information can be directly segmented to obtain the intent information and the initial keyword information. If there are typos in the text information, it is necessary to modify the typos and then perform word segmentation on the modified text information.
[0064] Step S200: Determine, based on the initial keyword, a target keyword that matches the initial keyword.
[0065] Since there may be errors when performing voice recognition on the voice request information, the initial keyword may not completely match the intent information. In order to accurately execute the voice command, the initial keyword needs to be corrected. Since the initial keyword is obtained from the voice recognition result, the initial keyword is not completely inconsistent with the intent information, but there may be some voice recognition errors that cause the initial keyword to deviate from the intent information. Therefore, this embodiment can determine the corresponding target keyword based on the initial keyword. The target keyword is obtained after the initial keyword is corrected. The target keyword refers to the content that the user's intention really needs to execute. For example, in the above example, the voice recognition result is "I want to listen to Zhang Xueyou's song", then the initial keyword is "Zhang Xueyou", and "Zhang Xueyou" is not a singer, so the terminal device cannot search for "Zhang Xueyou's" song. Therefore, it is necessary to correct "Zhang Xueyou", and it is judged according to "Zhang Xueyou" that it really corresponds to "Jacky Cheung", that is, "Jacky Cheung" is the target keyword. The target keyword in this embodiment can eliminate the deviation between the initial keyword and the intent information and perfectly match the intent information.
[0066] In one implementation, Figure 3 As shown in , the step S200 specifically includes the following steps:
[0067] Step S201: Match the initial keyword with a preset mapping file, wherein the mapping file is provided with a target keyword corresponding to the initial keyword;
[0068] Step S202: if the match is successful, obtaining a target keyword corresponding to the initial keyword;
[0069] Step S203: If the match is unsuccessful, obtain historical behavior data associated with the initial keyword according to the initial keyword;
[0070] Step S204: Obtain the text content with a usage frequency greater than a preset threshold in the historical behavior data, and use the text content as the target keyword.
[0071] In specific implementation, when the initial keyword is obtained, this embodiment first determines whether the initial keyword needs to be corrected. If the initial keyword does not need to be corrected, the response operation can be directly performed according to the determined intent information and the initial keyword. For example, when the intent information is an instruction type intent (such as turning on or off the speaker, etc.), since the instruction type intent is clear and there is no ambiguity, the speech recognition result can be directly executed without correcting the speech recognition result. However, when the intent information is a search type intent (such as movie search, music search, poem search, takeout restaurant search, scenic spot and place name search, etc.), since the search type intent has rich content and there is ambiguity, the speech recognition result cannot be directly executed, and the initial keyword needs to be corrected.
[0072] In one implementation manner, in order to correct the initial keyword, a preset mapping file can be used. The mapping file is set with a target keyword corresponding to the initial keyword, that is, one initial keyword corresponds to one target keyword. Therefore, when the initial keyword is obtained, the initial keyword can be matched with the mapping file. If the match is successful, the matched target keyword is obtained, that is, the keyword that truly corresponds to the intent information is found. For example, the mapping relationship between the initial keyword and the target keyword set in the mapping file includes:
[0073] Ye Luo Li Warriors - The Fairytale of Ye Luo Li Flying Dog Feline - Flying Dog MOCO
[0074] Know Whether - Do You Know That It Should Be Green and Fat and Red and Thin Tom Hiddleston - Tom Hiddleston
[0075] In this way, when the initial keyword is "Know Whether", the corresponding one can be obtained as "Do You Know That It Should Be Green and Fat and Red and Thin". Therefore, "Do You Know That It Should Be Green and Fat and Red and Thin" is the target keyword.
[0076] If the match between the initial keyword and the mapping file is unsuccessful, it means that the target keyword corresponding to the initial keyword does not exist in the mapping file. At this time, the target keyword that matches the initial keyword information can be determined based on the historical behavior data. In specific implementation, this embodiment first obtains the historical behavior data in the terminal device, and then obtains the historical behavior data associated with the initial keyword information from these historical behavior data. The historical behavior data reflects the operations performed by the terminal device in the past period of time, that is, it reflects the voice instructions received and executed in the past period of time, which includes intent information and corresponding text content (that is, the keywords corresponding to the intent information). Since this embodiment analyzes the historical behavior data associated with the initial keyword, that is to say, these historical behavior data are all related to the initial keyword. For example, there are some text contents in these historical behavior data that are homophonic or similar in syllable to the initial keyword, so these text contents are related to the initial keyword. If in the historical behavior data, the usage frequency of a certain text content is greater than a preset threshold, it means that the terminal device uses these "usage frequencies greater than the preset threshold" text contents when executing the intent information corresponding to the initial keyword. Therefore, it can be concluded that these "usage frequencies greater than the preset threshold" text contents are matched with the initial keyword, and these "usage frequencies greater than the preset threshold" text contents should correspond to the intent information. Therefore, these ""usage frequencies greater than the preset threshold"" text contents are used as the target keywords.
[0077] For example, when the speech recognition result is: I want to watch the movie Grandma's Dumpling House. The intent information is: watch a movie. The initial keyword is: Grandma's Dumpling House. However, there is no target keyword corresponding to "Grandma's Dumpling House" in the mapping file. At this time, the historical behavior data of the terminal device is obtained, and "Grandma's Dumpling House" exists in the historical behavior data. "Grandma's Dumpling House" and "Grandma's Dumpling House" are similar in syllable. The "Grandma's Dumpling House" movie has been watched by the user more than 10 times, and each time more than 20% of the length of the movie has been watched, which means that the frequency of use of "Grandma's Dumpling House" exceeds the threshold, so it means that "Grandma's Dumpling House" and "Grandma's Dumpling House" are matched, that is, when the terminal device responds to the speech recognition result of "I want to watch the movie Grandma's Dumpling House", the keyword used is "Grandma's Dumpling House", so "Grandma's Dumpling House" can be used as the target keyword.
[0078] In another implementation, Figure 4 As shown in , step S200 in this embodiment may also include:
[0079] Step S21, according to the initial keyword, obtaining the entry information associated with the initial keyword;
[0080] Step S22: Perform weight analysis on the entry information to determine the target keyword.
[0081] Since the user's voice request information is random and the content of the request is also random, the terminal device may not be able to directly determine and identify the target keyword corresponding to the initial keyword based on the mapping file. For this reason, this embodiment needs to temporarily set the target keyword corresponding to the initial keyword. In specific implementation, this embodiment first obtains the entry information associated with the initial keyword based on the initial keyword. In this embodiment, the pinyin information, text information and string information corresponding to the initial keyword can be obtained respectively; according to the pinyin information, the text information and the string information, the first entry information corresponding to the pinyin information and the second entry information corresponding to the text information, and the third entry information corresponding to the string information are searched respectively. In other words, this embodiment can provide three ways to search for entry information, which can be searched according to the pinyin information, text information and string information of the initial keyword, so as to obtain the first entry information, the second entry information and the third entry information.
[0082] For example, when the initial keyword is: Forest Mirror, the entry information searched based on the pinyin information is: Immersive.
[0083] When the initial keyword is: the girl by the bridge, the entry information searched based on the text information is: the girl by the bridge.
[0084] The initial keyword is: Tianqi explains my world, and the entry information searched according to the string information is: my world Tianqi explains. Among them, "Tianqi explains my world" and "My world Tianqi explains" have the same string.
[0085] After the entry information is searched, the embodiment can perform weight analysis on the entry information to determine the target keyword. In one implementation, the embodiment can first perform deduplication processing on the first entry information, the second entry information and the third entry information to prevent duplicate entry information and obtain candidate entry information. Then, the weight corresponding to the candidate entry information is obtained, and the score information of each candidate entry information is calculated. Finally, according to the score information, the target entry information is determined from the candidate entry information, and the target entry information is used as the target keyword. Specifically, since the embodiment can pre-set the weights for searching the entry information according to the pinyin information, text information and string information of the initial keyword, which are Wx, Wy, and Wz respectively, and each candidate entry information is searched based on the above three search methods, the embodiment can obtain the weight, which is the weight corresponding to the candidate entry information. And each method of searching for entry information will have its own sorting method. The embodiment can be sorted according to the accuracy of the searched entry information (i.e., the similarity between the searched entry information and the initial keyword). Each candidate entry information is searched based on different search methods, so this embodiment can first sort the accuracy of each candidate entry information searched based on the above three search methods to obtain their respective ranking values (i.e., used to measure accuracy), and then calculate the score information of each candidate entry information searched based on the above search methods according to the weight of each search method. The formula is as follows:
[0086] score(A)=(Wx*X A +Wy*Y A +Wz*Z A ) / (Wx+Wy+Wz),
[0087] Among them, X A Y is the ranking value of the candidate entry information A when searching according to the pinyin information; A is the ranking value of candidate term information A when searching based on text information; where Z A It is the ranking value of the candidate term information A when it is searched based on the string information.
[0088] When the score information of each candidate entry information can be obtained through a computational method, according to the score information, in this embodiment, the target entry information with the highest score can be determined. This target entry information is the one that is closest to the initial keyword and corresponds to the intent information. Therefore, in this embodiment, this target entry information is used as the target keyword. In one implementation, the weights in this embodiment can be set by customizing various dimension information to more accurately sort the candidate entry information. For example, when performing a movie search, the weights can be set according to information such as the release time, click-through rate, and movie rating of the movie. Each candidate entry information is analyzed from multiple dimensions to screen out the target keyword that best matches the intent information, so as to more accurately correct the initial keyword. In addition, after the target keyword is determined by the above method, since there is no target keyword corresponding to the initial keyword in the mapping file at the beginning, in this embodiment, the corresponding relationship between the determined target keyword and the initial keyword that matches it can be added to the mapping file so that it can be directly used in subsequent steps. For example, if the initial keyword is "and the mouse", after the above three search methods and weight analysis, the determined target keyword is "Tom and Jerry". In this way, the corresponding relationship between "and the mouse" and "Tom and Jerry" can be added to the mapping file. When correcting the initial keyword of "and the mouse" in subsequent steps, the target keyword that matches it, which is "Tom and Jerry", can be directly obtained.
[0089] Step S300: Replace the initial keyword with the target keyword and associate it with the intent information to form the corresponding relationship between the intent information and the target keyword, and obtain the corrected speech recognition result.
[0090] After the target keyword is determined, since the target keyword is obtained by correcting the initial keyword, the target keyword reflects the content that the user actually intends to execute. There is a corresponding relationship between the intent information obtained from the speech recognition result and the initial keyword. However, due to the error of speech recognition, the initial keyword cannot fully match the intent information. After analysis, it is found that the target keyword corresponding to the initial keyword matches the intent information. Therefore, in order to correct the speech recognition result in this embodiment, the target keyword is used to replace the initial keyword, and the target keyword is associated with the intent information to obtain the corresponding relationship between the target keyword and the intent information. In this way, there is a corresponding relationship between the intent information and the target keyword in the speech recognition result, and the terminal device can perform corresponding operations according to the intent information and the target keyword.
[0091] In addition, after constructing the correspondence between the target keyword and the intent information, the embodiment can obtain historical behavior data, which records all the intent information and corresponding keywords executed within a period of time. Therefore, the embodiment can count the usage records of each target keyword in the historical behavior data; then determine the number of cancellations of the intent information corresponding to each target keyword based on the usage records, and the cancellation number is used to reflect the number of times the operation corresponding to the intent information is canceled. For example, if the terminal device searches for the corresponding content of the intent information according to the target keyword, and the user issues an exit instruction, it means that the operation of searching the content required by the intent information with the target keyword is canceled at this time, that is, the content searched by the target keyword may not be what the user wants. If the cancellation number exceeds the number threshold (for example, three times), it means that the target keyword cannot search for the content required by the intent information, that is, the target keyword and the intent information are not completely matched, so the embodiment will disconnect the association between the target keyword and the intent information whose cancellation number exceeds the number threshold, and will also delete the corresponding relationship between the target keyword and the initial keyword from the mapping file to ensure that the corresponding operation is performed more accurately according to the speech recognition result.
[0092] In summary, the present embodiment provides a method for correcting the error of a speech recognition result. The present embodiment first obtains the speech recognition result, and determines the intent information in the speech recognition result and the initial keyword corresponding to the intent information. The initial keyword determined at this time is obtained directly according to the speech recognition result. Since there may be errors in speech recognition, the initial keyword may not completely match the intent information. In order to accurately execute the voice instruction, the initial keyword needs to be corrected. Since the initial keyword is obtained from the speech recognition result, the initial keyword is not completely mismatched with the intent information, but there may be some speech recognition errors that cause deviations between the initial keyword and the intent information. Therefore, the present embodiment can determine the corresponding target keyword based on the initial keyword. The target keyword is obtained after the initial keyword is corrected. The target keyword can eliminate the deviation between the initial keyword and the intent information and perfectly match the intent information. After obtaining the target keyword, the present invention can replace the initial keyword with the target keyword, and associate it with the intent information to form a corresponding relationship between the intent information and the target keyword, thereby completing the error correction of the speech recognition result, so that the voice instruction can be accurately executed, and the accuracy of speech recognition is improved.
[0093] Exemplary Devices
[0094] like Figure 5As shown in , an embodiment of the present invention provides a device for correcting speech recognition results, and the device includes: an initial keyword determination module 10, a target keyword determination module 20, and a speech recognition result error correction module 30. Specifically, the initial keyword determination module 10 is used to obtain a speech recognition result, and determine the intent information in the speech recognition result and the initial keyword corresponding to the intent information. The target keyword determination module 20 is used to determine a target keyword that matches the initial keyword based on the initial keyword. The speech recognition result error correction module 30 is used to associate the target keyword with the intent information, form a corresponding relationship between the intent information and the target keyword, and obtain a speech recognition result after error correction.
[0095] In one implementation, the initial keyword determination module 10 includes:
[0096] A text information acquisition unit, used to acquire voice request information, and determine text information corresponding to the voice request information according to the voice request information;
[0097] A recognition result determination unit, used to determine the speech recognition result according to the text information;
[0098] A word segmentation result acquisition unit, used to perform word segmentation processing on the speech recognition result to obtain a word segmentation result;
[0099] The initial keyword determination unit is used to obtain the intention information in the speech recognition result and the initial keyword corresponding to the intention information according to the word segmentation result.
[0100] In one implementation, the target keyword determination module 20 includes:
[0101] A mapping file matching unit, used for matching the initial keyword with a preset mapping file, wherein the mapping file is provided with a target keyword corresponding to the initial keyword;
[0102] The target keyword determination unit is used to obtain the target keyword corresponding to the initial keyword if the match is successful.
[0103] In one implementation, the target keyword determination module 20 further includes:
[0104] A term information acquisition unit, configured to acquire, based on the initial keyword, term information associated with the initial keyword;
[0105] The weight analysis unit is used to perform weight analysis on the entry information to determine the target keyword.
[0106] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Figure 6 As shown. The terminal device includes a processor, a memory, a network interface, a display screen, and a temperature sensor connected through a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for correcting speech recognition results is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the terminal device is pre-set inside the terminal device to detect the operating temperature of the internal device.
[0107] Those skilled in the art will understand that Figure 6 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0108] In one embodiment, a terminal device is provided. The terminal device includes a memory, a processor, and a speech recognition result error correction program stored in the memory and executable on the processor. When the processor executes the speech recognition result error correction program, the following operation instructions are implemented:
[0109] Acquire a speech recognition result, and determine intent information in the speech recognition result and an initial keyword corresponding to the intent information;
[0110] Determining, based on the initial keyword, a target keyword that matches the initial keyword;
[0111] The target keyword replaces the initial keyword and is associated with the intention information to form a corresponding relationship between the intention information and the target keyword, thereby obtaining a speech recognition result after error correction.
[0112] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0113] In summary, the present invention discloses a method, apparatus, terminal device and storage medium for correcting speech recognition results, the method comprising: obtaining speech recognition results, and determining intent information in the speech recognition results and initial keywords corresponding to the intent information; determining target keywords matching the initial keywords based on the initial keywords; replacing the initial keywords with the target keywords, and associating them with the intent information to form a corresponding relationship between the intent information and the target keywords, and obtaining speech recognition results after error correction. The present invention can correct the initial keywords corresponding to the intent information in the speech recognition results, determine the target keywords corresponding to the intent information, and associate the target keywords with the intent information, thereby achieving error correction to facilitate more accurate speech execution.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for correcting speech recognition results, characterized in that: The method comprises: Acquire a speech recognition result, and determine intent information in the speech recognition result and an initial keyword corresponding to the intent information; If the intent information is a search intent, determining a target keyword matching the initial keyword based on the initial keyword; Replacing the initial keyword with the target keyword and associating it with the intention information to form a corresponding relationship between the intention information and the target keyword, so as to complete error correction of the speech recognition result; The step of determining, based on the initial keyword, a target keyword that matches the initial keyword includes: Matching the initial keyword with a preset mapping file, wherein the mapping file is provided with a target keyword corresponding to the initial keyword; If the match is successful, the target keyword corresponding to the initial keyword is obtained; If the match is unsuccessful, then obtaining historical behavior data associated with the initial keyword; Acquire text content with a usage frequency greater than a preset threshold in the historical behavior data, and use the text content as the target keyword; or, The step of determining, based on the initial keyword, a target keyword that matches the initial keyword includes: Acquire entry information associated with the initial keyword; Performing weight analysis on the entry information to determine the target keyword; The acquiring of the entry information associated with the initial keyword includes: Respectively obtain the pinyin information, text information and character string information corresponding to the initial keyword; According to the pinyin information, the text information and the character string information respectively, first term information corresponding to the pinyin information, second term information corresponding to the character information and third term information corresponding to the character string information are searched out.
2. The method for correcting speech recognition results according to claim 1, characterized in that: The obtaining of the speech recognition result and determining the intent information in the speech recognition result and the initial keyword corresponding to the intent information include: Acquire voice request information, and determine text information corresponding to the voice request information according to the voice request information; Determining the speech recognition result according to the text information; The speech recognition result is subjected to word segmentation processing to obtain the intent information in the speech recognition result and the initial keywords corresponding to the intent information.
3. The method for correcting speech recognition results according to claim 1, characterized in that: The step of performing weight analysis on the entry information to determine the target keyword includes: performing deduplication processing on the first term information, the second term information and the third term information to obtain candidate term information; Obtain the weight corresponding to the candidate entry information, and calculate the score information of each candidate entry information; According to the score information, target term information is determined from the candidate term information, and the target term information is used as the target keyword.
4. The method for correcting speech recognition results according to any one of claims 1 to 3, characterized in that: The method further comprises: Acquire historical behavior data, and count usage records of each target keyword in the historical behavior data; Determine, based on the usage record, the number of times the intent information corresponding to each target keyword is cancelled; If the number of cancellations exceeds a threshold, the association between the target keyword whose number of cancellations exceeds the threshold and the intention information is disconnected.
5. A speech recognition result error correction device, characterized in that: include: An initial keyword determination module, used to obtain a speech recognition result, and determine the intent information in the speech recognition result and the initial keyword corresponding to the intent information; A target keyword determination module, configured to determine a target keyword matching the initial keyword based on the initial keyword if the intent information is a search intent; A speech recognition result error correction module, used to replace the initial keyword with the target keyword and associate it with the intention information to form a corresponding relationship between the intention information and the target keyword, so as to complete the error correction of the speech recognition result; The target keyword determination module includes: A mapping file matching unit, used for matching the initial keyword with a preset mapping file, wherein the mapping file is provided with a target keyword corresponding to the initial keyword; A target keyword determination unit is used to obtain a target keyword corresponding to the initial keyword if the match is successful, and to obtain historical behavior data associated with the initial keyword if the match is unsuccessful, obtain text content with a usage frequency greater than a preset threshold in the historical behavior data, and use the text content as the target keyword; The target keyword determination module also includes: A term information acquisition unit, used to acquire term information associated with the initial keyword; A weight analysis unit, used to perform weight analysis on the entry information to determine the target keyword; The entry information acquisition unit is specifically used for: Respectively obtain the pinyin information, text information and character string information corresponding to the initial keyword; According to the pinyin information, the text information and the character string information respectively, first term information corresponding to the pinyin information, second term information corresponding to the character information and third term information corresponding to the character string information are searched out.
6. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a speech recognition result error correction program stored in the memory and executable on the processor. When the processor executes the speech recognition result error correction program, the steps of the speech recognition result error correction method as described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a speech recognition result error correction program, and when the speech recognition result error correction program is executed by the processor, the steps of the speech recognition result error correction method according to any one of claims 1 to 4 are implemented.
