Voice interaction method and apparatus thereof, electronic device, and storage medium

By updating the hot word library of the speech recognition model and calculating the comprehensive score, the problem of inaccurate recognition of specific words by the speech recognition model was solved, and the accuracy of voice interaction was improved.

CN117174077BActive Publication Date: 2026-11-24BOE TECHNOLOGY GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210592298.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2026-11-24
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

Existing speech recognition technologies are not very accurate when recognizing unique personal names, song titles, place names, or proper nouns.

Method used

By responding to the user's preset voice request, acquiring voice data and performing voice recognition, updating the hot word library of the voice recognition model, recording command words that fail to match and prompting the user to update the hot words when necessary, adjusting the hot word library using edit distance and semantic similarity, and calculating a comprehensive score by combining acoustic score and hot word score to determine the command word.

Benefits of technology

It improves the accuracy of speech recognition models in recognizing specific words and enhances the understanding ability in voice interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117174077B_ABST
    Figure CN117174077B_ABST
Patent Text Reader

Abstract

This application discloses a voice interaction method, apparatus, electronic device, and storage medium. The voice interaction method includes: responding to a user's preset voice request to update voice hotwords; acquiring voice data input by the user according to a preset command template; performing speech recognition on the voice data according to the preset command template to obtain target voice hotwords; and updating the hotword library of the speech recognition model according to the target voice hotwords. The voice interaction method, apparatus, electronic device, and storage medium of this application can add unfamiliar words from the user's voice interaction request to the hotword library, enabling the speech recognition model to recognize the corresponding command and improve the problem of speech recognition models failing to accurately understand user voice commands in voice interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of voice interaction technology, and in particular to a voice interaction method, apparatus, electronic device and storage medium. Background Technology

[0002] In practical applications of speech recognition, the recognition effect is relatively good for commonly used words. However, for some unique personal names, song titles, place names, or specialized terms in a certain field, such as the personal name Song Xingchen, the song title Internationale, the place name Lize Business District, and specialized speech recognition term decoders, the speech recognition accuracy is not high. Summary of the Invention

[0003] In view of this, the present invention aims to at least partially solve one of the problems in the related art. Therefore, the object of this application is to provide a voice interaction method, apparatus, electronic device, and storage medium thereof.

[0004] This application provides a voice interaction method. The voice interaction method includes: in response to a user's preset voice request to update voice hot words, acquiring voice data input by the user according to a preset command template; performing voice recognition on the voice data according to the preset command template to obtain target voice hot words; and updating the hot word library of the voice recognition model according to the target voice hot words.

[0005] In some implementations, before the step of obtaining the voice data input by the user according to the preset command template in response to the user's preset voice request to update voice hot words, the voice interaction method includes: if the user's input voice interaction request fails to match the command, recording the number of consecutive interaction recognition failures, adding the command word corresponding to the voice interaction request to the list of consecutively failed command words; and prompting the user to update voice hot words if the number of consecutive interaction recognitions is greater than a threshold and the semantic similarity between the command words in the list of consecutively failed command words meets a preset condition.

[0006] In some implementations, the voice interaction method includes: if the user-input voice interaction request matching command is successful, clearing the number of consecutive interaction recognitions and the list of consecutively failed command words for which the matching command failed.

[0007] In some implementations, after the steps of recording the number of consecutive failed interaction recognitions and adding the command word corresponding to the voice interaction request to the list of consecutively failed command words when the user-input voice interaction request fails to match the command, the voice interaction method includes: determining the semantic similarity based on the edit distance and / or the longest substring between the command words in the list of consecutively failed command words.

[0008] In some embodiments, the voice interaction method includes: acquiring a voice interaction request input by a user; processing the voice interaction request according to the hot word library and the speech recognition model to obtain a command word; and executing a control instruction corresponding to the command word.

[0009] In some implementations, the step of processing the voice interaction request to obtain a command word based on the hot word library and the speech recognition model includes: obtaining the acoustic score and hot word score of the hot words in the hot word library; determining the number of words with an edit distance of a set value from the hot words; calculating the comprehensive score corresponding to the hot words based on the acoustic score, the hot word score, and the number of words; and determining the command word from the hot words in the hot word library based on the comprehensive score.

[0010] In some implementations, the step of calculating the comprehensive score corresponding to the speech hot words based on the acoustic score, the hot word score, and the number of words is achieved through the following conditional expression:

[0011]

[0012] Where argmaxlogP(y|x) is the acoustic score, and λlogP C (y) represents the score of the hot words. Let λ be the number of words, and μ be the corresponding coefficients.

[0013] In some implementations, the step of calculating the comprehensive score corresponding to the speech hot words based on the acoustic score, the hot word score, and the number of words is achieved through the following conditional expression:

[0014]

[0015] Where argmaxlogP(y|x) is the acoustic score, and λlogP C (y) represents the score of the hot words. Let λ be the number of words, and λ be the corresponding coefficient.

[0016] This application also provides a voice interaction device. The voice interaction device includes: an acquisition module, a recognition module, and a hot word database update module. The acquisition module is used to acquire voice data input by the user according to a preset command template in response to a user's preset voice request to update voice hot words; the recognition module is used to perform voice recognition on the voice data according to the preset command template to obtain target voice hot words; the hot word database update module is used to update the hot word database of the voice recognition model according to the target voice hot words.

[0017] This application also provides an electronic device. The electronic device includes a processor and a memory, the memory storing a computer program, which, when executed by the processor, implements the voice interaction method described in any of the above embodiments.

[0018] This application also provides a non-volatile computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, it causes the processors to perform the voice interaction method described in any of the above embodiments.

[0019] The voice interaction method, apparatus, electronic device, and storage medium of this application can add unfamiliar words in the user's voice interaction request to the hot word library, so that the user's voice interaction request can be recognized by the voice recognition model to obtain the corresponding command, thereby improving the problem that the voice recognition model cannot accurately understand the user's voice command in voice interaction.

[0020] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0021] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0022] Figure 1 This is a flowchart illustrating a voice interaction method according to certain embodiments of this application;

[0023] Figure 2 This is a schematic diagram of the structure of a voice interaction device according to certain embodiments of this application;

[0024] Figure 3 This is a flowchart illustrating a voice interaction method according to certain embodiments of this application;

[0025] Figure 4 This is a schematic diagram of the structure of a voice interaction device according to certain embodiments of this application;

[0026] Figure 5 This is a flowchart illustrating a voice interaction method according to certain embodiments of this application;

[0027] Figure 6 This is a schematic diagram of the structure of a voice interaction device according to certain embodiments of this application;

[0028] Figure 7 This is a flowchart illustrating a voice interaction method according to certain embodiments of this application;

[0029] Figure 8 This is a schematic diagram of the structure of a voice interaction device according to certain embodiments of this application;

[0030] Figure 9 This is a flowchart illustrating a voice interaction method according to certain embodiments of this application;

[0031] Figure 10 This is a schematic diagram of the structure of a voice interaction device according to certain embodiments of this application;

[0032] Figure 11 This is a flowchart illustrating a voice interaction method according to certain embodiments of this application;

[0033] Figure 12 This is a schematic diagram of the structure of an electronic device according to certain embodiments of this application;

[0034] Figure 13 This is a schematic diagram of the structure of a computer-readable storage medium according to certain embodiments of this application. Detailed Implementation

[0035] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0036] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0037] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection, an electrical connection, or a connection that allows communication between them; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0038] The following disclosure provides many different implementations or examples for carrying out different structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or reference letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed.

[0039] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0040] Please see Figure 1 This application provides a voice interaction method. The voice interaction method includes:

[0041] 01: In response to the user's request to update the preset voice hot words, obtain the voice data input by the user according to the preset command template;

[0042] 02: Perform speech recognition on the speech data according to the preset command template to obtain target speech hot words;

[0043] 03: Update the hot word library of the speech recognition model based on the hot words of the target speech.

[0044] Please combine Figure 2 This application also provides a voice interaction device 10. The voice interaction device 10 includes: an acquisition module 11, a recognition module 13, and a hot word database update module 13. The acquisition module 11 is used to acquire voice data input by the user according to a preset command template in response to a user's preset voice request to update voice hot words; the recognition module 12 is used to perform voice recognition on the voice data according to the preset command template to obtain target voice hot words; the hot word database update module 13 is used to update the hot word database of the voice recognition model according to the target voice hot words.

[0045] Understandably, when a user issues a voice request containing unfamiliar words, the speech recognition model cannot identify the correct command corresponding to that voice request. In this case, the user can issue a preset voice request to update the hot word library in the speech recognition model. This update adds the unfamiliar words from the voice request to the hot word library, enabling the speech recognition model to recognize the corresponding command.

[0046] First, in response to a user's preset voice request to update voice hotwords, the system acquires the voice data input by the user according to a preset command template. This means that after the user issues a preset voice request to update voice hotwords, the system can acquire the voice data input by the user according to the preset command template. For example, the preset voice request might be "update voice hotwords." The voice data input by the user according to the preset command template means, for example, if the preset command template is "Li in 'luggage, Xiao in 'carefree'", and the corresponding hotword identified by this preset command template is "Li Xiao", then the voice data input by the user according to this preset command template would be "Bi in 'closed,' Deng in 'extinguish'."

[0047] Then, the target speech hot words are obtained by performing speech recognition on the speech data according to the preset command template. This means that the speech recognition model can recognize the target speech hot words input by the user according to the fixed sentence pattern of the preset naming template. For example, the fixed sentence pattern of the preset command template "Li of luggage, Xiao of dashing" can be used to recognize the target speech hot words of the user input speech data "closed, light off" as "light off".

[0048] Finally, the hot word library of the speech recognition model is updated based on the target speech hot words. For example, the target speech hot word identified above, "turn off the lights," can be added to the hot word library of the speech recognition model.

[0049] Thus, the voice interaction method of the present invention can add unfamiliar words in the user's voice interaction request to the hot word library, so that the user's voice interaction request can be recognized by the voice recognition model to obtain the corresponding command, thereby improving the problem that the voice recognition model cannot accurately understand the user's voice command in voice interaction.

[0050] Please see Figure 3 Before step 01, the voice interaction method includes:

[0051] 011: If the user's voice interaction request fails to match the command, record the number of consecutive interaction recognition failures and add the command word corresponding to the voice interaction request to the list of consecutively failed command words.

[0052] 013: If the number of consecutive interaction recognitions exceeds the threshold and the semantic similarity between command words in the list of consecutively failed command words meets the preset conditions, prompt the user to update the voice hot words.

[0053] Please see Figure 4The voice interaction device 10 also includes a recording module 111 and a prompting module 113. The recording module 111 is used to record the number of consecutive interaction recognition failures when the user's input voice interaction request fails to match the command, and to add the command word corresponding to the voice interaction request to the list of consecutively failed command words; the prompting module 113 is used to prompt the user to update the voice hot words when the number of consecutive interaction recognitions exceeds a threshold and the semantic similarity between the command words in the list of consecutively failed command words meets a preset condition.

[0054] If a user's voice interaction request fails to match a command, the system records the number of consecutive failed interactions and adds the command word corresponding to the voice interaction request to the list of consecutive failed command words. For example, if the user's voice interaction request is "play the Internationale," and the corresponding command cannot be matched in the speech model's recognition results, then the voice interaction request fails to match a command. In this case, the number of consecutive failed interactions can be recorded, and this number can be two or more.

[0055] If the number of consecutive failed command recognition interactions exceeds a threshold, and the semantic similarity between command words in the consecutively failed command word list meets a preset condition, the user is prompted to update the voice hot words. The threshold can be two times, and the consecutively failed command word list is a table consisting of consecutively failed command words. For example, if the command word list generated by four consecutive failed user interactions includes "turn off lights," "turn off lights," "black lights," and "close lights," and the four user-input command words all point to the command "turn off lights," and the semantic similarity between the four command words in the consecutively failed command word list meets a preset condition, then the user can be prompted to update the voice hot words.

[0056] For example, the preset condition could be a semantic similarity of 60%. If the semantic similarity between the four command words is 80%, it means that the semantic similarity between the four command words meets the preset condition, and the user can be prompted to update the voice hot words.

[0057] Thus, the voice interaction method of this application can record the number of consecutive interaction recognition failures when matching commands fail, and add the command words corresponding to the voice interaction request to the list of consecutively failed command words. When the number of consecutive interaction recognitions is greater than the threshold, and the semantic similarity between the command words in the list of consecutively failed command words meets the preset conditions, the user is prompted to update the voice hot words.

[0058] Please see Figure 5 Voice interaction methods include:

[0059] 015: If the user's voice interaction request matching command is successful, clear the number of consecutive interaction recognition failures and the list of consecutive failed command words.

[0060] Please see Figure 6 The voice interaction device 10 also includes a clearing module 115. The clearing module 115 is used to clear the number of consecutive interaction recognition failures and the list of consecutive failed command words when the user's input voice interaction request matching command is successful.

[0061] Specifically, when a user's voice interaction request successfully matches a command, the count of consecutive failed interactions and the list of consecutive failed command words are cleared. For example, if the count of consecutive failed interactions is 2, and the list of consecutive failed command words includes "turn off the lights," and the next user's voice interaction request is "turn off the lights," and a corresponding "turn off the lights" command is matched, the corresponding "turn off the lights" command can be returned to complete the voice interaction. Accordingly, the count of consecutive failed interactions is cleared or set to 0, and the list of consecutive failed command words is cleared. In other words, when a voice interaction request successfully matches a command, the user can complete the voice interaction based on the currently input voice request without needing to add hot words. Therefore, the count of consecutive failed interactions can be recalculated, and the list of consecutive failed command words can be re-recorded.

[0062] Please see Figure 7 After step 011, the voice interaction method includes:

[0063] 012: Determine semantic similarity based on the edit distance and / or longest substring between command words in the list of consecutively failed command words.

[0064] Please combine Figure 8 The voice interaction device 10 also includes a similarity determination module 112. The similarity determination module 112 is used to determine the semantic similarity based on the edit distance and / or the longest substring between command words in the list of consecutively failed command words.

[0065] Semantic similarity is determined based on the edit distance and / or longest substring between command words in the list of consecutively failed command words. That is, the voice interaction method of the present invention can measure the semantic similarity between command words by comparing the edit distance or longest substring between command words in the list of consecutively failed command words according to a predefined rule.

[0066] Edit distance refers to the minimum number of editing operations required to transform one string into another; it describes how similar two strings are. Allowed editing operations include substitutions, insertions, and deletions. For example, "Turn up volume" -> "Turn up volume" simply requires replacing "high" with "large," resulting in an edit distance of 1; "Please turn off the lights" -> "Please turn off the lights" requires replacing "off" with "turn off" and "close" with "turn off," resulting in an edit distance of 2; "Turn up volume" -> "Please turn up the TV volume" requires inserting "please" before "turn up" and "TV" between "turn up" and "volume," resulting in an edit distance of 3.

[0067] For example, the command words in the list of consecutively failed command words include "turn off lights," "turn off lights," "turn off lights," and "turn off lights." The edit distance between "turn off lights," "turn off lights," "turn off lights," and "turn off lights" is 1, which means that these four consecutively failed command words have a high degree of semantic similarity, that is, the meanings of "turn off lights," "turn off lights," "turn off lights," and "turn off lights" are relatively similar.

[0068] The longest substring is the longest substring without repeating characters. For example, in a list of consecutively failed command words, the command words include "turn off the lights, turn off the lights, turn off the lights, turn off the lights". The longest substring among "turn off the lights", "turn off the lights", "turn off the lights", and "turn off the lights" is 1, which can also indicate that these four consecutively failed command words have a high degree of semantic similarity, that is, the meanings of "turn off the lights", "turn off the lights", "turn off the lights", and "turn off the lights" are relatively similar.

[0069] Thus, the voice interaction method of the present invention can measure the semantic similarity between command words by comparing the edit distance and / or the longest substring rule in the list of consecutively failed command words, thereby obtaining the semantic similarity between each consecutively failed command word, and laying the foundation for determining whether the semantic similarity between command words in the list of consecutively failed command words meets the preset conditions.

[0070] Furthermore, users have found that certain words in voice interaction requests are not accurately recognized during voice interaction because the influence of hot words in the hot word library causes the original normal words in the voice interaction request to be misrecognized. For example, when "turn up the volume" is set as a hot word, the user's command word "turn down the volume" in the voice interaction request is often recognized as "turn up the volume".

[0071] In view of this, please refer to Figure 9 Voice interaction methods include:

[0072] 04: Obtain user input for voice interaction requests;

[0073] 05: Process the voice interaction request based on the hot word library and speech recognition model to obtain the command word;

[0074] 06: Execute the control command corresponding to the command word.

[0075] Please see Figure 10 The voice interaction device also includes a voice processing module 15 and an instruction execution module 16.

[0076] Please combine Figure 2 The acquisition module 11 is used to acquire the user's input voice interaction request; the voice processing module 15 is used to process the voice interaction request according to the hot word library and the voice recognition model to obtain the command word; the instruction execution module 16 is used to execute the control instruction corresponding to the command word.

[0077] Specifically, for a user-initiated voice interaction request, the interaction method of the present invention can first process the voice interaction request according to a hot word library and a speech recognition model to obtain command words, thereby executing the control instructions corresponding to the command words.

[0078] If a user inputs a voice interaction request such as "turn down the TV volume", and the hot word library contains the hot word "turn down the volume", then the voice interaction request can be processed according to the hot word library and the voice recognition model to obtain the command word "turn down the volume", thereby executing the control command corresponding to the command word "turn down the volume".

[0079] Thus, the interaction method of the present invention can first process the voice interaction request according to the hot word library and the speech recognition model to obtain the command word, and then execute the control instruction corresponding to the command word.

[0080] Please see Figure 11 Step 05 includes:

[0081] 051: Obtain the acoustic score and hot word score of the speech hot words in the hot word library;

[0082] 052: Determine the number of words whose edit distance from the voice hot words is a set value;

[0083] 053: Calculate the comprehensive score of the corresponding speech hot words based on the acoustic score, hot word score, and vocabulary quantity;

[0084] 054: Determine the command word from the speech hot words in the hot word database based on the comprehensive score.

[0085] Please combine Figure 10 The speech processing module 15 is used to obtain the acoustic score and hot word score of the speech hot words in the hot word library; determine the number of words with an edit distance of a set value from the speech hot words; calculate the comprehensive score of the corresponding speech hot words based on the acoustic score, hot word score and number of words; and determine the command word from the speech hot words in the hot word library based on the comprehensive score.

[0086] First, the acoustic scores and hot word scores of the speech hot words in the hot word database are obtained. Specifically, the user's voice interaction request can be input into the decoder, and the acoustic score of each speech hot word in the hot word database is output. Furthermore, since the principle of hot word updating involves incorporating some prior knowledge into the speech recognition system, the end-to-end speech recognition tool WeNet maintains the state in a context graph during the decoding process. Therefore, the hot word score of each speech hot word in the hot word database can be calculated from the state in the subgraph; that is, a score proportional to the hot word weight is added to the original acoustic score.

[0087] Then, determine the number of words whose edit distance from the hot words is a set value. That is, determine the number of words in the hot word library whose edit distance from each hot word is a set value. For example, if one hot word in the hot word library is "turn up the volume", and the other two hot words in the hot word library are "turn down the volume" and "turn up the volume", then the edit distance between hot word 1 "turn up the volume" and hot word 2 "turn down the volume" is 1, and the edit distance between hot word 1 "turn up the volume" and hot word 3 "turn up the volume" is also 1. If the edit distance is set to 1, then the number of words in the hot word library whose edit distance from hot word 1 "turn up the volume" is a set value is 2.

[0088] Next, the comprehensive score of the corresponding speech hot words is calculated based on the acoustic score, hot word score, and word count. This gives the comprehensive score of each speech hot word in the hot word database. Specifically, a shallow fusion method can be used to add the acoustic score and hot word score of a speech hot word during the beam search process. Then, the comprehensive score of the corresponding speech hot word is calculated by combining the edit distance of that speech hot word with other speech hot words, which is set to a certain value.

[0089] Finally, the command word is determined from the voice hot words in the hot word database based on the overall score. That is, the command word corresponding to the user's voice request can be determined according to the overall score of each voice hot word in the hot word database, and the voice hot words with high overall scores are identified as command words.

[0090] Thus, the voice interaction method of the present invention not only increases the weight of hot words, but also, by adding the influence of the number of words in the hot word library whose edit distance from other hot words is set to a certain value on the comprehensive score, it can weaken the influence of the weight of hot words corresponding to similar hot words in the hot word library on the recognition of command words in user voice requests to a certain extent.

[0091] The steps for calculating the comprehensive score of the corresponding speech hot words based on the acoustic score, hot word score, and vocabulary size are achieved through the following conditional expression:

[0092]

[0093] Where argmaxlogP(y|x) is the acoustic score, and logP C (y) represents the score for hot words. Let λ represent the number of words, and λ and μ be the corresponding coefficients.

[0094] Specifically, if the edit distance is set to 1, then This represents the number of words whose edit distance from y is 1.

[0095] Regarding a single voice hot word in the hot word library, the voice interaction method of the present invention first adds the acoustic score and hot word score of the single voice hot word in the hot word library, and then subtracts the number of words whose edit distance from other voice hot words is a set value to calculate the comprehensive score of the voice hot word, thereby calculating the comprehensive score of each voice hot word in the hot word library.

[0096] Thus, the voice interaction method of the present invention not only increases the weight of hot words, but also, by adding the influence of the number of words in the hot word library whose edit distance from other hot words is set to a certain value on the comprehensive score, it can weaken the influence of the weight of hot words corresponding to similar hot words in the hot word library on the recognition of command words in user voice requests to a certain extent.

[0097] Furthermore, the step of calculating the comprehensive score of the corresponding speech hot words based on the acoustic score, hot word score, and vocabulary size can also be achieved through the following conditional expression:

[0098]

[0099] Where argmaxlogP(y|x) is the acoustic score, and logP C (y) represents the score for hot words. Let λ represent the number of words, and λ be the corresponding coefficient.

[0100] Specifically, if the edit distance is set to 1, then This represents the number of words whose edit distance from y is 1.

[0101] Regarding individual speech hot words in the hot word database, the voice interaction method of the present invention adds points to the acoustic score and hot word score of the individual speech hot words in the hot word database, wherein the coefficient λ of the hot word score is divided by the number of words whose edit distance from other speech hot words is a set value. Then, the comprehensive score of the speech hot word is calculated, and thus the comprehensive score of each speech hot word in the hot word database is calculated.

[0102] Thus, the voice interaction method of the present invention not only increases the weight of hot words, but also, by adding the influence of the number of words in the hot word library whose edit distance from other hot words is set to a certain value on the comprehensive score, it can weaken the influence of the weight of hot words corresponding to similar hot words in the hot word library on the recognition of command words in the user's voice interaction request.

[0103] Please see Figure 12 This application also provides an electronic device 100. The electronic device 100 includes a processor 110 and a memory 120. The memory 120 stores a computer program 121, which, when executed by the processor 10, implements the voice interaction method described in any of the above embodiments. The electronic device 100 includes smart devices with display panels such as mobile phones, computers, and iPads.

[0104] The electronic device 100 of this application can add unfamiliar words in the user's voice interaction request to the hot word library by applying the above-mentioned voice interaction method, so that the user's voice interaction request can be recognized by the voice recognition model to obtain the corresponding command, thereby improving the problem that the voice recognition model cannot accurately understand the user's voice command in voice interaction.

[0105] Please see Figure 13 The present invention also provides a non-volatile computer-readable storage medium 200 containing a computer program. When the computer program 210 is executed by one or more processors 220, it implements the voice interaction method described in any of the above embodiments.

[0106] For example, when computer program 210 is executed by processor 220, it implements the following steps of the voice interaction method:

[0107] 01: In response to the user's request to update the preset voice hot words, obtain the voice data input by the user according to the preset command template;

[0108] 02: Perform speech recognition on the speech data according to the preset command template to obtain target speech hot words;

[0109] 03: Update the hot word library of the speech recognition model based on the hot words of the target speech.

[0110] It is understood that computer program 210 includes computer program code. Computer program code can be in the form of source code, object code, executable file, or some intermediate form. Computer-readable storage media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc.

[0111] The computer-readable storage medium 200 of this application can add unfamiliar words in the user's voice interaction request to the hot word library by applying the above-described voice interaction method, so that the user's voice interaction request can be recognized by the voice recognition model to obtain the corresponding command, thereby improving the problem that the voice recognition model cannot accurately understand the user's voice command in voice interaction.

[0112] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A voice interaction method, characterized in that, include: In response to a user's request to update preset voice hot words, obtain the voice data input by the user according to the preset command template; The target speech hot words are obtained by performing speech recognition on the speech data according to the preset command template. Update the hot word library of the speech recognition model based on the target speech hot words; The voice interaction method includes: Obtain user input for voice interaction requests; The command word is obtained by processing the voice interaction request based on the hot word library and the speech recognition model; Execute the control instruction corresponding to the command word; The step of processing the voice interaction request based on the hot word library and the speech recognition model to obtain command words includes: Obtain the acoustic score and hot word score of the speech hot words in the hot word library; Determine the number of words whose edit distance from the aforementioned voice hot words is a set value; The comprehensive score corresponding to the speech hot words is calculated based on the acoustic score, the hot word score, and the number of words. The command word is determined from the speech hot words in the hot word library based on the comprehensive score; The step of calculating the comprehensive score of the corresponding speech hot words based on the acoustic score, the hot word score, and the number of words is implemented through the following conditional expression: in, The acoustic score is given. Score the hot words. The number of words mentioned. and ;or, The step of calculating the comprehensive score of the corresponding speech hot words based on the acoustic score, the hot word score, and the number of words is implemented through the following conditional expression: in, The acoustic score is given. Score the hot words. The number of words mentioned. .

2. The voice interaction method according to claim 1, characterized in that, Before the step of obtaining voice data input by the user according to a preset command template in response to a user's preset voice request to update voice hot words, the voice interaction method includes: If the user's voice interaction request fails to match the command, record the number of consecutive interaction recognition failures and add the command word corresponding to the voice interaction request to the list of consecutively failed command words. If the number of consecutive interaction recognitions exceeds a threshold and the semantic similarity between command words in the list of consecutively failed command words meets a preset condition, the user is prompted to update the voice hot words.

3. The voice interaction method according to claim 2, characterized in that, The voice interaction method includes: If the user's voice interaction request matching command is successful, clear the number of consecutive interaction recognitions and the list of consecutive failed command words for the matching command.

4. The voice interaction method according to claim 2, characterized in that, After the step of recording the number of consecutive failed interaction recognitions and adding the command word corresponding to the voice interaction request to the list of consecutively failed command words when the user's voice interaction request fails to match the command, the voice interaction method includes: The semantic similarity is determined based on the edit distance and / or longest substring between command words in the list of consecutively failed command words.

5. A voice interaction device, characterized in that, For implementing the voice interaction method according to any one of claims 1-4, the voice interaction device comprises: The acquisition module is used to respond to the user's preset voice request to update the voice hot words and acquire the voice data input by the user according to the preset command template. The recognition module is used to perform speech recognition on the speech data according to the preset command template to obtain target speech hot words; The hot word library update module is used to update the hot word library of the speech recognition model based on the target speech hot words.

6. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program that, when executed by the processor, implements the voice interaction method according to any one of claims 1-4.

7. A non-volatile computer-readable storage medium containing a computer program, characterized in that, When the computer program is executed by one or more processors, the processors perform the voice interaction method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Promoting voice actions to hotwords

    US8719039B1