Method for checking wake-up voice, electronic equipment and computer readable storage medium
By performing pinyin matching and similar replacement for wake-up voice, the problem of inaccurate wake-up voice verification in the prior art is solved, accurate recognition of wake-up voice is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411368866.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-27
AI Technical Summary
When checking wake-up speech, the model testing method relies on more complex speech wake-up models and limited obfuscated pinyin processing, resulting in inaccurate verification; the speech recognition method is difficult to accurately identify wake-up words due to weak semantic information, which affects the user experience.
By performing speech recognition on wake-up speech, obtain the pinyin of text information, and match it with the pinyin of the preset wake-up word. If the match fails, the correctness of wake-up speech is determined by replacing the English text, initial consonants and finals.
There is no need to rely on the voice wake-up model to avoid the problem of inaccurate verification, and through pinyin matching and similar replacement, the problem of inaccurate semantic recognition is overcome and the accuracy of wake-up speech is improved.
Smart Images

Figure CN119274553A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of speech recognition processing, and in particular to a method for checking a wake-up speech, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the continuous development of artificial intelligence technology, more and more electronic devices (such as mobile phones, etc.) are equipped with voice interaction functions. Users can control electronic devices through voice, reducing the key operations on electronic devices, which greatly improves the convenience of users using electronic devices. For example, a mobile phone is equipped with weather forecast software, and users can control electronic devices to automatically play weather forecasts through voice.
[0003] For electronic devices equipped with voice interaction functions, users can prepare the wake-up words of the voice interaction function in advance. When the user wants to use the voice interaction function, the user can speak the wake-up voice containing the wake-up word to the electronic device. The electronic device can collect the wake-up voice and use the voice wake-up model (hereinafter described as the first voice wake-up model) to identify whether the wake-up voice contains the wake-up word. If the wake-up word is contained, the voice interaction function is awakened. When the voice interaction function is awakened, the user can control the electronic device normally by voice. In this process, the recognition of the wake-up word is crucial. If the wake-up word cannot be accurately identified, the voice interaction function cannot be awakened, and the user cannot control the electronic device by voice, which affects the user experience. Therefore, it is necessary to accurately test or evaluate the ability to wake up the voice interaction function (hereinafter described as the voice wake-up ability).
[0004] At present, the test methods of voice wake-up capability mainly include model test method and voice recognition method. The following describes these two methods respectively.
[0005] The model testing method includes obtaining a voice wake-up model (hereinafter described as a second voice wake-up model) that is more complex and has better performance than the first voice wake-up model, and using the second voice wake-up model to test the voice wake-up ability of the first voice wake-up model. Among them, the second voice wake-up model can be a larger model than the first voice wake-up model, or a confused pinyin processing can be added when constructing the second voice wake-up model. According to the above content, it can be seen that the model testing method depends on the second voice wake-up model, and the second voice wake-up model is trained using the wake-up voice and the wake-up words it contains. That is to say, the second voice wake-up model is trained using known wake-up words. If the wake-up word set by the user does not belong to these known wake-up words, then the second voice wake-up model may not be able to accurately recognize the wake-up word, and the voice wake-up ability of the first voice wake-up model cannot be accurately tested at this time. In addition, the confused pinyin processing mainly presets several rules for pinyin confusion, and performs confused pinyin processing according to the rules. However, the setting of the rules is limited and cannot cover all possible pinyin confusion situations, which will affect the accuracy of the second voice wake-up model.
[0006] The speech recognition method includes performing speech recognition on the wake-up speech, converting the wake-up speech into text to obtain a wake-up word, and then using the wake-up word to verify the wake-up word recognized by the first speech wake-up model. However, in actual applications, the wake-up speech is usually short and the semantic information is weak. Therefore, when converting the wake-up speech into text through speech recognition, it may not be possible to obtain an accurate wake-up word, and thus it is impossible to accurately test the speech wake-up capability of the first speech wake-up model.
[0007] Accordingly, the art needs a new technical solution to solve the above problems. Summary of the invention
[0008] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem of accurately checking or verifying whether the wake-up voice is a correct wake-up voice.
[0009] In a first aspect, a method for checking a wake-up voice is provided, the method comprising:
[0010] Performing speech recognition on the wake-up speech to obtain text information of the wake-up speech, wherein the text information includes Chinese text;
[0011] According to the Chinese text, obtaining the first pinyin of the text information;
[0012] Obtaining a preset Chinese wake-up word, and converting the Chinese wake-up word into a second pinyin;
[0013] Matching the first pinyin with the second pinyin;
[0014] If the match is successful, it is determined that the wake-up voice is the correct wake-up voice;
[0015] If the match fails, it is determined that the wake-up voice is an erroneous wake-up voice.
[0016] In a technical solution of the above-mentioned wake-up voice checking method, obtaining the first pinyin of the text information according to the Chinese text includes:
[0017] Performing pinyin conversion on the Chinese text to obtain the pinyin of the Chinese text;
[0018] If the text information also includes English text, obtaining the first pinyin according to the pinyin of the Chinese text and the English text;
[0019] Otherwise, the first pinyin is obtained according to the pinyin of the Chinese text.
[0020] In a technical solution of the above-mentioned method for checking the wake-up voice, when the first pinyin fails to match the second pinyin, the method further includes determining whether the wake-up voice is a correct wake-up voice by the following steps:
[0021] Step S1: Determine whether the first pinyin contains English text;
[0022] If not, the first pinyin is used as the pinyin to be converted, and step S2 is executed;
[0023] If it is included, obtaining a Pinyin syllable that is pronounced the same as the English text, replacing the English text in the first Pinyin with the Pinyin syllable to obtain a third Pinyin; and,
[0024] Matching the third pinyin with the second pinyin; if the match is successful, determining that the wake-up voice is the correct wake-up voice; if the match fails, taking the third pinyin as the pinyin to be converted, and executing step S2;
[0025] Step S2: obtaining the first initial consonant and / or the first final in the pinyin to be converted, replacing the first initial consonant with the second initial consonant and / or replacing the first final with the second final to obtain the converted pinyin, wherein the second initial consonant is similar in pronunciation to the first initial consonant, and the second final is similar in pronunciation to the first final; and
[0026] The converted pinyin is matched with the second pinyin; if the match is successful, the wake-up voice is determined to be a correct wake-up voice; if the match fails, the wake-up voice is determined to be an incorrect wake-up voice.
[0027] In a technical solution of the above-mentioned wake-up voice inspection method, the step S2 includes:
[0028] Step S21: obtaining the first initial consonant in the pinyin to be converted, replacing the first initial consonant with the second initial consonant, and obtaining a first converted pinyin; and,
[0029] Matching the first converted pinyin with the second pinyin; if the match is successful, determining that the wake-up voice is a correct wake-up voice; if the match fails, executing step S22;
[0030] Step S22: obtaining the first final in the pinyin to be converted, replacing the first final with the second final to obtain a second converted pinyin; and
[0031] The second converted pinyin is matched with the second pinyin; if the match is successful, the wake-up voice is determined to be a correct wake-up voice; if the match fails, the wake-up voice is determined to be an incorrect wake-up voice.
[0032] In a technical solution of the above-mentioned method for checking the wake-up voice, the method further includes obtaining the second initial consonant and the second final in the following manner:
[0033] Acquire a first corresponding relationship and a second corresponding relationship, wherein the first corresponding relationship is a corresponding relationship between initial consonants with similar pronunciations, and the second corresponding relationship is a corresponding relationship between final consonants with similar pronunciations;
[0034] According to the first corresponding relationship, obtaining a second initial consonant similar to the first initial consonant in pronunciation;
[0035] According to the second corresponding relationship, a second final that is similar in pronunciation to the first final is obtained.
[0036] In a technical solution of the above-mentioned wake-up voice inspection method, before executing step S2, the method further includes:
[0037] Obtain the number of the first syllable of the pinyin to be converted;
[0038] Get the number of the second syllable of the second pinyin;
[0039] If the first syllable number is less than the second syllable number, it is determined that the wake-up voice is an erroneous wake-up voice, and step S2 is no longer performed.
[0040] In a technical solution of the above-mentioned wake-up voice inspection method, when the first syllable number is less than the second syllable number, the method further includes determining whether the wake-up voice is an erroneous wake-up voice by the following steps:
[0041] Obtaining the string edit distance between the pinyin to be converted and the second pinyin;
[0042] If the string edit distance is greater than a set threshold, it is determined that the wake-up speech is an erroneous wake-up speech, and step S2 is no longer performed.
[0043] In a technical solution of the above-mentioned wake-up voice inspection method, before executing step S2, the method further includes:
[0044] Obtaining the string edit distance between the pinyin to be converted and the second pinyin;
[0045] If the string edit distance is greater than a set threshold, it is determined that the wake-up speech is an erroneous wake-up speech, and step S2 is no longer performed.
[0046] In a second aspect, an electronic device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned wake-up voice check method is implemented.
[0047] In a third aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored in the computer-readable storage medium, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions of the above-mentioned wake-up voice check method.
[0048] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:
[0049] In a technical solution for implementing the wake-up voice inspection method provided in the present application, the wake-up voice can be voice recognized to obtain text information of the wake-up voice, the text information includes Chinese text, and the first pinyin of the text information is obtained according to the Chinese text; a preset Chinese wake-up word is obtained, and the Chinese wake-up word is converted into a second pinyin; the first pinyin is matched with the second pinyin; if the match is successful, the wake-up voice is determined to be the correct wake-up voice; if the match fails, the wake-up voice is determined to be an incorrect wake-up voice. Based on the above implementation scheme, there is no need to use a voice wake-up model to verify the wake-up voice, and there is no problem of inaccurate verification that may be caused by the prior art when using a model testing method. In addition, after the wake-up voice is voice recognized, the above implementation scheme converts the text information of the wake-up voice into a first pinyin, and then matches the first pinyin with the second pinyin of the Chinese wake-up word. In this process, the semantics of the text information does not need to be considered, thereby overcoming the problem of inaccurate verification caused by inaccurate semantic recognition when the prior art uses a voice recognition method to verify the wake-up voice.
[0050] In a technical solution for implementing the wake-up voice inspection method provided by the present application, the first pinyin and the second pinyin can be matched at multiple levels to accurately determine whether the wake-up voice is the correct wake-up voice. Specifically, the first pinyin and the second pinyin are matched first; if the match is successful, the wake-up voice is determined to be the correct wake-up voice; if the match fails, the following steps are performed to determine whether the wake-up voice is the correct wake-up voice:
[0051] Step S1: Determine whether the first pinyin contains English text; if not, take the first pinyin as the pinyin to be converted, and execute step S2; if it does, obtain the pinyin syllable that is the same as the pronunciation of the English text, replace the English text in the first pinyin with the pinyin syllable, and obtain a third pinyin; and match the third pinyin with the second pinyin; if the match is successful, determine that the wake-up voice is the correct wake-up voice; if the match fails, take the third pinyin as the pinyin to be converted, and execute step S2.
[0052] Step S2: obtaining the first initial consonant and / or the first final in the pinyin to be converted, replacing the first initial consonant with the second initial consonant and / or replacing the first final with the second final to obtain the converted pinyin, wherein the second initial consonant is similar in pronunciation to the first initial consonant, and the second final is similar in pronunciation to the first final; and matching the converted pinyin with the second pinyin; if the match is successful, determining that the wake-up voice is the correct wake-up voice; if the match fails, determining that the wake-up voice is the wrong wake-up voice.
[0053] Since different users have different pronunciation habits, for the same wake-up word, the wake-up voices spoken by different users will be more or less different. Different wake-up voices may cause slightly different text information obtained by voice recognition, which in turn causes the failure of matching the first pinyin with the second pinyin. However, the above implementation scheme takes into account the situation where the pronunciation of Chinese and English is the same and the pronunciation of the finals is similar due to the different pronunciation habits of users, and based on this, the first pinyin is converted, and the converted first pinyin (ie, the third pinyin or the converted pinyin) is matched with the second pinyin, so that it can accurately determine whether the wake-up voice is correct or incorrect. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:
[0055] Figure 1 It is a flowchart of the main steps of the wake-up voice inspection method according to an embodiment of the present application;
[0056] Figure 2It is a flowchart of main steps of determining whether a wake-up voice is an erroneous wake-up voice when a first pinyin fails to match a second pinyin according to an embodiment of the present application;
[0057] Figure 3 It is a flowchart of the main steps of obtaining the pinyin to be converted and matching the pinyin to be converted with the second pinyin according to an embodiment of the present application;
[0058] Figure 4 is a schematic diagram of the overall process of a wake-up voice check method according to an embodiment of the present application;
[0059] Figure 5 is a detailed flowchart of a wake-up voice check method according to an embodiment of the present application;
[0060] Figure 6 It is a schematic diagram of the main structure of an electronic device according to an embodiment of the present application.
[0061] Reference numerals:
[0062] 11: memory; 12: processor. DETAILED DESCRIPTION
[0063] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0064] In the description of this application, "processor" may include hardware, software or a combination of the two. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Computer-readable storage media include any suitable medium that can store program code, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as just A, just B or A and B.
[0065] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.
[0066] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.
[0067] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.
[0068] The following is a description of an embodiment of the wake-up voice checking method provided in the present application.
[0069] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart of the main steps of the wake-up voice check method according to an embodiment of the present application. Figure 1 As shown, the wake-up voice inspection method in the embodiment of the present application mainly includes the following steps S101 to S106.
[0070] Step S101: performing voice recognition on the wake-up voice to obtain text information of the wake-up voice.
[0071] The wake-up voice is the voice information collected by the electronic device, and the wake-up voice is also the voice information that the electronic device recognizes contains the wake-up word. Specifically, the electronic device is configured with a voice interaction application. When the user needs to control the electronic device by voice, the voice interaction application can be woken up first, and then the voice control of the electronic device can be realized through the voice interaction application. The user can set the wake-up word for waking up the voice interaction application, and when the application needs to be woken up, the voice information containing the wake-up word can be spoken to the electronic device. The electronic device can collect the voice information spoken by the user and perform voice recognition on the voice information to determine whether the voice information contains the wake-up word; if the wake-up word is contained, the above-mentioned voice interaction application is woken up, and the voice information at this time can be understood as the wake-up voice; if the wake-up word is not contained, the above-mentioned voice interaction application will not be woken up, and the voice information at this time can be understood as non-wake-up voice.
[0072] Electronic devices may include mobile phones, tablet computers, desktop computers, laptops, handheld computers, notebook computers, vehicle-mounted devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), augmented reality (AR) and virtual reality (VR) devices, etc., which are not limited in the embodiments of the present application.
[0073] The wake-up word can be a Chinese wake-up word, so the wake-up speech at least includes Chinese voice information, and the text information obtained by speech recognition also at least includes Chinese text, that is, it at least contains Chinese characters. In this embodiment, conventional automatic speech recognition technology can be used to perform speech recognition on the wake-up speech to obtain text information. This embodiment does not specifically limit the speech recognition method.
[0074] Step S102: Obtain the first pinyin of the text information according to the Chinese text.
[0075] Specifically, according to Chinese phonetic alphabets, the Chinese text in the text information is converted into phonetic alphabets, and the first phonetic alphabet is obtained according to the phonetic alphabets of the Chinese text.
[0076] Step S103: Obtain a preset Chinese wake-up word, and convert the Chinese wake-up word into a second pinyin.
[0077] The preset Chinese wake-up word is a wake-up word set in advance by the user, and the preset Chinese wake-up word has the same meaning as the wake-up word in the aforementioned step S101. In addition, according to the aforementioned step S101, the wake-up voice is the voice information containing the wake-up word recognized by the electronic device, and the wake-up word contained in the wake-up voice is the same as the preset Chinese wake-up word.
[0078] The preset Chinese wake-up word is actually also Chinese text. Therefore, the preset Chinese wake-up word can also be converted into pinyin according to Chinese phonetic alphabets. This pinyin is also the second pinyin to be obtained.
[0079] Step S104: Match the first pinyin with the second pinyin.
[0080] If the match is successful, it indicates that the first pinyin is the same as the second pinyin, or the first pinyin includes the second pinyin, which further indicates that the wake-up voice contains the above-mentioned preset Chinese wake-up word, that is, the wake-up voice contains the correct wake-up word, and the wake-up voice is correct. At this time, you can go to step S105.
[0081] If the match fails, it means that the first pinyin is different from the second pinyin, and the first pinyin does not include the second pinyin, which further indicates that the wake-up voice does not contain the above-mentioned preset Chinese wake-up word, that is, the wake-up voice does not contain the correct wake-up word, and the wake-up voice is wrong. At this time, you can go to step S106.
[0082] The method for matching the first pinyin with the second pinyin is described below.
[0083] In addition to syllables, pinyin may also include the tones of syllables. In this embodiment, the tones of syllables may be ignored when matching the first and second pinyins. In some implementations, when acquiring the first and second pinyins, only the pinyin syllables may be acquired without acquiring the tones of syllables.
[0084] Specifically, if the first and second pinyins include the same pinyin syllables and the arrangement order of the pinyin syllables is the same, it can be determined that the first and second pinyins are matched successfully; otherwise, the matching fails.
[0085] Alternatively, if the first pinyin includes all the pinyin syllables of the second pinyin, and the arrangement order of these pinyin syllables in the first pinyin is the same as the arrangement order of these pinyin syllables in the second pinyin, it can be determined that the first and second pinyins match successfully; otherwise, the match fails.
[0086] For example, the preset Chinese wake-up word is Ma Ka Ba Ka, and the second pinyin of the Chinese wake-up word is mǎ kǎ bā kǎ. If the first pinyin obtained according to the wake-up voice is mā ka bā ka, since the first and second pinyins include the same pinyin syllables and the arrangement order of the pinyin syllables is the same, it can be determined that the first and second pinyins match successfully. If the first pinyin obtained according to the wake-up voice is nǐ hǎo mā ka bā ka, since the first pinyin includes all the pinyin syllables of the second pinyin (i.e. ma ka ba ka), and the arrangement order of ma ka ba ka in the first and second pinyins is the same, it can be determined that the first and second pinyins match successfully.
[0087] Step S105: Determine that the wake-up voice is a correct wake-up voice.
[0088] Step S106: Determine that the wake-up voice is an erroneous wake-up voice.
[0089] Based on the method described in steps S101 to S106 above, there is no need to use a voice wake-up model to verify the wake-up voice, and there is no problem of inaccurate verification that may be caused by the existing technology when using the model testing method. In addition, after the above method performs voice recognition on the wake-up voice, the text information of the wake-up voice is converted into a first pinyin, and then the first pinyin is matched with the second pinyin of the Chinese wake-up word. In this process, the semantics of the text information does not need to be considered, thereby overcoming the problem of inaccurate verification caused by inaccurate semantic recognition when the existing technology uses a voice recognition method to verify the wake-up voice.
[0090] The above steps S102 and S106 are further explained below.
[0091] 1. Explain step S102.
[0092] In some implementations of the above step S102, the following steps S1021 to S1024 may be performed to obtain the first pinyin of the text information according to the Chinese text.
[0093] Step S1021: performing pinyin conversion on the Chinese text in the text information to obtain the pinyin of the Chinese text.
[0094] Step S1022: Determine whether the text information includes English text; if so, go to step S1023; if not, go to step S1024.
[0095] Step S1023: Obtain a first pinyin according to the pinyin of the Chinese text and the English text. Specifically, according to the arrangement order of the Chinese text and the English text in the above text information, the pinyin of the Chinese text and the English text are combined together to form the first pinyin. For example, if the text information of the wake-up voice is Hi Ma Ka Ba Ka, the first pinyin can be Hi mǎ kǎ bā kǎ.
[0096] Step S1024: Obtain a first pinyin according to the pinyin of the Chinese text. Specifically, the pinyin of the Chinese text can be used as the first pinyin.
[0097] Based on the method described in steps S1021 to S1024 above, when the wake-up voice includes English, the first pinyin can be obtained by using the wake-up voice.
[0098] 2. Explain step S106.
[0099] In some implementations of the above step S106, when the first pinyin fails to match the second pinyin, Figure 2The following steps S201 to S209 are used to determine whether the wake-up voice is a correct wake-up voice. That is, step S106 is replaced by the following steps.
[0100] Step S201: Determine whether the first pinyin contains English text; if not, go to step S202; if contained, go to step S203.
[0101] Step S202: Take the first pinyin as the pinyin to be converted, and then go to step S206.
[0102] Step S203: Obtain the pinyin syllable that is the same as the pronunciation of the English text, replace the English text in the first pinyin with the pinyin syllable, and obtain the third pinyin.
[0103] The same pronunciation can be understood as the pronunciation of the English text and the pronunciation of the Pinyin syllable. For example, if the English text is hi, the Pinyin syllable that is pronounced the same as hi can be hai; if the English text is hey, the Pinyin syllable that is pronounced the same as hey can be hei; if the English text is how, the Pinyin syllable that is pronounced the same as how can be hào.
[0104] Step S204: Match the third pinyin with the second pinyin; if the match is successful, it is determined that the wake-up voice is the correct wake-up voice, so go to step S209; if the match fails, go to step S205. The method for matching the third and second pinyins is the same as the method for matching the first and second pinyins in the aforementioned step S104, and will not be repeated here.
[0105] Since different users have different pronunciation habits, for the same wake-up word, the wake-up voices spoken by different users will be more or less different. In some cases, the wake-up voice contains the correct wake-up word and is the correct wake-up voice, but due to the user's pronunciation habits, the Chinese spoken by the user may be recognized as English with a similar pronunciation, which in turn causes the first pinyin to fail to match the second pinyin, and the wake-up voice is determined to be an erroneous wake-up voice. Through the methods described in steps S203 to S204 above, the English text in the text message can be replaced with the same pinyin syllables to avoid misjudgment of the wake-up voice due to the above situation.
[0106] Step S205: Take the third pinyin as the pinyin to be converted, and then go to step S206.
[0107] Step S206: Obtain the first initial consonant and / or the first final in the pinyin to be converted, replace the first initial consonant with the second initial consonant and / or replace the first final with the second final to obtain the converted pinyin. The second initial consonant is similar to the first initial consonant in pronunciation, and the second final is similar to the first final in pronunciation.
[0108] By querying the initial consonant table of Chinese phonetic alphabets, it is possible to determine which letters in the pinyin to be converted are initial consonants, and use these initial consonants as the first initial consonants; by querying the final vowel table of Chinese phonetic alphabets, it is possible to determine which letters in the pinyin to be converted are final vowels, and use these final vowels as the first final vowels.
[0109] The second initial consonant is similar in pronunciation to the first initial consonant, which can be understood as the sounds of the first and second initial consonants being read out are similar; the second final is similar in pronunciation to the first final, which can be understood as the sounds of the first and second finals being read out are similar.
[0110] In this embodiment, a person skilled in the art can perform a pronunciation test on all initial consonants and all finals in the Chinese phonetic alphabets to determine which initial consonants are similar in pronunciation and which finals are similar in pronunciation. When it is necessary to obtain a second initial consonant similar in pronunciation to a first initial consonant, the second initial consonant can be obtained by querying the test result; when it is necessary to obtain a second final similar in pronunciation to a first final, the second final can be obtained by querying the test result. It should be noted that this embodiment does not specifically limit the method for determining the similarity of initial consonants and finals, as long as it can determine which initial consonants are similar in pronunciation and which finals are similar in pronunciation.
[0111] For example: among the initial consonants, b and p sound similar, f and p sound similar, k and h sound similar, g and h sound similar; among the finals, uo and o sound similar, ing and in sound similar, ui and ei sound similar.
[0112] Step S207: Match the converted pinyin with the second pinyin; if the match is successful, it is determined that the wake-up voice is the correct wake-up voice, so go to step S209; if the match fails, it is determined that the wake-up voice is an incorrect wake-up voice, so go to step S208.
[0113] The method for matching the converted pinyin and the second pinyin is the same as the method for matching the first and second pinyin in the aforementioned step S104, and will not be repeated here.
[0114] Since different users have different pronunciation habits, for the same wake-up word, the wake-up voices spoken by different users will be more or less different. In some cases, the wake-up voice contains the correct wake-up word and is the correct wake-up voice, but due to the user's pronunciation habits, similar initials or finals may be confused, resulting in a failure to match the first pinyin with the second pinyin, and the wake-up voice is determined to be an erroneous wake-up voice. The method described in steps S206 to S207 above can avoid misjudgment of the wake-up voice due to the above situation.
[0115] Step S208: Determine that the wake-up voice is an erroneous wake-up voice.
[0116] Step S209: Determine that the wake-up voice is a correct wake-up voice.
[0117] Based on the method described in steps S201 to S209 above, the influence of the user's pronunciation habits on the first and second pinyin matching results is taken into consideration, which can effectively avoid misjudgment of the wake-up voice.
[0118] The method described in the above steps S201 to S209 is further explained below.
[0119] In some implementations of the above step S206, the second initial consonant and the second final can be obtained through the following steps S2061 to S2063.
[0120] Step S2061: Obtain a first corresponding relationship and a second corresponding relationship, wherein the first corresponding relationship is a corresponding relationship between initial consonants with similar pronunciations, and the second corresponding relationship is a corresponding relationship between finals with similar pronunciations. In this embodiment, a person skilled in the art may perform a pronunciation test on all initial consonants and all finals in the Chinese phonetic alphabets to determine which initial consonants have similar pronunciations and which finals have similar pronunciations, construct a first corresponding relationship based on the initial consonants with similar pronunciations, and construct a second corresponding relationship based on the finals with similar pronunciations. It should be noted that this embodiment does not specifically limit the method for determining the similar pronunciations of initial consonants and finals, as long as it is possible to determine which initial consonants have similar pronunciations and which finals have similar pronunciations.
[0121] Step S2062: According to the first correspondence, a second initial consonant similar in pronunciation to the first initial consonant is obtained. Specifically, it can be queried whether the first correspondence records which initial consonants are similar in pronunciation to the first initial consonant; if the initial consonants with similar pronunciations are recorded, the initial consonants are used as the second initial consonant; if the initial consonants with similar pronunciations are not recorded, the second initial consonant is not obtained, and the first initial consonant is not replaced.
[0122] Step S2063: According to the second corresponding relationship, a second final that is similar in pronunciation to the first final is obtained. Specifically, it can be queried whether the second corresponding relationship records which finals are similar in pronunciation to the first final; if a final that is similar in pronunciation is recorded, the final is used as the second final; if no final that is similar in pronunciation is recorded, the second final is not obtained, and the first final is not replaced.
[0123] Based on the methods described in steps S2061 to S2063 above, the second initial consonant and the second final can be conveniently obtained by utilizing the first and second corresponding relationships.
[0124] In some implementations of the method described in steps S201 to S209 above, steps S206 and S207 may be replaced by Figure 3 The following steps S301 to S306 are shown.
[0125] Step S301: obtaining the first initial consonant in the pinyin to be converted, and replacing the first initial consonant with the second initial consonant to obtain the first converted pinyin.
[0126] Step S302: Match the first converted pinyin with the second pinyin; if the match is successful, it is determined that the wake-up voice is the correct wake-up voice, so it can go to step S305; if the match fails, go to step S303.
[0127] The method for matching the first converted pinyin and the second pinyin is the same as the method for matching the first and second pinyin in the aforementioned step S104, and will not be repeated here.
[0128] Step S303: obtaining the first final in the pinyin to be converted, and replacing the first final with the second final to obtain a second converted pinyin.
[0129] Step S304: Match the second converted pinyin with the second pinyin; if the match is successful, it is determined that the wake-up voice is the correct wake-up voice, so it can go to step S305; if the match fails, it is determined that the wake-up voice is an incorrect wake-up voice, so it goes to step S306.
[0130] The method for matching the second converted pinyin and the second pinyin is the same as the method for matching the first and second pinyin in the aforementioned step S104, and will not be repeated here.
[0131] Step S305: Determine that the wake-up voice is a correct wake-up voice.
[0132] Step S306: Determine that the wake-up voice is an erroneous wake-up voice.
[0133] Based on the method described in steps S301 to S306 above, the initial consonants and finals can be replaced in sequence. If the wake-up voice is determined to be correct based on the first converted pinyin obtained after the initial consonant replacement, there is no need to execute steps S303 and S304, which improves the efficiency of the wake-up voice judgment and saves computing resources.
[0134] In some implementations of the method described in steps S201 to S209 above, before executing step S206, the following steps 11 to 13 may be executed first, and then it is determined whether to continue to execute step S206 and its subsequent steps based on the execution result of step 13.
[0135] Step 11: Get the number of the first syllable of the pinyin to be converted.
[0136] The number of first syllables is the number of pinyin syllables included in the pinyin to be converted. For example, if the pinyin to be converted is nǐ hào mā ka bā ka, the number of first syllables is 6.
[0137] Step 12: Get the number of the second syllable of the second pinyin.
[0138] The second syllable number is the number of pinyin syllables included in the second pinyin. For example, if the second pinyin is mǎ kǎ bākǎ, the second syllable number is 4.
[0139] Step 13: Determine whether the number of the first syllable is less than the number of the second syllable;
[0140] If the number of the first syllables is less than the number of the second syllables, it indicates that the wake-up speech does not include the correct Chinese wake-up word, and the wake-up speech is an incorrect wake-up speech. Therefore, step S206 and subsequent steps may not be performed further.
[0141] If the number of the first syllables is greater than or equal to the number of the second syllables, it indicates that the wake-up speech may contain the correct Chinese wake-up word. At this time, step S206 and subsequent steps can be continued to determine whether the wake-up speech is a correct or incorrect wake-up speech.
[0142] Based on the methods described in steps 11 to 13 above, the number of syllables can be used to accurately determine whether the wake-up speech is an erroneous wake-up speech. If it is determined to be an erroneous wake-up speech, there is no need to execute step S206 and its subsequent steps, which further improves the efficiency of the wake-up speech judgment and saves computing resources.
[0143] The methods described in the above steps 11 to 13 are further explained below.
[0144] In some implementations of the method described in steps 11 to 13 above, when it is determined that the number of first syllables is less than the number of second syllables, it is further possible to determine whether the wake-up voice is an erroneous wake-up voice through the following steps 131 to 132.
[0145] Step 131: Obtain the string edit distance between the pinyin to be converted and the second pinyin. In this embodiment, a pinyin syllable is regarded as a character, and a conventional string edit distance obtaining method is used to obtain the string edit distance between the pinyin to be converted and the second pinyin.
[0146] For example, if the second pinyin is mǎ kǎ bā kǎ, and the pinyin to be converted is mǎ kuǎn bā kǎ. When converting the pinyin to be converted into the second pinyin, the letters u and n in the pinyin syllable kuǎn need to be deleted, that is, an edit operation needs to be performed on the pinyin to be converted. Therefore, the string edit distance between the pinyin to be converted and the second pinyin is 1.
[0147] Step 132: Determine whether the string edit distance is greater than a set threshold;
[0148] If the string editing distance is greater than the set threshold, it indicates that more editing operations are required on the pinyin to be converted in order to convert the pinyin to be converted into the second pinyin. That is to say, the difference between the pinyin to be converted and the second pinyin is relatively large. It can be determined that the wake-up voice is an erroneous wake-up voice, and step S206 and its subsequent steps are no longer executed.
[0149] If the string editing distance is less than or equal to the set threshold, it means that no more editing operations are required on the pinyin to be converted in order to convert the pinyin to be converted into the second pinyin. In other words, the difference between the pinyin to be converted and the second pinyin is not large, and the wake-up speech may be correct. Therefore, step S206 and its subsequent steps can be executed to finally determine whether the wake-up speech is a correct or incorrect wake-up speech.
[0150] The set threshold is a distance value of a string edit distance. When setting the value of the set threshold, a person skilled in the art can obtain the pinyins of multiple different correct wake-up voices (hereinafter described as correct pinyins), count the string edit distances between these correct pinyins and the second pinyin, obtain the largest string edit distance, and set the set threshold according to the largest string edit distance. For example, the set threshold can be 3.
[0151] Based on the method described in steps 131 to 132 above, when it is determined that the number of first syllables is less than the number of second syllables, the string editing distance between the pinyin to be converted and the second pinyin can be used to further determine whether the wake-up speech is an erroneous wake-up speech, thereby improving the accuracy of determining the erroneous wake-up speech.
[0152] In some implementations of the method described in steps S201 to S209 above, before executing step S206, the following steps 21 to 22 may be executed first, and then it is determined whether to continue to execute step S206 and its subsequent steps based on the execution result of step 22.
[0153] Step 21: Obtain the string edit distance between the pinyin to be converted and the second pinyin.
[0154] The method of this step is the same as the method of the aforementioned step 131 and will not be repeated here.
[0155] Step 22: Determine whether the string edit distance is greater than a set threshold;
[0156] If the string edit distance is greater than the set threshold, it is determined that the wake-up speech is an erroneous wake-up speech, and step S206 and its subsequent steps are no longer performed. If the string edit distance is less than or equal to the set threshold, it indicates that the wake-up speech may be correct, so step S206 and its subsequent steps can be performed to finally determine whether the wake-up speech is correct or an erroneous wake-up speech.
[0157] The method of this step is the same as the method of the aforementioned step 132, and will not be repeated here.
[0158] Based on the method described in steps 21 to 22 above, the string edit distance can be used to accurately determine whether the wake-up speech is an erroneous wake-up speech. If it is determined to be an erroneous wake-up speech, there is no need to execute step S206 and its subsequent steps, which further improves the efficiency of the wake-up speech judgment and saves computing resources.
[0159] The following is combined with Figure 4 and attached Figure 5 , the wake-up voice inspection method provided by this application is described. Figure 4 The overall process of the wake-up voice check method is shown in FIG. Figure 5 The detailed process of the wake-up voice checking method is exemplified.
[0160] First, refer to the attached Figure 4, the electronic device is equipped with an online voice wake-up system and a voice interaction application. The online voice wake-up system can collect the user's voice information and perform voice recognition on the voice information to determine whether the voice information contains a wake-up word; if the wake-up word is contained, the voice interaction application is woken up, and the user can realize voice control of the electronic device through this voice interaction application. Figure 4 The wake-up voice is the voice information that the online voice wake-up system recognizes contains the wake-up word. After the wake-up voice is collected, it can be checked whether the wake-up voice is the correct wake-up voice through the following steps S401 to S405.
[0161] Step S401: Obtain the wake-up word set by the user, which is a Chinese wake-up word. Convert the Chinese characters in the wake-up word into pinyin (ie, the second pinyin in the aforementioned method embodiment).
[0162] Step S402: Perform voice recognition on the wake-up voice to obtain text information of the wake-up voice (i.e. Figure 4 The text information includes Chinese text.
[0163] Step S403: convert the Chinese characters in the text information into pinyin, and obtain the first pinyin according to the pinyin.
[0164] Step S404: convert the first pinyin.
[0165] Step S405: performing pinyin matching on the converted first pinyin and the second pinyin to obtain a check result of the wake-up voice.
[0166] It should be noted that when executing steps S404 to S405, the first pinyin and the second pinyin can be matched first; if the match is successful, it is determined that the wake-up voice is the correct wake-up voice; if the match fails, the method described in steps S201 to S209 in the above method embodiment is used to convert the first pinyin, and to match the converted first pinyin and the second pinyin to obtain the wake-up voice inspection result. The detailed steps of the method described in steps S404 to S405 are in the attached Figure 5 A detailed description is given in.
[0167] See attached Figure 5 First, the wake-up speech is recognized and converted into pinyin to obtain a first pinyin, and the wake-up word is converted into pinyin to obtain a second pinyin, and then the following steps S501 to S510 are performed, and according to the first and second pinyins, it is determined whether the wake-up speech is correct or wrong.
[0168] Step S501: Match the first and second pinyins; if the match is successful, determine that the wake-up voice is the correct wake-up voice; if the match fails, go to step S502.
[0169] Step S502: Replace the English text in the first pinyin with a pinyin syllable with a similar pronunciation to obtain a third pinyin.
[0170] Step S503: Match the third and second pinyins; if the match is successful, determine that the wake-up voice is the correct wake-up voice; if the match fails, go to step S504.
[0171] Step S504: obtain the number of first syllables of the third pinyin, obtain the number of second syllables of the second pinyin, and determine whether the number of first syllables is less than the number of second syllables; if so, determine that the wake-up voice is an erroneous wake-up voice; otherwise, go to step S505.
[0172] Step S505: Obtain the string edit distance between the third and second pinyin.
[0173] Step S506: determine whether the string edit distance is greater than a set threshold; if so, determine that the wake-up speech is an erroneous wake-up speech; otherwise, go to step S507.
[0174] Step S507: Replace the initial consonants in the third pinyin with other initial consonants that are similar in pronunciation to obtain the first converted pinyin.
[0175] Step S508: Match the first converted pinyin with the first pinyin; if the match is successful, determine that the wake-up voice is the correct wake-up voice; if the match fails, go to step S509.
[0176] Step S509: Replace the finals in the third pinyin with other finals that are similar in pronunciation to obtain a second converted pinyin.
[0177] Step S510: Match the second converted pinyin with the first pinyin; if the match is successful, determine that the wake-up voice is a correct wake-up voice; if the match fails, determine that the wake-up voice is an incorrect wake-up voice.
[0178] The method described in the above steps S501 to S510 can be understood as the following Figure 4 The detailed steps described in the above steps S404 to S405.
[0179] The technical effects of the method described in steps S501 to S510 above are described below. In this embodiment, the wake-up word includes a default wake-up word and a custom wake-up word. The online voice wake-up system is a voice wake-up model. In order to enable it to have the ability to recognize wake-up words, the wake-up voice and the wake-up words it contains are usually used for training. The above-mentioned default wake-up words can be understood as one or more of the wake-up words used during training. Custom wake-up words are defined by the user himself and are not wake-up words used during training. Table 1 below shows the inspection results obtained by checking the correct wake-up voice and the incorrect wake-up voice respectively using the above method.
[0180] The inspection results include the error between the difficulty-to-wake-up rate of the default wake-up word and the actual difficulty-to-wake-up rate, the error between the false-wake-up rate of the default wake-up word and the actual false-wake-up rate, the error between the difficulty-to-wake-up rate of the custom wake-up word and the actual difficulty-to-wake-up rate, and the error between the false-wake-up rate of the custom wake-up word and the actual false-wake-up rate.
[0181] The difficult wake-up rate can be obtained according to the percentage between the wrongly judged correct wake-up speech and all the correct wake-up speech; the false wake-up rate can be obtained according to the percentage between the wrongly judged wrong wake-up speech and all the wrong wake-up speech. Table 1
[0182] According to Table 1, the error between the difficult wake-up rate obtained by the above method and the actual difficult wake-up rate is very small, and the error between the false wake-up rate and the actual false wake-up rate is also very small. Therefore, the above method has high accuracy. The inspection results obtained by the above method can be used to mine which types of wake-up words or wake-up voices the voice wake-up model has poor recognition ability for, and then the voice wake-up model can be updated or upgraded according to the mining results to improve the recognition ability of the voice wake-up model.
[0183] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These adjusted schemes are equivalent to the technical schemes described in this application, and therefore will also fall within the scope of protection of this application.
[0184] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.
[0185] Another aspect of the present application also provides a computer-readable storage medium.
[0186] In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium may be configured to store a program for executing the wake-up voice check method of the above method embodiment, and the program may be loaded and run by a processor to implement the above wake-up voice check method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-transitory computer-readable storage medium.
[0187] Another aspect of the present application provides an electronic device.
[0188] In an embodiment of an electronic device according to the present application, the electronic device may include at least one processor; and a memory connected to the at least one processor in communication; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented. Figure 6 , Figure 6 FIG. 4 exemplarily shows that the memory 11 and the processor 12 are communicatively connected via a bus.
[0189] In some embodiments of the present application, the electronic device may further include at least one sensor for sensing information. The sensor is connected to any type of processor mentioned in the present application. The electronic device described in the present application may be, but is not limited to, a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) device, etc., and the embodiments of the present application are not limited to this.
[0190] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A method for checking a wake-up voice, characterized in that: The method comprises: Performing speech recognition on the wake-up speech to obtain text information of the wake-up speech, wherein the text information includes Chinese text; According to the Chinese text, obtaining the first pinyin of the text information; Obtaining a preset Chinese wake-up word, and converting the Chinese wake-up word into a second pinyin; Matching the first pinyin with the second pinyin; If the match is successful, it is determined that the wake-up voice is the correct wake-up voice; If the match fails, it is determined that the wake-up voice is an erroneous wake-up voice.
2. The method according to claim 1, characterized in that: The step of obtaining the first pinyin of the text information according to the Chinese text includes: Performing pinyin conversion on the Chinese text to obtain the pinyin of the Chinese text; If the text information also includes English text, obtaining the first pinyin according to the pinyin of the Chinese text and the English text; Otherwise, the first pinyin is obtained according to the pinyin of the Chinese text.
3. The method according to claim 2, characterized in that When the first pinyin fails to match the second pinyin, the method further includes determining whether the wake-up voice is a correct wake-up voice by the following steps: Step S1: Determine whether the first pinyin contains English text; If not, the first pinyin is used as the pinyin to be converted, and step S2 is executed; If it is included, obtaining a Pinyin syllable that is pronounced the same as the English text, replacing the English text in the first Pinyin with the Pinyin syllable to obtain a third Pinyin; and, Matching the third pinyin with the second pinyin; if the match is successful, determining that the wake-up voice is a correct wake-up voice; If the match fails, the third pinyin is used as the pinyin to be converted, and step S2 is executed; Step S2: obtaining the first initial consonant and / or the first final in the pinyin to be converted, replacing the first initial consonant with the second initial consonant and / or replacing the first final with the second final, to obtain the converted pinyin, wherein the second initial consonant is similar to the first initial consonant in pronunciation, and the second final is similar to the first final in pronunciation; as well as, The converted pinyin is matched with the second pinyin; if the match is successful, the wake-up voice is determined to be a correct wake-up voice; if the match fails, the wake-up voice is determined to be an incorrect wake-up voice.
4. The method according to claim 3, characterized in that: The step S2 comprises: Step S21: obtaining the first initial consonant in the pinyin to be converted, replacing the first initial consonant with the second initial consonant, and obtaining a first converted pinyin; and, Matching the first converted pinyin with the second pinyin; if the match is successful, determining that the wake-up voice is a correct wake-up voice; if the match fails, executing step S22; Step S22: obtaining the first final in the pinyin to be converted, replacing the first final with the second final to obtain a second converted pinyin; and The second converted pinyin is matched with the second pinyin; if the match is successful, the wake-up voice is determined to be a correct wake-up voice; if the match fails, the wake-up voice is determined to be an incorrect wake-up voice.
5. The method according to claim 3, characterized in that: The method further includes obtaining the second initial consonant and the second final in the following manner: Acquire a first corresponding relationship and a second corresponding relationship, wherein the first corresponding relationship is a corresponding relationship between initial consonants with similar pronunciations, and the second corresponding relationship is a corresponding relationship between final consonants with similar pronunciations; According to the first corresponding relationship, obtaining a second initial consonant similar to the first initial consonant in pronunciation; According to the second corresponding relationship, a second final that is similar in pronunciation to the first final is obtained.
6. The method according to any one of claims 3 to 5, characterized in that Before executing step S2, the method further includes: Obtain the number of the first syllable of the pinyin to be converted; Get the number of the second syllable of the second pinyin; If the first syllable number is less than the second syllable number, it is determined that the wake-up voice is an erroneous wake-up voice, and step S2 is no longer performed.
7. The method according to claim 6, characterized in that When the first number of syllables is less than the second number of syllables, the method further includes determining whether the wake-up voice is an erroneous wake-up voice by the following steps: Obtaining the string edit distance between the pinyin to be converted and the second pinyin; If the string edit distance is greater than a set threshold, it is determined that the wake-up speech is an erroneous wake-up speech, and step S2 is no longer performed.
8. The method according to any one of claims 3 to 5, characterized in that Before executing step S2, the method further includes: Obtaining the string edit distance between the pinyin to be converted and the second pinyin; If the string edit distance is greater than a set threshold, the wake-up speech is determined to be an erroneous wake-up speech, and step S2 is no longer performed.
9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program, and when the computer program is executed by the at least one processor, the method for checking the wake-up voice according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the wake-up voice checking method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Wake-up word estimation method and device, storage medium and electronic device
CN108536668A
Intelligent voice system and voice wake-up method thereof, and intelligent voice device
CN109377993A
Wakeup word detection method, device and equipment based on artificial intelligence, and medium
CN110838289A
Method for distinguishing English from pinyin and electronic equipment
CN111079725A
Multi-model speech recognition and instruction recall method and device based on pinyin error correction
CN117351959A