A wake-up word recognition model training, recognition method, device and medium
By determining the target labels of speech frames and calculating the loss value during wake-up word recognition model training, the problems of high false alarm rate and context dependence are solved, achieving more accurate and stable wake-up word recognition.
Patent Information
- Application Number
- CN202111530961.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-12-14
AI Technical Summary
Existing wake-up word recognition technology has a high false alarm rate and over-reliance on the contextual information of the wake-up word, resulting in unstable wake-up word recognition performance.
During the training process of the wake-up word recognition model, the target label of each speech frame is determined based on the pre-saved receptive field length and sample speech length, and the wake-up word is identified as being within the receptive field of the model and its position. The loss value is calculated based on the recognition label and the target label to adjust the model parameters, avoiding dependence on contextual information.
The false awakening rate of wake-up word recognition is reduced, the accuracy and stability of wake-up word recognition are improved, and the dependence on the context information of the wake-up word is reduced.
Smart Images

Figure CN114373450B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech recognition technology, and in particular to a wake-up word recognition model training, recognition method, device and medium. Background Art
[0002] Currently, wake-up word recognition primarily relies on deep learning technology. This involves inputting features from speech information into a neural network model, which is then trained based on the wake-up word features within the input features. Because people speak at varying speeds, the neural network model "sees" not just the wake-up word itself, but also the surrounding context. This range, encompassing the wake-up word and its context, is called the neural network model's receptive field. This contextual information is a key factor influencing the neural network model's performance in wake-up word recognition. For example, for a neural network model that supports the wake-up word "turn on the air conditioner," we may find that sometimes the voice prompt "Please turn on the air conditioner for me" fails to trigger a wake-up call, and sometimes even the voice prompt "Turn on the air conditioner" fails to trigger a wake-up call.
[0003] In the prior art, wake-up word recognition mainly uses fine-grained phoneme-level modeling or character modeling. The advantage of this is that the neural network model generally does not have an excessive dependence on the contextual information of the wake-up word, but the false awakening rate is high. In the prior art, wake-up word recognition can also be based on whole-word modeling of the wake-up word. The advantage of this is that the neural network model can fully consider the global semantics of the wake-up word and effectively reduce false awakenings caused by confusing words. However, whole-word modeling of the wake-up word requires considering the global semantics of the wake-up word to complete the wake-up word recognition, which will have an excessive dependence on the contextual information of the wake-up word. Summary of the Invention
[0004] The present application implements a wake-up word recognition model training, recognition method, device and medium to solve the problem in the prior art that the wake-up word recognition false awakening rate is high or the over-reliance on the context information of the wake-up word.
[0005] In a first aspect, the present application provides a method for training a wake-up word recognition model, the method comprising:
[0006] For each sample speech in the sample set, determine the target label corresponding to each speech frame in the sample speech based on the pre-saved receptive field length and the length of the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model at the time of the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model; input each speech frame of the sample speech into the wake-up word recognition model, and obtain the identification label of each speech frame output by the wake-up word recognition model;
[0007] According to the identification label of each speech frame of the sample speech and the target label, the loss value corresponding to each speech frame is determined, and the wake-up word recognition model is adjusted according to the loss value corresponding to each speech frame.
[0008] In a second aspect, the present application provides a wake-up word recognition method, the method comprising:
[0009] receiving a target speech to be recognized;
[0010] Input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain the probability value of the label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than the threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it;
[0011] If the target tag indicates that the speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word, a wake-up instruction is output.
[0012] In a third aspect, the present application provides a wake-up word recognition model training device, the device comprising:
[0013] An acquisition module is used to determine, for each sample speech in the sample set, a target label corresponding to each speech frame in the sample speech based on the pre-saved receptive field length and the length of the wake-up word in the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model at the time of the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model; each speech frame of the sample speech is input into the wake-up word recognition model to obtain the identification label of each speech frame output by the wake-up word recognition model;
[0014] The training module is used to determine the loss value corresponding to each speech frame based on the identification label of each speech frame of the sample speech and the target label, and adjust the wake-up word recognition model according to the loss value corresponding to each speech frame.
[0015] In a fourth aspect, the present application provides a wake-up word recognition device, the device comprising:
[0016] A receiving module, configured to receive a target speech to be recognized;
[0017] A determination module is configured to input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain a probability value of a label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than a threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it;
[0018] The recognition module outputs a wake-up instruction if the target tag indicates that the speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word.
[0019] In a fifth aspect, the present application also provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned wake-up word recognition model training methods or the above-mentioned wake-up word recognition methods when executing a computer program stored in the memory.
[0020] In a sixth aspect, the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned wake-up word recognition model training methods or the above-mentioned wake-up word recognition methods.
[0021] The embodiments of the present application provide wake-up word recognition model training, recognition methods, devices and media. During the wake-up word recognition model training process, for each sample speech in the sample set, the target label corresponding to each speech frame in the sample speech is determined based on the pre-saved receptive field length and the length of the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model when the corresponding speech frame is used, and the current position of the wake-up word in the receptive field of the model. Each speech frame of the sample speech is input into the wake-up word recognition model, and the identification label of each speech frame output by the wake-up word recognition model is obtained. According to the identification label of each speech frame of the sample speech and the target label, the loss value corresponding to each speech frame is determined, and the wake-up word recognition model is adjusted according to the loss value corresponding to each speech frame. Since, during the training of the wake-up word recognition model in the embodiment of the present application, the target label corresponding to each speech frame in the sample speech is determined according to the pre-saved receptive field length and the length of the wake-up word in the sample speech, and the target label is used to identify whether the complete wake-up word in the sample speech is located within the receptive field of the model when the corresponding speech frame is located, and the current position of the wake-up word in the receptive field of the model, each speech frame of the sample speech is input into the wake-up word recognition model, thereby obtaining the identification label of each speech frame output by the wake-up word recognition model, and determining the loss value corresponding to each speech frame based on the identification label and target label of each speech frame, so that the wake-up word recognition module can recognize the wake-up words at different positions in the receptive field, avoiding dependence on the contextual information of the wake-up word. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. 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 any creative work.
[0023] Figure 1 A schematic diagram of the process of the wake-up word recognition model training method provided in an embodiment of the present application;
[0024] Figure 2 A schematic diagram of determining a target label for each speech frame in a sample speech according to an embodiment of the present application;
[0025] Figure 3 A schematic diagram of a target label determination process for a speech frame in a sample speech provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of the receptive field of the wake-up word recognition model provided in an embodiment of the present application;
[0027] Figure 5aA schematic diagram of the wake-up word recognition model provided in an embodiment of the present application outputting the identification label corresponding to each speech frame;
[0028] Figure 5b A schematic diagram of the wake-up word recognition model provided in an embodiment of the present application outputting the identification label corresponding to each speech frame;
[0029] Figure 6 A schematic diagram of determining a target label for a speech frame in a sample speech according to an embodiment of the present application;
[0030] Figure 7 Another schematic diagram of determining a target label for a speech frame in a sample speech according to an embodiment of the present application;
[0031] Figure 8 The ROC curve of the wake-up word recognition model provided in the embodiment of this application;
[0032] Figure 9 A schematic diagram of a wake-up word recognition method provided in an embodiment of the present application;
[0033] Figure 10 A schematic diagram of the process of using the wake-up word recognition model provided in an embodiment of the present application;
[0034] Figure 11 A schematic diagram of the structure of the wake-up word recognition model training device provided in an embodiment of the present application;
[0035] Figure 12 A schematic diagram of the structure of the wake-up word recognition device provided in an embodiment of the present application;
[0036] Figure 13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0037] Figure 14 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of this application more clear, the technical solutions of the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0039] The embodiments of the present application provide wake-up word recognition model training, recognition methods, devices and media. During the wake-up word recognition model training process, for each sample speech in the sample set, the target label corresponding to each speech frame in the sample speech is determined based on the pre-saved receptive field length and the length of the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model when the corresponding speech frame is used, and the current position of the wake-up word in the receptive field of the model. Each speech frame of the sample speech is input into the wake-up word recognition model, and the identification label of each speech frame output by the wake-up word recognition model is obtained. According to the identification label of each speech frame of the sample speech and the target label, the loss value corresponding to each speech frame is determined, and the wake-up word recognition model is adjusted according to the loss value corresponding to each speech frame. Since, during the training of the wake-up word recognition model in the embodiment of the present application, the target label corresponding to each speech frame in the sample speech is determined according to the pre-saved receptive field length and the length of the wake-up word in the sample speech, and the target label is used to identify whether the complete wake-up word in the sample speech is located within the receptive field of the model when the corresponding speech frame is located, and the current position of the wake-up word in the receptive field of the model, each speech frame of the sample speech is input into the wake-up word recognition model, thereby obtaining the identification label of each speech frame output by the wake-up word recognition model, and determining the loss value corresponding to each speech frame based on the identification label and target label of each speech frame, so that the wake-up word recognition module can recognize the wake-up words at different positions in the receptive field, avoiding dependence on the contextual information of the wake-up word.
[0040] Example 1:
[0041] Figure 1 This is a schematic diagram of the process of the wake-up word recognition model training method provided in an embodiment of the present application. The process specifically includes the following steps:
[0042] S101: For each sample speech in the sample set, determine the target label corresponding to each speech frame in the sample speech according to the pre-saved receptive field length and the length of the sample speech, and the target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model when the corresponding speech frame is in place, and the current position of the wake-up word in the receptive field of the model; input each speech frame of the sample speech into the wake-up word recognition model, and obtain the identification label of each speech frame output by the wake-up word recognition model.
[0043] The wake-up word recognition model training method provided in the embodiment of the present application is applied to an electronic device, which may be a server, a PC, or other device.
[0044] In order to obtain a wake-up word recognition model that does not rely on the context information of the wake-up word based on the whole word modeling of the wake-up word, in an embodiment of the present application, a sample set is pre-configured, and the sample set contains multiple sample voices, and the wake-up word recognition model can be trained according to each sample voice contained in the sample set. The sample voices contained in the sample set in the embodiment of the present application all contain the wake-up word. For example, if the wake-up word is "turn on the air conditioner", then each sample voice contains "turn on the air conditioner".
[0045] In order to facilitate the subsequent training of the wake-up word recognition model, in an embodiment of the present application, for each sample speech in the sample set, the target label corresponding to each speech frame in the sample speech is determined based on the pre-saved receptive field length and the length of the sample speech. Among them, the target label identifies whether the complete speech frame of the sample speech that has been input into the model is located within the receptive field of the model, and when there is a complete wake-up word, the current position of the wake-up word in the receptive field of the model. The sample set contains a large number of sample speech, each sample speech contains a wake-up word that needs to be recognized by the wake-up word recognition model, and each sample speech can also contain other information. Due to different usage conditions of electronic devices, in order to ensure the accuracy of the wake-up word recognition model after training, for each sample speech in the sample set, the sample speech can be processed by adding noise, reverberation, etc.
[0046] Due to the diversity of users of electronic devices, each user has different speaking habits. In order to ensure the accuracy of the wake-up word recognition model in identifying the wake-up word, specifically, in an embodiment of the present application, the target label can identify whether the complete wake-up word in the sample speech is located in the receptive field of the model in the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model, thereby training the wake-up word recognition model to recognize the wake-up words at different positions in the receptive field.
[0047] When training the wake-up word recognition model, each speech frame of each sample speech in the sample set can be input into the wake-up word recognition model. The wake-up word recognition model can output the recognition label of each speech frame of the sample speech by processing each speech frame of the input sample speech.
[0048] S102: Determine a loss value corresponding to each speech frame based on the identification label of each speech frame of the sample speech and the target label, and adjust the wake-up word recognition model based on the loss value corresponding to each speech frame.
[0049] When training the wake-up word recognition model, each speech frame of the sample speech is input into the wake-up word recognition model, which then outputs the corresponding recognition label for each speech frame. Because the target label for each speech frame is known, the loss value for each speech frame can be determined based on the target label and recognition label. The parameters of the wake-up word recognition model are then adjusted based on the loss value determined for each speech frame.
[0050] In an embodiment of the present application, a convergence condition is pre-set. The convergence condition can be that the number of times the recognition label corresponding to each speech frame obtained after the sample speech in the sample set is trained by the wake-up word recognition model is consistent with the target label corresponding to each speech frame is greater than a set number; or the number of iterations of the wake-up word recognition model training reaches the set maximum number of iterations, etc. The specific embodiment of the present application does not impose any restrictions on this.
[0051] In an embodiment of the present application, in order to complete the training of the wake-up word recognition model, after obtaining the identification label of each speech frame output by the wake-up word recognition model, the loss value corresponding to each speech frame can be determined according to the identification label and target label of each speech frame of the sample speech, and the wake-up word recognition model can be adjusted according to the determined loss value corresponding to each speech frame.
[0052] Since, during the training of the wake-up word recognition model in the embodiment of the present application, the target label corresponding to each speech frame in the sample speech is determined according to the pre-saved receptive field length and the length of the wake-up word in the sample speech, and the target label is used to identify whether the complete wake-up word in the sample speech is located within the receptive field of the model when the corresponding speech frame is located, and the current position of the wake-up word in the receptive field of the model, each speech frame of the sample speech is input into the wake-up word recognition model, thereby obtaining the identification label of each speech frame output by the wake-up word recognition model, and determining the loss value corresponding to each speech frame based on the identification label and target label of each speech frame, so that the wake-up word recognition module can recognize the wake-up words at different positions in the receptive field, avoiding dependence on the contextual information of the wake-up word.
[0053] Example 2:
[0054] To ensure the accuracy of the wake-up word recognition model, based on the above embodiment, in the embodiment of the present application, the target label corresponding to each speech frame in the sample speech is determined based on the pre-stored receptive field length and the length of the wake-up word in the sample speech, including:
[0055] Determine the sub-duration corresponding to each label based on the first duration of the wake-up word in the sample speech and the pre-saved receptive field length;
[0056] Determining a target time range corresponding to each label in the sample speech according to the sub-time length and the receptive field length;
[0057] The target label corresponding to each speech frame is determined based on the time range corresponding to each speech frame and the target time range corresponding to each label.
[0058] In order to complete the training of the wake-up word recognition model and ensure the accuracy of the wake-up word recognition model, each sample speech in the sample set needs to be labeled before the sample speech is input into the wake-up word recognition model. In the embodiment of the present application, each speech frame in each sample speech in the sample set is labeled, and each speech frame has a corresponding target label.
[0059] The wake-up word recognized by the trained wake-up word recognition model is known, and the sample speech is also known, so the first duration corresponding to the wake-up word contained in the sample speech can be known.
[0060] The receptive field length of the pre-saved model is also known. Therefore, the sub-duration corresponding to each label can be determined based on the first duration corresponding to the wake-up word in the sample speech and the receptive field length. The sub-duration is used to represent the duration corresponding to each different label. Specifically, in this embodiment of the application, the total duration of the sample speech is not less than the receptive field length.
[0061] After obtaining the sub-duration corresponding to each label, since the receptive field length is known, the target time range corresponding to each label in the sample speech can be determined based on the sub-duration and receptive field length corresponding to each label. This means that the labels corresponding to a target time range in the sample speech are the same. After determining the target time range corresponding to each label in the sample speech, since the time range corresponding to each speech frame in the sample speech is also known, the target label corresponding to each speech frame can be determined based on the time range corresponding to each speech frame and the target time range corresponding to each label.
[0062] In order to determine the sub-duration corresponding to each label, based on the above embodiments, in the embodiment of the present application, the sub-duration corresponding to each label is determined according to the first duration of the wake-up word in the sample speech and the pre-stored receptive field length, including:
[0063] Determining a difference between the receptive field length and the first duration;
[0064] The sub-duration corresponding to each label is determined based on the difference and the pre-saved target number, where the target number is the number of labels that identify the complete wake-up word in the sample speech at different positions in the receptive field.
[0065] In order to be able to determine the sub-duration corresponding to each label, in an embodiment of the present application, the difference between the receptive field length and the first duration can be calculated, and the difference can be understood as the length that the wake-up word moves within the receptive field. After determining the difference, the difference can be divided equally according to the target number of preset labels, thereby determining the sub-duration of each preset label. The target number is the number of preset labels, and the preset label is the label of the complete wake-up word in the sample speech located at different positions in the receptive field. For example, there are 4 labels in the present application, wherein label 1 identifies that the complete wake-up word in the sample speech is located in the receptive field, at which time the wake-up word is located in the front section of the receptive field, label 2 identifies that the complete wake-up word in the sample speech is located in the word receptive field, at which time the wake-up word is located in the middle section of the receptive field, label 3 identifies that the complete wake-up word in the sample speech is located in the receptive field, at which time the wake-up word is located at the end of the receptive field, and label 0 identifies that there is no complete wake-up word in the sample speech located in the receptive field, so the preset labels are label 1, label 2 and label 3, and the target number is 3.
[0066] After determining the sub-duration of each preset label, the start time of the wake-up word in the sample speech and the length of the receptive field are also known, so the target time range corresponding to each label can be determined. The preset label is the label that identifies the complete wake-up word in the sample speech at different positions in the receptive field. For example, the above-mentioned label 1, label 2, and label 3.
[0067] On the basis of the above embodiments, in an embodiment of the present application, determining the target time range corresponding to each label in the sample speech according to the sub-duration and the receptive field length includes:
[0068] Determine the complete time when the complete wake-up word appears based on the start time of the wake-up word sample speech and the first duration;
[0069] According to the complete time and the sub-duration, a target time range corresponding to each label of the wake-up word that already exists in the sample speech and the current position of the wake-up word in the receptive field of the model is determined.
[0070] In this application, because the sample speech is known, the start time of the wake-up word in the sample speech is also known. For example, if the sample speech is "Please turn on the air conditioner", the start time of the wake-up word in the sample speech is the start time corresponding to the word "on". The length of the wake-up word contained in the sample speech, that is, the first duration, is also known. Therefore, the time from the start time of the wake-up word to the first duration is the complete time corresponding to the appearance of the complete wake-up word in the sample speech.
[0071] Based on the complete time and the sub-time length, the time range corresponding to each preset label can be determined. Specifically, the complete time is sequentially increased by a time range corresponding to a sub-time length, that is, the time range corresponding to each preset label. For the time range corresponding to each preset label, the target label corresponding to each speech frame in the sample speech within the time range is identified as the preset label.
[0072] The following is a specific example:
[0073] Figure 2 A schematic diagram of determining the target label of each speech frame in the sample speech provided in the embodiment of the present application is shown as follows: Figure 2 As shown, suppose the start time of the wake-up word "turn on the air conditioner" in a sample speech is start, the wake-up word length is len_x, that is, the first duration of the wake-up word is len_x, and the pre-saved receptive field length is filed. Then, it can be determined that the difference between the receptive field length and the first duration is filed-len_x.
[0074] Assume that the target number of preset tags included in the embodiment of the present application is 3, that is, filed-len_x can be divided into 3 parts, that is, 3 sub-time lengths of equal length are obtained. According to the determined sub-time length, the start time of the wake-up word "turn on the air conditioner" in the sample voice and the total time length of the sample voice, the target time range corresponding to the preset tag in the sample voice can be determined, and each voice frame in the sample voice can be labeled according to the time range corresponding to each voice frame and the target time range corresponding to each tag.
[0075] Specifically, the target label corresponding to the speech frame between start+len_x and start+len_x+(filed-len_x) / 3 in the sample speech can be determined as label 1, indicating that the complete wake-up word appears in the speech frame before the speech frame of the sample speech and is located in the receptive field. At this time, the wake-up word is located in the front section of the receptive field. The target label corresponding to the speech frame between start+len_x+(filed-len_x) / 3 and start+len_x+2*(filed-len_x) / 3 in the sample speech is determined as label 2, indicating that the complete wake-up word appears in the speech frame before the speech frame of the sample speech and is located in the receptive field. At this time, the wake-up word is located in the middle section of the receptive field. The target label corresponding to the speech frame between start+len_x+2*(filed-len_x) / 3 and start+len_x+(filed-len_x) in the sample speech is determined as label 3, indicating that the complete wake-up word appears in the speech frame before the speech frame of the sample speech and is located in the receptive field. At this time, the wake-up word is located in the end of the receptive field.
[0076] In order to facilitate electronic device identification, in the embodiment of the present application, label 1, label 2 and label 3 can also be converted into corresponding one-hot encodings. Specifically, the one-hot encoding corresponding to label 1 can be "0001", the one-hot encoding corresponding to label 2 can be "0010", and the one-hot encoding corresponding to label 3 can be "0100". Of course, there may be cases in the sample speech where there is no complete wake-up word within the receptive field. In this case, the target label corresponding to the corresponding speech frame can be determined as label 0, and the one-hot encoding corresponding to label 0 is "1000". The specific labeling method used to determine the target label corresponding to each speech frame can be arbitrarily selected, as long as a unified label is used during training.
[0077] There are also some speech frames in the sample speech that are located before the complete wake-up word appears or appear outside the receptive field. In order to determine the target label of each speech frame, based on the above embodiments, in this application, the target label corresponding to each speech frame in the sample speech is determined according to the pre-stored receptive field length and the length of the wake-up word in the sample speech, including:
[0078] The target labels corresponding to other speech frames in the sample speech are determined as labels corresponding to the complete wake-up words in the sample speech that are not located in the receptive field.
[0079] After each speech frame corresponding to each preset label is determined based on the above embodiment, the target labels corresponding to other speech frames in the sample speech are the labels corresponding to the sample speech in which no complete wake-up word is located in the receptive field.
[0080] Specifically, in order to avoid dependence on the context of the wake-up word, the target labels in the embodiments of the present application respectively identify: there is no complete wake-up word in the sample speech in the receptive field, the complete wake-up word in the sample speech is within the receptive field of the model and is located in the front part of the receptive field, the complete wake-up word in the sample speech is within the receptive field of the model and is located in the middle part of the receptive field, and the complete wake-up word in the sample speech is within the receptive field of the model and is located in the end of the receptive field.
[0081] Figure 3 A schematic diagram of a target label determination process for a speech frame in a sample speech provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the process includes the following steps:
[0082] S301: Obtain each sample speech x containing a wake-up word from a sample set.
[0083] S302: Mark the start time of the wake-up word in the sample speech x as s, and mark the first duration of the wake-up word in the sample speech x as len_x.
[0084] S303: Based on the receptive field filed of the wake-up word recognition model, the speech frames between s + filed - s - len_x in the sample speech are divided into three equal segments. Starting from the position where the wake-up word is recognized, the labels of the speech frames corresponding to each segment are label 1, label 2, and label 3 respectively. The target label corresponding to the remaining speech frames is determined to be label 0.
[0085] S304: Input each speech frame in the labeled sample speech into the wake-up word recognition model to train the wake-up word recognition model, wherein each speech frame in the sample speech corresponds to a target label.
[0086] Specifically, in the embodiment of the present application, in order to conveniently describe the determination of the target label corresponding to each speech frame in the sample speech, a specific example is used for illustration. Figure 4 A schematic diagram of the receptive field of the wake-up word recognition model provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the receptive field currently contains 5 nodes, and node 5 is the input direction. The current receptive field contains 5 nodes. The wake-up word recognition model can output the final recognition label based on the content contained in the speech frame that has been input into the wake-up word recognition model in the sample speech obtained by the 5 nodes. At this time, the output recognition label is the recognition label corresponding to the speech frame corresponding to node 5.
[0087] For example, a sample speech contains the wake-up word "turn on the air conditioner", and each speech frame in the sample speech corresponds to a target label. Each speech frame of the sample speech is input into the wake-up word recognition model. The receptive field length of the wake-up word recognition model is fixed. Figure 5a A schematic diagram of the wake-up word recognition model provided in the embodiment of the present application outputting the recognition label corresponding to each speech frame, such as Figure 5a As shown, at this time, the complete wake-up word in the sample speech is located in the front part of the receptive field, and the nodes corresponding to the wake-up word "turn on the air conditioner" in the sample speech are 4, 5, and 6. At this time, the speech frame in the sample speech input into the wake-up word recognition model is at the position of node 7. The wake-up word recognition model processes the speech frame in the sample speech that is already within the current receptive field, and outputs the identification label of the speech frame corresponding to node 7, where the output identification label of the speech frame corresponding to node 7 is 0001, indicating that the complete wake-up word has appeared in the receptive field. At this time, the wake-up word is located in the front part of the receptive field. After obtaining the identification label corresponding to the speech frame, for the speech frame, according to the identification label and target label corresponding to the speech frame, the loss value corresponding to the speech frame is determined, and the parameters in the wake-up word time identification model are adjusted according to the loss value corresponding to the speech frame.
[0088] Specifically, in the above Figure 5aIn the figure, "turn on the air conditioner" is just an example of a sample voice. The area composed of multiple circles in the lower half of the figure represents an example of the internal processing process of the wake-up word recognition model. The following figures involve the content and Figure 5a The similarities will not be repeated here. The embodiments of the present application only illustrate the process of determining a specific recognition label based on the voice frame of the input sample voice when the wake-up word is used.
[0089] As we continue to input speech frames from the sample speech into the wake-up word time-recognition model, since the receptive field length is fixed, the complete wake-up word in the sample speech may still be within the receptive field, but it is no longer at the front of the receptive field. Figure 5b This is a schematic diagram of the wake-up word recognition model provided in the embodiment of the present application outputting the recognition label corresponding to each speech frame. The complete wake-up word in the sample speech is located at the front of the receptive field, such as Figure 5b As shown, the speech frame in the sample speech input into the wake-up word recognition model is at the position of node 9. The wake-up word recognition model processes the speech frame in the sample speech that is already within the current receptive field, and outputs the identification label of the speech frame corresponding to node 9, where the identification label of the speech frame corresponding to the output node 9 is 0010, indicating that the complete wake-up word in the sample speech before the speech frame is within the receptive field of the model. At this time, the complete wake-up word is located in the middle of the receptive field. After obtaining the identification label corresponding to the speech frame, for the speech frame, according to the identification label and target label corresponding to the speech frame, the loss value corresponding to the speech frame is determined, and the wake-up word time identification model is adjusted according to the loss value corresponding to the speech frame.
[0090] Similarly, as more speech frames from the sample speech are fed into the wake-up word time-based model, the complete wake-up word from the sample speech may still be within the model's receptive field, but at the end of the receptive field, due to the fixed length of the receptive field. Of course, as more speech frames from the sample speech are fed into the wake-up word time-based model, the complete wake-up word may no longer be within the receptive field.
[0091] In addition, in an embodiment of the present application, in order to ensure that the trained wake-up word recognition model is not affected by the context information of the wake-up word, taking the wake-up word "turn on the air conditioner" as an example, if the content of a sample voice is "turn on the air conditioner", where "turn on" is the context of the wake-up word, the recognition label corresponding to the input voice frame can be output when the context of the wake-up word is not within the receptive field. Figure 6 A schematic diagram of determining a target label of a speech frame in a sample speech provided in an embodiment of the present application, such as Figure 6As shown, "hit" is already outside the receptive field, but the complete wake word "turn on the air conditioner" is within the receptive field and at the end of the receptive field. The corresponding nodes are 1, 2, and 3. Therefore, at this time, the recognition label of the speech frame corresponding to Output node 7 is output, and the output recognition label is 0100.
[0092] To reduce the false wake-up rate of the wake word recognition model, in the embodiment of the present application, when the wake word model is set to be not affected by the context information of the wake word, it is possible to determine whether to trigger the wake word based on the speech frame with the output recognition label of 0100, and no longer determine whether to trigger the wake word based on the speech frames with the output recognition labels of 0001 and 0010.
[0093] Similarly, in order to make the trained wake word recognition model not affected by the context information of the wake word, when the context information of the wake word has not yet appeared within the receptive field, the recognition label corresponding to the presence of the complete wake word can be output, so that there is no need to recognize the content other than the wake word.
[0094] Figure 7 Another schematic diagram for determining the target label of the speech frame in the sample speech provided by the embodiment of the present application is as follows Figure 7 As shown, for the wake word "turn on the air conditioner", the "ba" in the sample speech "turn on the air conditioner, please" is the context information of the wake word. The complete wake word "turn on the air conditioner" has entered the receptive field and is located at the positions corresponding to nodes 5, 6, and 7. At this time, the recognition label of the speech frame corresponding to Output node 7 is output, and the recognition label of the speech frame corresponding to node 7 output is 0001, indicating that the speech frame of the sample speech currently input to the wake word recognition model already contains the complete wake word, that is, the complete wake word is already within the receptive field and at the front end of the receptive field. To reduce the false wake-up rate of the wake word recognition model, in the embodiment of the present application, when the wake word recognition model is set to be not affected by the context information of the wake word, it is possible to determine whether to trigger the wake word based on the node with the recognition label of 0001, and no longer determine whether to trigger the wake word based on the nodes with the output recognition labels of 0010 and 0100. At this time, the wake word is at the front end of the receptive field, and the context information of the wake word is not within the receptive field and will not affect the wake word recognition.
[0095] However, in the above embodiments, in order to ensure that the trained wake-up word recognition model is not affected by the contextual information of the wake-up word, the delay of the wake-up word recognition model is increased. For example, the total duration of the input voice is 1 second, and the duration of the wake-up word "turn on the air conditioner" is 0.4 seconds, then the delay at this time is 0.6 seconds. In order to optimize the delay of the wake-up word recognition model, in the embodiment of the present application, false wake-ups can be limited by raising the threshold. For example, the threshold of the unique hot code 0001 is set higher. For the convenience of description, the threshold corresponding to the unique hot code 0001 can be expressed as fast_th, that is, the threshold corresponding to the label that identifies the complete wake-up word at the front of the receptive field is expressed as fast_th. In the embodiment of the present application, fast_th = 0.99, that is, when the unique hot code corresponding to a certain speech frame is 0001 and the probability value exceeds 0.99, wake-up can be achieved, because the confidence of the wake-up is very high at this time, and the delay of the wake-up word recognition model is greatly reduced at this time.
[0096] Similarly, you can also set the threshold of the unique hot encoding 0010 to 0.95, that is, the threshold corresponding to the label that identifies the complete wake-up word in the middle of the receptive field is expressed as normal_th. For the convenience of description, it can be expressed as normal_th = 0.95. The confidence required for awakening is reduced, and the latency of the wake-up word recognition model is also higher. You can also set the threshold of the unique hot encoding 0100 to 0.90, that is, the threshold corresponding to the label that identifies the complete wake-up word in the end of the receptive field is expressed as slow_th. For the convenience of description, it can be expressed as slow_th = 0.90. The higher the threshold, the lower the false awakening rate, and the wake-up word recognition model is more difficult to awaken.
[0097] By setting the thresholds corresponding to the labels of the wake-up words at different positions in the receptive field, the dynamic delayed wake-up of the wake-up word recognition model is achieved, while effectively reducing the false wake-up rate. The receiver operating characteristic (ROC) curve is generally used to represent the response to the same signal stimulus. Figure 8 The ROC curve of the wake-up word recognition model provided in the embodiment of the present application is as follows: Figure 8 As shown, the lower the false recognition rate, that is, the higher the recognition rate, the more false wake-ups per hour.
[0098] Example 3:
[0099] In order to reduce the false awakening rate of wake-up word recognition and avoid excessive reliance on the context information of the wake-up word during the wake-up word recognition process, based on the above embodiments, an embodiment of the present application provides a wake-up word recognition method. Figure 9 A process diagram of a wake-up word recognition method provided in an embodiment of the present application includes the following steps:
[0100] S901: Receive target speech to be recognized.
[0101] The wake-up word recognition method provided in the embodiments of the present application is applied to electronic devices, which may be mobile terminals, PCs, and smart home appliances that support voice functions, such as air conditioners, televisions, and other devices.
[0102] After the wake-up word recognition model training is completed, the wake-up word recognition can be performed. In the embodiment of the present application, the wake-up word recognition model is pre-trained. When a function contained in the electronic device needs to be awakened by voice, the user of the electronic device can issue a voice command to the electronic device, where the voice command can be a short command such as "turn on the air conditioner", "turn on the TV", or "open the curtains". The electronic device can receive the target voice input by the user through a microphone or other audio receiving hardware.
[0103] S902: Input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain the probability value of the label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than the threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it.
[0104] After receiving the target speech to be recognized, each speech frame in the target speech can be obtained, and each speech frame in the target speech can be input into the pre-trained wake-up word recognition model in turn, and the label corresponding to each speech frame in the target speech output by the wake-up word recognition model can be obtained in turn. The wake-up word recognition model also outputs the probability of the speech frame corresponding to the label for each speech frame. In an embodiment of the present application, for each speech frame of the target speech, it can be determined whether the probability value of the speech frame corresponding to the label is greater than the threshold value corresponding to the label. If the probability value of the speech frame corresponding to the label is greater than the threshold value corresponding to the label, the wake-up word recognition model uses the label as the target label and outputs the target label.
[0105] S903: If the target tag indicates that the speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word, a wake-up instruction is output.
[0106] After obtaining the target label output by the wake-up word recognition model, in order to determine whether to output the wake-up instruction, it is necessary to judge whether the target label identifies that the speech frame in the target speech input into the wake-up word recognition model already contains the complete wake-up word. If the target label identifies that the speech frame in the target speech input into the wake-up word recognition model already contains the complete wake-up word, then the wake-up instruction is output.
[0107] In an embodiment of the present application, the wake-up word recognition model pre-trained in the wake-up word recognition method is the wake-up word recognition model trained through the above-mentioned embodiments.
[0108] Example 4:
[0109] In an embodiment of the present application, the sample speech is input into the wake-up word recognition model, the target label corresponding to each speech frame output by the wake-up word recognition model is obtained, and the probability value corresponding to each target label is determined, and the probability value is compared with the pre-set threshold in turn. Once the probability value reaches the set threshold, it is considered that the wake-up word exists in the target speech, and the wake-up word is recognized.
[0110] The following describes the process of the wake-up word recognition model recognizing the target speech with reference to a specific embodiment. Figure 10 The flowchart of the wake-up word recognition model provided in the embodiment of the present application is as follows. When using the wake-up word recognition model, the thresholds corresponding to different heat codes can be set according to actual needs, such as Figure 10 As shown, the process specifically includes the following steps:
[0111] S1001: Input speech frames of target speech.
[0112] S1002: For each speech frame that has been input into the receptive field of the wake-up word recognition model, output the label corresponding to the currently input speech frame, that is, the probability value corresponding to the label. If the label is the label corresponding to the one-hot encoding 0001, and the probability value is greater than the threshold fast_th corresponding to the one-hot encoding 0001, execute S1005; if not, execute S1003.
[0113] S1003: If the label is the label corresponding to the one-hot encoding 0010, and the probability value is greater than the threshold normal_th corresponding to the one-hot encoding 0010, then execute S1005; if not, then execute S1004.
[0114] S1004: If the label is the label corresponding to the one-hot encoding 0100, and the probability value is greater than the threshold slow_th corresponding to the one-hot encoding 0100, then execute S1005; if not, then execute S1006.
[0115] S1005: Triggering the wake-up word.
[0116] S1006: If the wake-up word cannot be triggered, obtain the probability value of the next speech frame output by the wake-up word recognition model.
[0117] Example 5:
[0118] Figure 11This is a schematic diagram of the structure of the wake-up word recognition model training device provided in the embodiment of the present application, as shown in FIG. Figure 11 As shown, the device includes:
[0119] Acquisition module 1101 is used to determine, for each sample speech in the sample set, a target label corresponding to each speech frame in the sample speech based on the pre-stored receptive field length and the length of the wake-up word in the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model at the time of the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model; each speech frame of the sample speech is input into the wake-up word recognition model to obtain the identification label of each speech frame output by the wake-up word recognition model;
[0120] The training module 1102 is used to determine the loss value corresponding to each speech frame based on the identification label of each speech frame of the sample speech and the target label, and adjust the wake-up word recognition model according to the loss value corresponding to each speech frame.
[0121] In a possible implementation, the acquisition module 1101 is further used to determine the sub-duration corresponding to each label based on the first duration of the wake-up word in the sample speech and the pre-saved receptive field length; determine the target time range corresponding to each label in the sample speech based on the sub-duration and the receptive field length; and determine the target label corresponding to each speech frame based on the time range corresponding to each speech frame and the target time range corresponding to each label.
[0122] In one possible implementation, the acquisition module 1101 is specifically used to determine the difference between the receptive field length and the first duration; and determine the sub-duration corresponding to each label based on the difference and a pre-saved target number, wherein the target number is the number of labels that identify the complete wake-up word in the sample speech at different positions in the receptive field.
[0123] In a possible implementation, the acquisition module 1101 is further specifically used to determine the complete time when the complete wake-up word appears based on the start time of the wake-up word in the sample speech and the first duration; based on the complete time and the sub-duration, determine the target time range corresponding to each label of the wake-up word that already exists in the sample speech and the current position of the existing wake-up word in the receptive field of the model.
[0124] In a possible implementation, the acquisition module 1101 is further configured to determine the target labels corresponding to other speech frames in the sample speech as labels corresponding to the sample speech in which no complete wake-up word exists in the receptive field.
[0125] Example 6:
[0126] Figure 12 This is a schematic diagram of the structure of the wake-up word recognition device provided in an embodiment of the present application, as shown in FIG. Figure 12 As shown, the device includes:
[0127] Receiving module 1201, for receiving target speech to be recognized;
[0128] Determination module 1202 is configured to input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain a probability value of a label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than a threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it;
[0129] The recognition module 1203 is configured to output a wake-up instruction if the target tag indicates that the speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word.
[0130] Example 7:
[0131] Based on the above embodiments, some embodiments of the present application further provide an electronic device, Figure 13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 13 As shown, it includes: a processor 1301, a communication interface 1302, a memory 1303 and a communication bus 1304, wherein the processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 1304;
[0132] The memory 1303 stores a computer program. When the program is executed by the processor 1301, the processor 1301 performs the following steps:
[0133] For each sample speech in the sample set, the target label corresponding to each speech frame in the sample speech is determined based on the pre-saved receptive field length and the length of the wake-up word in the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model at the time of the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model; each speech frame of the sample speech is input into the wake-up word recognition model, and the identification label of each speech frame output by the wake-up word recognition model is obtained;
[0134] According to the identification label of each speech frame of the sample speech and the target label, the loss value corresponding to each speech frame is determined, and the wake-up word recognition model is adjusted according to the loss value corresponding to each speech frame.
[0135] In a possible implementation, determining the target label corresponding to each speech frame in the sample speech based on the pre-stored receptive field length and the length of the wake-up word in the sample speech includes:
[0136] Determine the sub-duration corresponding to each label based on the first duration of the wake-up word in the sample speech and the pre-saved receptive field length;
[0137] Determining a target time range corresponding to each label in the sample speech according to the sub-time length and the receptive field length;
[0138] The target label corresponding to each speech frame is determined based on the time range corresponding to each speech frame and the target time range corresponding to each label.
[0139] In a possible implementation, determining the sub-duration corresponding to each label based on the first duration of the wake-up word in the sample speech and the pre-stored receptive field length includes:
[0140] Determining a difference between the receptive field length and the first duration;
[0141] The sub-duration corresponding to each label is determined based on the difference and the pre-saved target number, where the target number is the number of labels that identify the complete wake-up word in the sample speech at different positions in the receptive field.
[0142] In a possible implementation, determining the target time range corresponding to each label in the sample speech according to the sub-duration and the receptive field length includes:
[0143] Determine the complete time when the complete wake-up word appears based on the start time of the wake-up word in the sample speech and the first duration;
[0144] According to the complete time and the sub-duration, a target time range corresponding to each label of the wake-up word that already exists in the sample speech and the current position of the wake-up word in the receptive field of the model is determined.
[0145] In a possible implementation, determining the target label corresponding to each speech frame in the sample speech based on the pre-stored receptive field length and the length of the wake-up word in the sample speech includes:
[0146] The target labels corresponding to other speech frames in the sample speech are determined as labels corresponding to the complete wake-up words in the sample speech that are not located in the receptive field.
[0147] Since the principle of solving the problem by the above electronic device is similar to the wake-up word recognition model training method, the implementation of the above electronic device can refer to the above embodiment, and the repeated parts will not be repeated.
[0148] The communication bus mentioned in the above-mentioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but this does not mean that there is only one bus or one type of bus. The communication interface 1302 is used for communication between the above-mentioned electronic device and other devices. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory can also be at least one storage device located away from the aforementioned processor. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processing (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0149] Example 8:
[0150] Based on the above embodiments, the present application further provides an electronic device, Figure 14 A schematic diagram of another electronic device structure provided in an embodiment of the present application is shown in FIG. Figure 14 As shown, it includes: a processor 1401, a communication interface 1402, a memory 1403 and a communication bus 1404, wherein the processor 1401, the communication interface 1402, and the memory 1403 communicate with each other through the communication bus 1404;
[0151] The memory 1403 stores a computer program. When the program is executed by the processor 1401, the processor 1401 performs the following steps:
[0152] receiving a target speech to be recognized;
[0153] Input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain the probability value of the label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than the threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it;
[0154] If the target tag indicates that the speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word, a wake-up instruction is output.
[0155] Since the principle of solving the problem by the above electronic device is similar to the wake-up word recognition method, the implementation of the above electronic device can refer to the above embodiment, and the repeated parts will not be repeated.
[0156] The communication bus mentioned in the above-mentioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but this does not mean that there is only one bus or one type of bus. The communication interface 1402 is used for communication between the above-mentioned electronic device and other devices. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory can also be at least one storage device located away from the aforementioned processor. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processing (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0157] Example 9:
[0158] Based on the above embodiments, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by a processor. When the program is executed on the processor, the processor implements the following steps:
[0159] For each sample speech in the sample set, the target label corresponding to each speech frame in the sample speech is determined based on the pre-saved receptive field length and the length of the wake-up word in the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model at the time of the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model; each speech frame of the sample speech is input into the wake-up word recognition model, and the identification label of each speech frame output by the wake-up word recognition model is obtained;
[0160] According to the identification label of each speech frame of the sample speech and the target label, the loss value corresponding to each speech frame is determined, and the wake-up word recognition model is adjusted according to the loss value corresponding to each speech frame.
[0161] In a possible implementation, determining the target label corresponding to each speech frame in the sample speech based on the pre-stored receptive field length and the length of the wake-up word in the sample speech includes:
[0162] Determine the sub-duration corresponding to each label based on the first duration of the wake-up word in the sample speech and the pre-saved receptive field length;
[0163] Determining a target time range corresponding to each label in the sample speech according to the sub-time length and the receptive field length;
[0164] The target label corresponding to each speech frame is determined based on the time range corresponding to each speech frame and the target time range corresponding to each label.
[0165] In a possible implementation, determining the sub-duration corresponding to each label based on the first duration of the wake-up word in the sample speech and the pre-stored receptive field length includes:
[0166] Determining a difference between the receptive field length and the first duration;
[0167] The sub-duration corresponding to each label is determined based on the difference and the pre-saved target number, where the target number is the number of labels that identify the complete wake-up word in the sample speech at different positions in the receptive field.
[0168] In a possible implementation, determining the target time range corresponding to each label in the sample speech according to the sub-duration and the receptive field length includes:
[0169] Determine the complete time when the complete wake-up word appears based on the start time of the wake-up word in the sample speech and the first duration;
[0170] According to the complete time and the sub-duration, a target time range corresponding to each label of the wake-up word that already exists in the sample speech and the current position of the wake-up word in the receptive field of the model is determined.
[0171] In a possible implementation, determining the target label corresponding to each speech frame in the sample speech based on the pre-stored receptive field length and the length of the wake-up word in the sample speech includes:
[0172] The target labels corresponding to other speech frames in the sample speech are determined as labels corresponding to the complete wake-up words in the sample speech that are not located in the receptive field.
[0173] Since the principle of solving the problem provided by the computer-readable medium is similar to the wake-up word recognition model training method, after the processor executes the computer program in the computer-readable medium, the steps implemented can be referred to the above embodiment, and the repeated parts will not be repeated.
[0174] Example 10:
[0175] Based on the above embodiments, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by a processor. When the program is executed on the processor, the processor implements the following steps:
[0176] receiving a target speech to be recognized;
[0177] Input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain the probability value of the label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than the threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it;
[0178] If the target tag indicates that the speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word, a wake-up instruction is output.
[0179] Since the principle of solving the problem provided by the computer-readable medium is similar to that of the wake-up word recognition method, after the processor executes the computer program in the computer-readable medium, the steps implemented can refer to the above embodiment, and the repeated parts will not be repeated.
[0180] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0181] As for the system / device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0182] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0183] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0185] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0186] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A wake-up word recognition method, characterized in that: The method comprises: receiving a target speech to be recognized; Input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain the probability value of the label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than the threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it; If the target tag indicates that the speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word, outputting a wake-up instruction; The training process of the wake-up word recognition model includes: For each sample speech in the sample set, the target label corresponding to each speech frame in the sample speech is determined based on the pre-saved receptive field length and the length of the wake-up word in the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model at the time of the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model; each speech frame of the sample speech is input into the wake-up word recognition model, and the identification label of each speech frame output by the wake-up word recognition model is obtained; According to the identification label of each speech frame of the sample speech and the target label, the loss value corresponding to each speech frame is determined, and the wake-up word recognition model is adjusted according to the loss value corresponding to each speech frame.
2. The method according to claim 1, wherein The step of determining the target label corresponding to each speech frame in the sample speech based on the pre-stored receptive field length and the length of the wake-up word in the sample speech includes: Determine the sub-duration corresponding to each label based on the first duration of the wake-up word in the sample speech and the pre-saved receptive field length; Determining a target time range corresponding to each label in the sample speech according to the sub-time length and the receptive field length; The target label corresponding to each speech frame is determined based on the time range corresponding to each speech frame and the target time range corresponding to each label.
3. The method according to claim 2, wherein Determining the sub-duration corresponding to each label according to the first duration of the wake-up word in the sample speech and the pre-stored receptive field length includes: Determining a difference between the receptive field length and the first duration; The sub-duration corresponding to each label is determined based on the difference and the pre-saved target number, where the target number is the number of labels that identify the complete wake-up word in the sample speech at different positions in the receptive field.
4. The method according to claim 2, wherein Determining the target time range corresponding to each label in the sample speech according to the sub-duration and the receptive field length includes: Determine the complete time when the complete wake-up word appears based on the start time of the wake-up word in the sample speech and the first duration; According to the complete time and the sub-duration, a target time range corresponding to each label of the wake-up word that already exists in the sample speech and the current position of the wake-up word in the receptive field of the model is determined.
5. The method according to claim 4, wherein The step of determining the target label corresponding to each speech frame in the sample speech based on the pre-stored receptive field length and the length of the wake-up word in the sample speech includes: The target labels corresponding to other speech frames in the sample speech are determined as labels corresponding to the complete wake-up words in the sample speech that are not located in the receptive field.
6. A wake-up word recognition device, characterized in that: The device comprises: A receiving module, configured to receive a target speech to be recognized; A determination module is configured to input each speech frame in the target speech into a pre-trained wake-up word recognition model, and obtain a probability value of a label corresponding to each speech frame in the target speech output by the wake-up word recognition model; for the label of each speech frame of the target speech, if the probability value corresponding to the label is greater than a threshold corresponding to the label, the wake-up word recognition model determines the label as the target label corresponding to the speech frame and outputs it; a recognition module configured to output a wake-up instruction if the target tag indicates that a speech frame in the target speech input into the wake-up word recognition model already contains a complete wake-up word; An acquisition module is used to determine, for each sample speech in the sample set, a target label corresponding to each speech frame in the sample speech based on the pre-saved receptive field length and the length of the wake-up word in the sample speech. The target label is used to identify whether the complete wake-up word in the sample speech is within the receptive field of the model at the time of the corresponding speech frame, and the current position of the wake-up word in the receptive field of the model; each speech frame of the sample speech is input into the wake-up word recognition model to obtain the identification label of each speech frame output by the wake-up word recognition model; The training module is used to determine the loss value corresponding to each speech frame based on the identification label of each speech frame of the sample speech and the target label, and adjust the wake-up word recognition model according to the loss value corresponding to each speech frame.
7. An electronic device, characterized in that: The electronic device includes at least a processor and a memory, and the processor is configured to implement the steps of the wake-up word recognition method according to any one of claims 1 to 5 when executing a computer program stored in the memory.
8. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the steps of the wake-up word recognition method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Wake-up model generation method and intelligent terminal wake-up method and device
CN110970016A
Voice instruction processing method and device, equipment and storage medium
CN112599127A