A method and device for constructing a non-keyword model in a decoding network
By screening high-occurrence pronunciation elements in the corpus collection to build a non-keyword model, it solves the problem of device local storage pressure and retrieval accuracy, and improves the accuracy and success rate of keyword retrieval.
Patent Information
- Application Number
- CN201810770478.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-13
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2038-07-13
AI Technical Summary
When keyword retrieval is implemented locally on the device, the large number of non-keywords results in a large decoding network capacity, which increases storage pressure and reduces the accuracy and success rate of keyword retrieval.
By filtering out the pronunciation elements with a high occurrence rate in the corpus collection, a non-keyword model is constructed to reduce the number of pronunciation elements in the non-keyword collection, avoid unnecessary competition, and improve the accuracy and success rate of keyword retrieval.
It reduces the local storage pressure of the device, improves the accuracy and success rate of keyword retrieval, reduces the amount of calculation, and alleviates the interference of non-keywords on keyword retrieval.
Smart Images

Figure CN110781270B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method and device for constructing a non-keyword model in a decoding network. Background Art
[0002] Keyword Spotting (KWS) is a technology for retrieving specific keywords from continuous speech. In one possible implementation, a decoding network can be used for KWS. The decoding network is composed of a keyword model corresponding to the desired search keyword and a non-keyword model corresponding to the non-keyword. Among them, the role of the non-keyword is to form a competitive relationship with the keyword, so as to improve the accuracy and success rate of the decoding network in retrieving keywords from continuous speech.
[0003] However, in some scenarios, KWS is mainly implemented locally on the device. The local storage space and data processing capabilities of the device are limited. If the number of non-keywords used for KWS is large, the capacity of the decoding network will be large, which will increase the local storage pressure of the device. Moreover, when the device uses the decoding network to perform KWS, the non-keyword model needs to construct more non-keyword decoding paths for more non-keywords, which greatly increases the amount of calculation required to retrieve keywords. In addition, since more non-keywords compete with keywords, they will interfere with the retrieval of keywords, resulting in a decrease in the accuracy and success rate of retrieving keywords.
[0004] It can be seen that how to reasonably select non-keywords to construct non-keyword models in the decoding network is a problem that needs to be solved urgently. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a method for constructing a non-keyword model in a decoding network to improve the accuracy and success rate of retrieving keywords.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for constructing a non-keyword model in a decoding network, the method comprising:
[0008] Get the corpus collection to be screened;
[0009] Determining the occurrence rate of pronunciation elements corresponding to the characters included in the corpus set;
[0010] The pronunciation elements whose occurrence rate meets the preset threshold constitute a non-keyword set, the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords;
[0011] A non-keyword model in a decoding network is constructed according to the non-keyword set.
[0012] Optionally, the corpus set includes a plurality of voice samples, wherein any voice sample includes a voice corresponding to at least one character;
[0013] and / or,
[0014] The corpus set includes a plurality of text samples, wherein any text sample includes at least one character.
[0015] Optionally, in the process of determining the occurrence rates of pronunciation elements corresponding to characters included in the corpus set, pronunciation elements with the same pronunciation elements but different tones are regarded as the same pronunciation element, or pronunciation elements with the same pronunciation elements and the same tones are regarded as the same pronunciation element.
[0016] Optionally, the method further includes:
[0017] A virtual decoding path is established in the non-keyword model, and the speech to be retrieved obtains a matching value through the virtual decoding path; the matching value is determined based on the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model.
[0018] Optionally, the matching value obtained by the to-be-retrieved speech through the virtual decoding path includes any one of the following:
[0019] An average value of matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model;
[0020] The maximum value or the minimum value among the matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model;
[0021] The calculation result of the average value, maximum value or minimum value and the preset coefficient.
[0022] Optionally, the decoding network also includes a keyword model. If the matching value obtained by the keyword model for the speech to be retrieved is higher than the matching value obtained by the speech to be retrieved through any non-keyword decoding path and higher than the matching value obtained by the virtual decoding path, it is determined that the speech to be retrieved includes the pronunciation element corresponding to the keyword.
[0023] Optionally, the non-keyword set also includes pronunciation elements corresponding to onomatopoeias.
[0024] In a second aspect, an embodiment of the present application provides a device for constructing a non-keyword model in a decoding network, the device comprising: a set acquisition unit, an appearance rate determination unit, a set construction unit, and a model construction unit;
[0025] The set acquisition unit is used to acquire a corpus set to be screened;
[0026] The occurrence rate determination unit is used to determine the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set;
[0027] The set construction unit is used to form a non-keyword set from pronunciation elements whose appearance rate meets a preset threshold, the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords;
[0028] The model building unit is used to build a non-keyword model in a decoding network according to the non-keyword set.
[0029] Optionally, the corpus set includes a plurality of voice samples, wherein any voice sample includes a voice corresponding to at least one character;
[0030] and / or,
[0031] The corpus set includes a plurality of text samples, wherein any text sample includes at least one character.
[0032] Optionally, in the process of determining the occurrence rates of pronunciation elements corresponding to characters included in the corpus set, pronunciation elements with the same pronunciation elements but different tones are regarded as the same pronunciation element, or pronunciation elements with the same pronunciation elements and the same tones are regarded as the same pronunciation element.
[0033] Optionally, the device further comprises:
[0034] A virtual decoding path is established in the non-keyword model, and the speech to be retrieved obtains a matching value through the virtual decoding path; the matching value is determined based on the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model.
[0035] Optionally, the matching value obtained by the to-be-retrieved speech through the virtual decoding path includes any one of the following:
[0036] An average value of matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model;
[0037] The maximum value or the minimum value among the matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model;
[0038] The calculation result of the average value, maximum value or minimum value and the preset coefficient.
[0039] Optionally, the decoding network also includes a keyword model. If the matching value obtained by the keyword model for the speech to be retrieved is higher than the matching value obtained by the speech to be retrieved through any non-keyword decoding path and higher than the matching value obtained by the virtual decoding path, it is determined that the speech to be retrieved includes the pronunciation element corresponding to the keyword.
[0040] Optionally, the non-keyword set also includes pronunciation elements corresponding to onomatopoeias.
[0041] In a third aspect, an embodiment of the present application provides a device for constructing a non-keyword model in a decoding network, comprising a memory and one or more programs, wherein one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:
[0042] Get the corpus collection to be screened;
[0043] Determining the occurrence rate of pronunciation elements corresponding to the characters included in the corpus set;
[0044] The pronunciation elements whose occurrence rate meets the preset threshold constitute a non-keyword set, the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords;
[0045] A non-keyword model in a decoding network is constructed according to the non-keyword set.
[0046] In a fourth aspect, an embodiment of the present application provides a non-temporary computer-readable storage medium, characterized in that when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a method for constructing a non-keyword model in a decoding network as described in any one of the first aspects.
[0047] It can be seen from the above technical solution that before establishing the non-keyword model in the decoding network, the required non-keywords can be screened out from the corpus set to be screened. The screening method is based on pronunciation elements. Since pronunciation elements are speech units divided according to the natural attributes of speech, they focus more on the pronunciation of characters without considering the specific meaning of the characters corresponding to the pronunciation elements. Therefore, screening non-keywords based on pronunciation elements is more in line with the needs of keyword retrieval. Therefore, after determining the occurrence rate of pronunciation elements corresponding to the characters included in the corpus set, the pronunciation elements whose occurrence rate meets the preset threshold can be used to form a non-keyword set. The pronunciation elements with a higher occurrence rate can be determined as non-keywords by the preset threshold. Compared with the pronunciation elements included in the corpus set, the number of pronunciation elements in the non-keyword set is not only small, but also belongs to pronunciation elements that are more likely to appear in the user's voice. Therefore, the pronunciation elements in the non-keyword set belong to high-quality pronunciation elements used in keyword retrieval. The non-keyword model constructed by the non-keyword set not only has a small capacity, but can also relieve the local storage pressure of the device, and as a non-keyword model, it is easier to hit the voice corresponding to the non-keyword in the user's voice, which plays a role in improving the accuracy and success rate of retrieving keywords. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0049] Figure 1 A schematic diagram of a framework of an exemplary application scenario provided in an embodiment of the present application;
[0050] Figure 2 A method flow chart of a method for constructing a non-keyword model in a decoding network provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of the structure of a device for constructing a non-keyword model in a decoding network provided in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of the structure of a device for constructing a non-keyword model in a decoding network provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0055] In the traditional way, KWS is mainly implemented locally on the device. However, the local storage space and data processing capabilities of the device are limited. If the number of non-keywords based on which KWS is performed is large, the capacity of the decoding network will be large, which will increase the local storage pressure of the device. Moreover, when the device uses the decoding network to perform KWS, the non-keyword model needs to construct more non-keyword decoding paths for more non-keywords, which greatly increases the amount of calculation required to retrieve keywords. In addition, since more non-keywords are in competition with keywords, they will interfere with the retrieval of keywords, resulting in a decrease in the accuracy and success rate of retrieving keywords. It can be seen that how to reasonably select non-keywords to construct the non-keyword model in the decoding network is a problem that needs to be solved urgently.
[0056] To this end, an embodiment of the present application provides a method for constructing a non-keyword model in a decoding network, in the hope of determining a small number of pronunciation elements that are more likely to appear in the user's voice from a large number of pronunciation elements, and constructing a non-keyword model through these small number of pronunciation elements that are more likely to appear in the user's voice, so that the constructed non-keyword model not only has a small capacity, which can alleviate the local storage pressure of the device, but also is easier to hit the voice corresponding to the non-keyword in the user's voice, thereby improving the accuracy and success rate of retrieving keywords.
[0057] The decoding network can be used for keyword retrieval, and the display form of the decoding network is usually a directed acyclic graph or a directed cyclic graph. In this embodiment, the object to be retrieved by the decoding network can be referred to as the voice to be retrieved, and the characters (such as words, phrases) to be retrieved in the process of retrieving the voice to be retrieved can be referred to as keywords, and correspondingly, characters (such as words, phrases) that are not keywords can be referred to as non-keywords.
[0058] It should be noted that the decoding network may include a non-keyword model and a keyword model. In the non-keyword model, a non-keyword decoding path may be established for each non-keyword in the non-keyword set, wherein the speech to be retrieved may obtain a matching value through the non-keyword decoding path, and the matching value may identify the possibility that the speech to be retrieved includes a non-keyword. The keyword model may be constructed based on keywords, and the speech to be retrieved may also obtain a matching value through the keyword model, and the matching value may identify the possibility that the speech to be retrieved includes a keyword. Among them, the matching value mentioned in the present embodiment may be a score, a numerical value, a probability value, and of course other possible display forms, and no limitation is made here on the display form of the matching value.
[0059] As an example, the method for constructing a non-keyword model in a decoding network provided in the embodiment of the present application can be applied to the following: Figure 1 In the scenario shown, the scenario may include a model building device 101. The model building device 101 may be a terminal with a model building function, such as a mobile phone, a laptop computer, a desktop computer, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, a car computer, a smart rearview mirror, and a smart speaker, etc. with a model building function; or, the model building device 101 may also be a server with a model building function. It should be noted that, for ease of description, in this embodiment, the model building device 101 will be mainly used as a server for example.
[0060] Specifically, the model building device 101 may first obtain a corpus set to be screened. The corpus set to be screened may be a set including a large number of characters, and the characters in the corpus set may be saved in the form of voice or text. Therefore, in some implementations, the corpus set may include multiple voice samples and / or multiple text samples, wherein any voice sample may include a voice corresponding to at least one character, and any text sample may include at least one character.
[0061] Before the model building device 101 establishes the non-keyword model in the decoding network, the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set can be determined. Among them, the occurrence rate of the pronunciation elements can be understood as the frequency of occurrence of the same pronunciation element in the pronunciation elements corresponding to all the characters included in the corpus set. It can be understood that the higher the occurrence rate of a pronunciation element, the higher the frequency of occurrence of the pronunciation element (that is, the more times it appears) among the pronunciation elements corresponding to all the characters included in the corpus set, which can reflect that the pronunciation element is more in line with the user's language expression habits, that is, the pronunciation element is more likely to appear in the user's voice; conversely, it means that the lower the frequency of occurrence of the pronunciation element (that is, the fewer times it appears) among the pronunciation elements corresponding to all the characters included in the corpus set, which can reflect that the pronunciation element is less in line with the user's language expression habits, that is, the pronunciation element is less likely to appear in the user's voice.
[0062] It should be noted that the pronunciation elements in the embodiments of the present application can be the pronunciations corresponding to characters, for example, they can be the syllables corresponding to characters; characters can be the basic semantic units in different languages. For example, in Chinese, characters can be Chinese characters, and the pronunciation elements corresponding to Chinese characters can be pinyin syllables; in English, characters can be words, and the pronunciation elements corresponding to words can be the corresponding phonetic notations or combinations of phonetic notations. For example, when the character is a Chinese character, the pronunciation element corresponding to the character can be a pinyin syllable. For example, when the character is the Chinese character "你" (nǐ), the pronunciation element corresponding to this character can be the pinyin syllable "ni"; when the character is an English word, the pronunciation element corresponding to the character can be an English syllable. For example, when the character is the English word "ball", the pronunciation element corresponding to this character can be the English syllable It should be noted that, in addition to the above possible ways, the language type of the character and the language type of the pronunciation element corresponding to the character can also be other different language types, and no limitation is imposed on the language type of the character here. For the convenience of description, in the subsequent embodiments, the character will mainly be a Chinese character, and the pronunciation element corresponding to the character will be a pinyin syllable as an example for description.
[0063] After the model construction device 101 determines the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, the model construction device 101 can form a non-keyword set with the pronunciation elements whose occurrence rate meets the preset threshold, that is, the model construction device 101 can determine the pronunciation elements with a higher occurrence rate as non-keywords through this preset threshold. In this way, the number of pronunciation elements in the non-keyword set can be made smaller than the number of pronunciation elements in the corpus set. It should be emphasized that since the pronunciation elements in the non-keyword set are used to match the speech corresponding to the non-keywords in the user's speech, therefore, in this embodiment, the pronunciation elements in the non-keyword set do not include the pronunciation elements corresponding to the keywords.
[0064] Moreover, the screening method of the model construction device 101 is based on pronunciation elements. Since pronunciation elements are speech units divided according to the natural attributes of speech, and they pay more attention to the pronunciation of characters without considering the specific meaning of the characters corresponding to the pronunciation elements, before the model construction device 101 constructs the non-keyword model in the decoding network, it can screen out the required non-keywords from the corpus set to be screened, that is, the non-keywords screened based on pronunciation elements are more in line with the requirements of keyword retrieval.
[0065] After the model building device 101 forms a non-keyword set, a non-keyword model in the decoding network can be constructed based on the non-keyword set. It should be noted that, compared with the pronunciation elements included in the corpus set, the number of pronunciation elements in the non-keyword set is not only small, but also belongs to pronunciation elements that are more likely to appear in the user's voice. Therefore, the pronunciation elements in the non-keyword set are high-quality pronunciation elements used in keyword retrieval. Therefore, the non-keyword model constructed by the non-keyword set not only has a small capacity, which can alleviate the local storage pressure of the device, but also as a non-keyword model, it is easier to hit the voice corresponding to the non-keyword in the user's voice, ensuring the accuracy and success rate of the keyword retrieval.
[0066] It should be noted that the above application scenarios are only shown for the purpose of facilitating the understanding of the present application, and the implementation of the present application is not limited in this respect. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0067] Various non-limiting implementations of the present application are described in detail below in conjunction with the accompanying drawings.
[0068] Next, the execution subject of the present application is a server as an example to introduce a method for constructing a non-keyword model in a decoding network provided by the present application. Figure 2 , is a flow chart of a method for constructing a non-keyword model in a decoding network provided by an embodiment of the present application. Figure 2 As shown, the following steps may be included:
[0069] S201: Obtain a corpus set to be screened.
[0070] In this embodiment, if the corpus set includes voice samples, then the voice samples can be obtained in the scenario where the user speaks, for example, the scenario where the user uses the intelligent interactive service, the scenario where the user uses the instant messaging tool to voice chat or send a voice message, etc. If the corpus set includes text samples, then the text samples can be obtained in the scenario where the user inputs text information, for example, the scenario where the user uses the instant messaging tool to send a text message; of course, the text samples can also be obtained by performing text recognition on the voice samples. It should be noted that in addition to the above-mentioned possible acquisition methods, the voice samples and text samples in the corpus set can also be other acquisition methods, and no limitation is made here on the acquisition methods of the voice samples and text samples.
[0071] It should be noted that in order to fully reflect the personal language expression habits of each user, the non-keyword model in the decoding network can more specifically hit the speech corresponding to the non-keyword in the user's speech. In an implementation of this embodiment, the sample in the corpus set can be the historical data of a single user.
[0072] Of course, in order to comprehensively reflect the writing expression habits of most users, so that the non-keyword model in the decoding network can more comprehensively and accurately match the non-keyword corresponding speech in the user's speech. In one implementation manner of this embodiment, the samples in the corpus set can be the historical data of a large number of users. For example, it can be the historical data of users of different ages, genders, regions, ethnic groups, and / or occupations.
[0073] S202: Determine the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set.
[0074] Since the occurrence rate of pronunciation elements can reflect the degree of conformity of pronunciation elements to the user's language expression habits, that is, the likelihood of pronunciation elements appearing in the user's speech. Therefore, in the embodiments of this application, after obtaining the corpus set to be screened, the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set can be determined, so as to subsequently determine the non-keywords that are more likely to appear in the user's speech according to the occurrence rate of the pronunciation elements.
[0075] Specifically, after the server obtains the corpus set to be screened, the server can first determine the pronunciation elements corresponding to the multiple characters included in the corpus set. As an example, when the corpus set includes speech samples, the server can determine the pronunciation elements corresponding to the characters according to the speech corresponding to the characters in the speech samples. For example, assuming a speech sample is the speech corresponding to two Chinese characters "你好" (hello), the server can determine the pronunciation element "ni" according to the speech corresponding to the Chinese character "你" in the speech sample, and determine the pronunciation element "hao" according to the speech corresponding to the Chinese character "好" in the speech sample; when the corpus set includes text samples, the server can determine the pronunciation elements corresponding to the characters according to the characters included in the text samples. For example, assuming a text sample is the word "什么" (what), the server can determine the pronunciation element "shen" according to the Chinese character "什" in the word, and can determine the pronunciation element "me" according to the Chinese character "么" in the word.
[0076] Then, the server can determine the occurrence rates corresponding to different pronunciation elements. It should be noted that this embodiment provides multiple ways to determine the occurrence rate of pronunciation elements. For example, in the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, the tones corresponding to the pronunciation elements can be considered, or the tones corresponding to the pronunciation elements can be not considered. That is, pronunciation elements with the same pronunciation structure but different tones can be regarded as the same pronunciation element, or pronunciation elements with the same pronunciation structure and the same tone can be regarded as the same pronunciation element. Next, the above two methods will be introduced.
[0077] The first method: In the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, pronunciation elements with the same pronunciation structure but different tones can be regarded as the same pronunciation element.
[0078] In this method, after obtaining the corpus set to be screened, in the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, pronunciation elements with the same pronunciation structure but different tones can be regarded as the same pronunciation element. For example, assume that the speech sample includes the speech corresponding to the Chinese character "泥" (ní) and the speech corresponding to the Chinese character "逆" (nì). Among them, the pronunciation element of the speech corresponding to the Chinese character "泥" is the pronunciation structure "ni" in the second tone, and the pronunciation element of the speech corresponding to the Chinese character "逆" is the pronunciation structure "ni" in the fourth tone. It can be seen that although the tone of the pronunciation element of the speech corresponding to the Chinese character "泥" is different from the tone of the pronunciation element of the speech corresponding to the Chinese character "逆", the pronunciation structure of the pronunciation element of the speech corresponding to the Chinese character "泥" is the same as the pronunciation structure of the pronunciation element of the speech corresponding to the Chinese character "逆". Therefore, the pronunciation element of the speech corresponding to the Chinese character "泥" and the pronunciation element of the speech corresponding to the Chinese character "逆" can be regarded as the same pronunciation element.
[0079] That is to say, in this method, in the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, the sum of the occurrence rates of the same pronunciation structure under different tones can be used as the occurrence rate of the pronunciation element corresponding to this pronunciation structure. In this case, taking Chinese as an example, the occurrence rate of each pronunciation element can include the sum of the occurrence rates of the pronunciation forms of this pronunciation element corresponding to the pronunciation structure under multiple tones.
[0080] For example, assuming that the pronunciation elements corresponding to the characters included in the corpus set appear a total of 100 times, and one of the voice samples in the corpus set is the voice corresponding to "Brother, you can turn the tide"; then, it can be statistically obtained that in this voice sample, the pronunciation structure "di" under the fourth tone appears 2 times, the pronunciation structure "ni" under the third tone appears 1 time, and the pronunciation structure "ni" under the fourth tone appears 1 time; since the pronunciation structure "ni" under the third tone and the pronunciation structure "ni" under the fourth tone are the same pronunciation element, the pronunciation structure "ni" under the third tone and the pronunciation structure "ni" under the fourth tone can be regarded as the same pronunciation element. "F[ni]", so in this speech sample, the pronunciation element F[ni] appears 2 times; in addition, since the pronunciation structure "ni" under the third tone appears a total of 10 times in the corpus set (that is, the appearance rate in the corpus set is 10%), and the pronunciation structure "ni" under the fourth tone appears a total of 10 times in the corpus set (that is, the appearance rate in the corpus set is 10%), the appearance rate of the pronunciation structure "ni" under the third tone and the appearance rate of the pronunciation structure "ni" under the fourth tone can be taken as the appearance rate of the pronunciation element F[ni], so that the appearance rate of the pronunciation element F[ni] in the expected set can be determined to be 20%.
[0081] It can be understood that in this method, in the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, the pronunciation elements with the same pronunciation structure but different tones can be regarded as the same pronunciation element, that is, only the pronunciation structure of the pronunciation elements corresponding to the non-keywords in the user's voice needs to be concerned, and the tones of the pronunciation elements corresponding to the non-keywords do not need to be concerned. Therefore, when establishing a non-keyword decoding path for non-keywords in the non-keyword model, only the nodes related to the structure of the pronunciation elements corresponding to the non-keywords need to be established in the non-keyword decoding path, and the nodes related to the tones of the pronunciation elements corresponding to the non-keywords do not need to be established. In this way, the pronunciation elements corresponding to the same pronunciation structure under different tones can all obtain the same matching value through the non-keyword decoding path corresponding to the pronunciation elements. It can be seen that in the process of hitting the voice corresponding to the non-keywords, the pronunciation elements corresponding to the non-keywords need to be considered in this method, and the voice corresponding to the non-keywords can be hit more accurately. Moreover, since the non-keyword decoding path only includes nodes related to the pronunciation elements corresponding to the non-keywords, and does not include nodes related to the tones corresponding to the non-keywords, the amount of calculation for retrieving keywords can be reduced.
[0082] The second way: in the process of determining the occurrence rates of the pronunciation elements corresponding to the characters included in the corpus set, the pronunciation elements with the same pronunciation structure and the same tone can be regarded as the same pronunciation element.
[0083] In this method, after obtaining the corpus set to be screened, in the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the samples in the corpus set, pronunciation elements with the same pronunciation structure and the same tone can be regarded as the same pronunciation element. For example, assume that the text sample includes the Chinese characters "Xu" and "Xu". Although the pronunciation structures of the pronunciation elements corresponding to the Chinese character "Xu" and the pronunciation elements corresponding to the Chinese character "Xu" are the same, the tones corresponding to them are different. Therefore, the pronunciation elements corresponding to the Chinese character "Xu" and the pronunciation elements corresponding to the Chinese character "Xu" can be regarded as two different pronunciation elements respectively.
[0084] That is to say, in this method, in the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the text samples in the corpus set, the occurrence rates of the same pronunciation structure under different tones can be regarded as the occurrence rates of different pronunciation elements respectively. In this case, taking Chinese as an example, the occurrence rate of each pronunciation element only includes the occurrence rate of the pronunciation form of the pronunciation structure corresponding to the pronunciation element under one tone.
[0085] For example, assume that the pronunciation elements corresponding to the characters included in the corpus set appear a total of 100 times, and a text sample in the corpus set includes multiple Chinese characters such as "Brother, you can make a comeback against the odds". Then, it can be statistically obtained that in this text sample, the number of occurrences of the pronunciation structure "di" in the fourth tone is 2 times, the number of occurrences of the pronunciation structure "ni" in the third tone is 1 time, and the number of occurrences of the pronunciation structure "ni" in the fourth tone is 1 time; since the pronunciation structure "ni" in the third tone and the pronunciation structure "ni" in the fourth tone are pronunciation elements with the same pronunciation structure but different tones. Therefore, the pronunciation structure "ni" in the third tone and the pronunciation structure "ni" in the fourth tone can be regarded as different pronunciation elements respectively. Thus, in this voice sample, the number of occurrences of the pronunciation element "F[ni, third tone]" is 1 time, and the number of occurrences of the pronunciation element "F[ni, fourth tone]" is 1 time; in addition, since the number of occurrences of the pronunciation element "F[ni, third tone]" in this corpus set is a total of 10 times, and the number of occurrences of the pronunciation element "F[ni, fourth tone]" in this corpus set is a total of 10 times. Thus, it can be determined that the occurrence rate of the pronunciation element "F[ni, third tone]" in this corpus set is 10%, and the occurrence rate of the pronunciation element "F[ni, fourth tone]" in this corpus set is 10%.
[0086] It can be understood that in this method, in the process of determining the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, the pronunciation elements with the same pronunciation structure and the same tone can be regarded as the same pronunciation element, that is, it is necessary to care not only about the pronunciation structure of the pronunciation elements corresponding to the non-keywords in the user's voice, but also about the tone of the pronunciation elements corresponding to the non-keywords. Therefore, when establishing a non-keyword decoding path for non-keywords in the non-keyword model, the non-keyword decoding path not only needs to include nodes related to the pronunciation structure of the pronunciation elements corresponding to the non-keywords, but also needs to include nodes related to the tone of the pronunciation elements corresponding to the non-keywords, so that the pronunciation elements corresponding to the same pronunciation structure under different tones can obtain different matching values through the non-keyword decoding path. It can be seen that compared with the first method, in the process of hitting the voice corresponding to the non-keywords, the structure and tone of the pronunciation elements corresponding to the non-keywords need to be considered at the same time in this method, which improves the accuracy of hitting the voice corresponding to the non-keywords, but because the non-keyword decoding path includes nodes related to the pronunciation structure and tone of the pronunciation elements corresponding to the non-keywords, respectively, the amount of calculation for retrieving keywords increases.
[0087] After introducing the various methods for determining the occurrence rates of pronunciation elements provided in the present embodiment, it should be noted that, in the present embodiment, the methods for determining the occurrence rates of pronunciation elements are different, and the methods for retrieving keywords in user voice are also different. In a possible implementation, if in the process of determining the occurrence rates of pronunciation elements corresponding to characters included in the corpus set, pronunciation elements with the same pronunciation structure but different tones are taken as the same pronunciation element, then, when retrieving the voice corresponding to the keyword in the user voice, the voice including the pronunciation element corresponding to the keyword can be taken as the voice corresponding to the keyword, that is, only the structure of the pronunciation element corresponding to the keyword in the user voice needs to be concerned, and the tone of the pronunciation element corresponding to the keyword does not need to be concerned. In another possible implementation, if in the process of determining the occurrence rates of pronunciation elements corresponding to characters included in the corpus set, pronunciation elements with the same pronunciation structure and the same tone are taken as the same pronunciation element, then, when retrieving the voice corresponding to the keyword in the user voice, the voice including the structure and tone of the pronunciation element corresponding to the keyword can be taken as the voice corresponding to the keyword, that is, not only the structure of the pronunciation element corresponding to the keyword in the user voice needs to be concerned, but also the tone of the pronunciation element corresponding to the keyword needs to be concerned.
[0088] S203: Pronunciation elements whose occurrence rates meet a preset threshold form a non-keyword set.
[0089] After determining the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set, non-keywords can be determined from the pronunciation elements corresponding to the characters included in the corpus set by using a preset threshold. It should be noted that if the occurrence rate of a pronunciation element is greater than or equal to the preset threshold, it means that the pronunciation element belongs to the pronunciation elements that are more likely to appear in the user's voice, otherwise, it means that the pronunciation element does not belong to the pronunciation elements that are more likely to appear in the user's voice. Therefore, in this embodiment, the pronunciation elements whose occurrence rate meets the preset threshold can be determined as non-keywords, and these pronunciation elements determined as non-keywords can constitute a non-keyword set.
[0090] It should be noted that, in this embodiment, the preset threshold value can be determined according to the preset number of non-keywords in the non-keyword set. Among them, the preset number of non-keywords in the non-keyword set can be determined according to the retrieval speed requirement and retrieval accuracy requirement of KWS. It can be understood that if the retrieval speed requirement of KWS is faster, the preset number of non-keywords in the non-keyword set is smaller, and vice versa, the preset number of non-keywords in the non-keyword set is larger; if the retrieval accuracy requirement of KWS is higher, the preset number of non-keywords in the non-keyword set is larger, and vice versa, the preset number of non-keywords in the non-keyword set is smaller; in actual use, the preset number of non-keywords in the non-keyword set can usually be set to 60-100.
[0091] Next, how to determine the preset threshold value according to the preset number of non-keywords in the non-keyword set will be introduced. In one implementation, the pronunciation elements corresponding to the characters included in the corpus set can be sorted according to the occurrence rate of the pronunciation elements. For example, the pronunciation elements corresponding to the characters included in the corpus set can be sorted in descending order of the occurrence rate of the pronunciation elements; then, the first N pronunciation elements with higher occurrence rates in the sorting result can be determined according to the preset number N (N is a positive integer) of non-keywords in the non-keyword set; then, the pronunciation element with the lowest occurrence rate among the N pronunciation elements can be determined, and the occurrence rate of the pronunciation element with the lowest occurrence rate can be used as the preset threshold value.
[0092] In addition to the user's voice, the voice to be retrieved usually includes some noise, such as the "whoosh" sound of a car driving and the "hiss" sound of gas burning. In order to enable the non-keyword model to hit the voice corresponding to the non-keyword in the noise in addition to the voice corresponding to the non-keyword in the user's voice, thereby improving the accuracy and success of retrieving keywords. In an implementation of this embodiment, the non-keyword set may also include pronunciation elements corresponding to onomatopoeia, for example, onomatopoeia may include "ah", "bar", "pu", "hiss", "whoosh", etc.
[0093] S204: Constructing a non-keyword model in a decoding network according to the non-keyword set.
[0094] After the non-keyword set is determined, a non-keyword model in the decoding network can be constructed based on the non-keywords in the non-keyword set, so that the non-keyword model can be used to hit the speech corresponding to the non-keyword in the speech to be retrieved.
[0095] It can be seen from the above technical solution that before establishing the non-keyword model in the decoding network, the required non-keywords can be screened out from the corpus set to be screened. The screening method is based on pronunciation elements. Since pronunciation elements are speech units divided according to the natural attributes of speech, they focus more on the pronunciation of characters without considering the specific meaning of the characters corresponding to the pronunciation elements. Therefore, screening non-keywords based on pronunciation elements is more in line with the needs of keyword retrieval. Therefore, after determining the occurrence rate of pronunciation elements corresponding to the characters included in the corpus set, the pronunciation elements whose occurrence rate meets the preset threshold can be used to form a non-keyword set. The pronunciation elements with a higher occurrence rate can be determined as non-keywords by the preset threshold. Compared with the pronunciation elements included in the corpus set, the number of pronunciation elements in the non-keyword set is not only small, but also belongs to pronunciation elements that are more likely to appear in the user's voice. Therefore, the pronunciation elements in the non-keyword set belong to high-quality pronunciation elements used in keyword retrieval. The non-keyword model constructed by the non-keyword set not only has a small capacity, but can also relieve the local storage pressure of the device, and as a non-keyword model, it is easier to hit the voice corresponding to the non-keyword in the user's voice, which plays a role in improving the accuracy and success rate of retrieving keywords.
[0096] It should be noted that when the speech to be detected includes keywords, it is possible that the matching value obtained by the speech to be detected through a non-keyword decoding path in the non-keyword model is higher than the matching value obtained by the speech to be detected through the keyword model. This will cause the speech to be retrieved to be incorrectly determined as not including keywords. Therefore, in order to reduce the probability that the non-keyword model incorrectly hits the speech corresponding to the keyword in the speech to be retrieved, thereby improving the accuracy and success of the decoding network in retrieving keywords from the speech to be retrieved. In one implementation of this embodiment, Figure 2 On the basis of the corresponding embodiment, the method may further include: establishing a virtual decoding path in the non-keyword model, and the speech to be retrieved obtains a matching value through the virtual decoding path.
[0097] In this embodiment, a virtual decoding path can be established in the non-keyword model, wherein the virtual decoding path does not correspond to any specific character or pronunciation element. Furthermore, the speech to be retrieved can obtain a matching value through the virtual decoding path in the non-keyword model. It should be noted that the matching value can be determined based on the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model.
[0098] Next, it will be specifically described how to determine the matching value obtained by the speech to be retrieved through the virtual decoding path in the non-keyword model according to the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model.
[0099] Specifically, the matching values obtained by the voice to be retrieved through each non-keyword decoding path can be obtained first. Then, the matching value obtained by the voice to be retrieved through the virtual decoding path can be determined according to the matching values obtained by the voice to be retrieved through each non-keyword decoding path; for example, the average value of the matching values obtained by the voice to be retrieved through each non-keyword decoding path can be used as the matching value obtained by the voice to be retrieved through the virtual decoding path, or the calculation result (such as product) of the average value and the preset coefficient can be used as the matching value obtained by the voice to be retrieved through the virtual decoding path; for another example, the maximum value or minimum value of the matching values obtained by the voice to be retrieved through each non-keyword decoding path can be used as the matching value obtained by the voice to be retrieved through the virtual decoding path, or the calculation result (such as product) of the maximum value or the minimum value and the preset coefficient can be used as the matching value obtained by the voice to be retrieved through the virtual decoding path.
[0100] It should be noted that if the matching value obtained by the to-be-retrieved speech through the keyword model is higher than the matching value obtained by the to-be-retrieved speech through any non-keyword decoding path in the non-keyword model, and higher than the matching value obtained by the to-be-retrieved speech through the virtual decoding path in the non-keyword model, then it can be determined that the to-be-retrieved speech includes the pronunciation element corresponding to the keyword. On the contrary, if the matching value obtained by the to-be-retrieved speech through the keyword model is lower than or equal to the matching value obtained by the to-be-retrieved speech through any non-keyword decoding path in the non-keyword model, or lower than or equal to the matching value obtained by the to-be-retrieved speech through the virtual decoding path in the non-keyword model, then it can be determined that the to-be-retrieved speech includes the keyword in the non-keyword set.
[0101] It can be seen from the above technical solution that since the non-keyword model also includes a virtual decoding path, and the speech to be retrieved can obtain a matching value through the virtual decoding path in the non-keyword model. Since the matching value obtained by the speech to be retrieved through the virtual decoding path in the non-keyword model is determined according to the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model. Therefore, the matching value obtained by the speech to be retrieved through the virtual decoding path can be changed at any time during the process of retrieving keywords for the speech to be retrieved, and the matching value belongs to the better matching value between the speech to be retrieved and the non-keyword. Therefore, the non-keyword model can also hit the speech corresponding to the non-keyword in the non-keyword set with a higher probability according to the matching value obtained by the speech to be retrieved through the virtual decoding path, thereby reducing the probability of the non-keyword model obtaining the matching value according to the non-keyword decoding path and erroneously hitting the speech corresponding to the keyword in the speech to be retrieved, thereby improving the accuracy and success of the decoding network in retrieving keywords from the speech to be retrieved.
[0102] See also Figure 3 , shows a device for constructing a non-keyword model in a decoding network in an embodiment of the present application, the device comprising: a set acquisition unit 301, an appearance rate determination unit 302, a set construction unit 303 and a model construction unit 304;
[0103] The set acquisition unit 301 is used to acquire a corpus set to be screened;
[0104] The occurrence rate determination unit 302 is used to determine the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set;
[0105] The set construction unit 303 is used to form a non-keyword set from pronunciation elements whose appearance rate meets a preset threshold, the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords;
[0106] The model building unit 304 is used to build a non-keyword model in the decoding network according to the non-keyword set.
[0107] Optionally, the corpus set includes a plurality of voice samples, wherein any voice sample includes a voice corresponding to at least one character;
[0108] and / or,
[0109] The corpus set includes a plurality of text samples, wherein any text sample includes at least one character.
[0110] Optionally, in the process of determining the occurrence rates of pronunciation elements corresponding to characters included in the corpus set, pronunciation elements with the same pronunciation elements but different tones are regarded as the same pronunciation element, or pronunciation elements with the same pronunciation elements and the same tones are regarded as the same pronunciation element.
[0111] Optionally, the device further comprises:
[0112] A virtual decoding path is established in the non-keyword model, and the speech to be retrieved obtains a matching value through the virtual decoding path; the matching value is determined based on the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model.
[0113] Optionally, the matching value obtained by the to-be-retrieved speech through the virtual decoding path includes any one of the following:
[0114] An average value of matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model;
[0115] The maximum value or the minimum value among the matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model;
[0116] The calculation result of the average value, maximum value or minimum value and the preset coefficient.
[0117] Optionally, the decoding network also includes a keyword model. If the matching value obtained by the keyword model for the speech to be retrieved is higher than the matching value obtained by the speech to be retrieved through any non-keyword decoding path and higher than the matching value obtained by the virtual decoding path, it is determined that the speech to be retrieved includes the pronunciation element corresponding to the keyword.
[0118] Optionally, the non-keyword set also includes pronunciation elements corresponding to onomatopoeias.
[0119] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0120] Figure 4 4 is a block diagram of a device 400 for constructing a non-keyword model in a decoding network according to an exemplary embodiment. For example, the device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0121] Reference Figure 4, the device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0122] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0123] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0124] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 400.
[0125] The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0126] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the device 400 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0127] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0128] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400, and the sensor assembly 414 can also detect the position change of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400, and the temperature change of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0129] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0130] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.
[0131] Figure 5 : is a schematic diagram of the structure of the server in an embodiment of the present invention. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 522 (for example, one or more processors) and a memory 532, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 542 or data 544. Among them, the memory 532 and the storage medium 530 can be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 522 can be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the server 500.
[0132] The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input and output interfaces 558, one or more keyboards 556, and / or one or more operating systems 541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0133] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of the device 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0134] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a method for constructing a non-keyword model in a decoding network, the method comprising:
[0135] Get the corpus collection to be screened;
[0136] Determining the occurrence rate of pronunciation elements corresponding to the characters included in the corpus set;
[0137] The pronunciation elements whose occurrence rate meets the preset threshold constitute a non-keyword set, the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords;
[0138] A non-keyword model in a decoding network is constructed according to the non-keyword set.
[0139] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: read-only memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0140] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for constructing a non-keyword model in a decoding network, characterized in that: The method comprises: Get the corpus collection to be screened; Determine the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set; the occurrence rate is the occurrence frequency of the same pronunciation element among the pronunciation elements corresponding to all the characters included in the corpus set; the same pronunciation element is a pronunciation element with the same pronunciation structure and the same tone; The pronunciation elements whose occurrence rate meets the preset threshold constitute a non-keyword set; the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords; the preset threshold is determined according to the preset number of non-keywords in the non-keyword set, and the preset number is determined according to the retrieval speed requirement and retrieval accuracy requirement of the keyword retrieval; Constructing a non-keyword model in a decoding network according to the non-keywords in the non-keyword set; A virtual decoding path is established in the non-keyword model, and the speech to be retrieved obtains a matching value through the virtual decoding path; the matching value obtained by the speech to be retrieved through the virtual decoding path is determined according to the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model; the pronunciation elements corresponding to the same pronunciation structure under different tones obtain different matching values through the non-keyword decoding path; the matching value is used to characterize the probability that the speech to be retrieved includes non-keywords.
2. The method according to claim 1, characterized in that The corpus set includes a plurality of voice samples, wherein any voice sample includes a voice corresponding to at least one character; and / or, The corpus set includes a plurality of text samples, wherein any text sample includes at least one character.
3. The method according to claim 1, characterized in that The matching value obtained by the to-be-retrieved speech through the virtual decoding path includes any one of the following: An average value of matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model; The maximum value or the minimum value among the matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model; The calculation result of the average value, maximum value or minimum value and the preset coefficient.
4. The method according to claim 1, characterized in that: The decoding network also includes a keyword model. If the matching value obtained by the to-be-retrieved speech through the keyword model is higher than the matching value obtained by the to-be-retrieved speech through any non-keyword decoding path and higher than the matching value obtained by the virtual decoding path, it is determined that the to-be-retrieved speech includes the pronunciation element corresponding to the keyword.
5. The method according to any one of claims 1-2, characterized in that: The non-keyword set also includes pronunciation elements corresponding to onomatopoeias.
6. A device for constructing a non-keyword model in a decoding network, characterized in that: The device comprises: a set acquisition unit, an appearance rate determination unit, a set construction unit and a model construction unit; The set acquisition unit is used to acquire a corpus set to be screened; The occurrence rate determination unit is used to determine the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set; the occurrence rate is the occurrence frequency of the same pronunciation element among the pronunciation elements corresponding to all the characters included in the corpus set; the same pronunciation element is a pronunciation element with the same pronunciation structure and the same tone; The set construction unit is used to form a non-keyword set from pronunciation elements whose appearance rate meets a preset threshold; the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords; the preset threshold is determined according to a preset number of non-keywords in the non-keyword set, and the preset number is determined according to a retrieval speed requirement and a retrieval accuracy requirement of a keyword search; The model building unit is used to build a non-keyword model in a decoding network according to the non-keywords in the non-keyword set; A virtual decoding path is established in the non-keyword model, and the speech to be retrieved obtains a matching value through the virtual decoding path; the matching value is determined based on the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model; pronunciation elements corresponding to the same pronunciation structure under different tones obtain different matching values through the non-keyword decoding path; the matching value is used to characterize the probability that the speech to be retrieved includes non-keywords.
7. The device according to claim 6, characterized in that The corpus set includes a plurality of voice samples, wherein any voice sample includes a voice corresponding to at least one character; and / or, The corpus set includes a plurality of text samples, wherein any text sample includes at least one character.
8. The device according to claim 6, characterized in that The matching value obtained by the to-be-retrieved speech through the virtual decoding path includes any one of the following: An average value of matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model; The maximum value or the minimum value among the matching values obtained by the to-be-retrieved speech through the non-keyword decoding path in the non-keyword model; The calculation result of the average value, maximum value or minimum value and the preset coefficient.
9. The device according to claim 6, characterized in that The decoding network also includes a keyword model. If the matching value obtained by the to-be-retrieved speech through the keyword model is higher than the matching value obtained by the to-be-retrieved speech through any non-keyword decoding path and higher than the matching value obtained by the virtual decoding path, it is determined that the to-be-retrieved speech includes the pronunciation element corresponding to the keyword.
10. The device according to any one of claims 6 to 9, characterized in that: The non-keyword set also includes pronunciation elements corresponding to onomatopoeias.
11. A device for constructing a non-keyword model in a decoding network, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Get the corpus collection to be screened; Determine the occurrence rate of the pronunciation elements corresponding to the characters included in the corpus set; the occurrence rate is the occurrence frequency of the same pronunciation element among the pronunciation elements corresponding to all the characters included in the corpus set; the same pronunciation element is a pronunciation element with the same pronunciation structure and the same tone; The pronunciation elements whose occurrence rate meets the preset threshold constitute a non-keyword set, the number of pronunciation elements in the non-keyword set is less than the number of pronunciation elements in the corpus set, and the pronunciation elements in the non-keyword set do not include pronunciation elements corresponding to keywords; The preset threshold is determined according to a preset number of non-keywords in the non-keyword set, and the preset number is determined according to a retrieval speed requirement and a retrieval accuracy requirement of a keyword search; Constructing a non-keyword model in a decoding network according to the non-keywords in the non-keyword set; A virtual decoding path is established in the non-keyword model, and the speech to be retrieved obtains a matching value through the virtual decoding path; the matching value obtained by the speech to be retrieved through the virtual decoding path is determined according to the matching value obtained by the speech to be retrieved through the non-keyword decoding path in the non-keyword model; the pronunciation elements corresponding to the same pronunciation structure under different tones obtain different matching values through the non-keyword decoding path; the matching value is used to characterize the probability that the speech to be retrieved includes non-keywords.
12. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for constructing a non-keyword model in a decoding network as described in any one of claims 1 to 5.
13. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed on a computer device, the computer device executes the method for constructing a non-keyword model in a decoding network as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for constructing pronunciation dictionaries
CN102201235A
Speech keyword spotting system and system and method of creating dictionary for the speech keyword spotting system
CN102915729A
Method and device for detecting keywords in voice
CN103730115A
Method and system for improving accuracy of speech recognition
CN103903619A
Method and device for detecting keywords
CN103971678A
