Recognition method, apparatus and electronic device
By using the enhanced feature information generated by the second speech recognition network to adjust the parameters of the first speech recognition network, the problem of decreased accuracy after quantization is solved, and the effect of reducing the amount of calculation and storage while maintaining the accuracy is achieved.
Patent Information
- Application Number
- CN202210362734.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-04-07
AI Technical Summary
The existing speech recognition network suffers from a decrease in accuracy after quantization, especially when the amount of computation and storage is reduced, and the accuracy is difficult to maintain.
By inputting speech data into the first speech recognition network, using the enhanced feature information generated by the second speech recognition network to adjust the parameters of the first speech recognition network, and using the error back propagation algorithm to update the network loss value, the processing result of the first speech recognition network is close to the processing result of the second speech recognition network.
While reducing the amount of computation and storage, the accuracy of the speech recognition network is improved, making it more accurate than before training.
Smart Images

Figure CN114913846B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an identification method, device, and electronic device. Background Art
[0002] With the development of computers, they can assist humans in achieving more and more functions. Among them, speech recognition technology is also developing and maturing.
[0003] Speech recognition is a broad interdisciplinary subject that is closely related to acoustics, phonetics, linguistics, information theory, pattern recognition theory, and neurobiology. Speech recognition technology is gradually becoming a key technology in computer information processing. Summary of the Invention
[0004] This disclosure section is provided to briefly introduce concepts that will be described in detail in the detailed description section below. This disclosure section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, an embodiment of the present disclosure provides a recognition method, which includes: inputting speech data into a first speech recognition network to obtain first feature information generated by the first speech recognition network, wherein the first speech recognition network is obtained by quantizing a second speech recognition network; generating a network loss value of the first speech recognition network based on the first feature information and enhanced feature information, wherein the enhanced feature information is obtained based on the second speech recognition network processing the speech data; adjusting the parameters of the first speech recognition network according to the network loss value, wherein the first speech recognition network that meets the preset training completion conditions is used to recognize speech.
[0006] In a second aspect, an embodiment of the present disclosure provides a recognition device, comprising: a first generation unit, for inputting speech data into a first speech recognition network to obtain first feature information generated by the first speech recognition network, wherein the first speech recognition network is obtained by quantizing a second speech recognition network; a second generation unit, for generating a network loss value of the first speech recognition network based on the first feature information and enhanced feature information, wherein the enhanced feature information is obtained based on the second speech recognition network processing the speech data; an adjustment unit, for adjusting parameters of the first speech recognition network according to the network loss value, wherein the first speech recognition network that meets the preset training completion conditions is used to recognize speech.
[0007] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: at least one processor; and a storage device for storing at least one computer program, wherein when the at least one computer program is executed by the at least one processor, the at least one processor implements the identification method as described in the first aspect.
[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the identification method described in the first aspect.
[0009] The recognition method, device and electronic device provided by the embodiments of the present disclosure can improve the accuracy of the first speech recognition network obtained by quantization. Specifically, the second speech recognition network is used to process speech data to obtain enhanced feature information; the first speech recognition network is used to process the same segment of speech data to obtain first feature information; and the enhanced feature information can indicate the feature information obtained by the second speech recognition network processing the speech data, and the first feature information is compared and calculated with the enhanced feature information to obtain the network loss value. The network loss value is used to update the first speech recognition network, which can improve the processing results of the first speech recognition network in the direction of approaching the processing results of the second speech recognition network. In this way, the first speech recognition network can reduce the amount of calculation and storage compared to the second speech recognition network, while the accuracy rate can not be significantly reduced, that is, the accuracy of the first speech recognition network after training is improved compared to that before training. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0011] Figure 1 is a flow chart of an embodiment of an identification method according to the present disclosure;
[0012] Figure 2 is a flowchart according to an exemplary implementation of the present disclosure;
[0013] Figure 3 is a schematic diagram of the relationship between the speech recognition network according to the present disclosure;
[0014] Figure 4A 、 Figure 4B and Figure 4C is a schematic diagram according to an exemplary implementation of the present disclosure;
[0015] Figure 5 is a schematic structural diagram of an embodiment of an identification device according to the present disclosure;
[0016] Figure 6 is an exemplary system architecture in which the identification method of an embodiment of the present disclosure may be applied;
[0017] Figure 7 It is a schematic diagram of the basic structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0019] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0020] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0022] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0023] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0025] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0026] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0027] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0029] Please refer to Figure 1 , which shows the process of an embodiment of the identification method according to the present disclosure. Figure 1 The identification method shown includes the following steps:
[0030] Step 101: Input voice data into a first voice recognition network to obtain first feature information generated by the first voice recognition network.
[0031] In this embodiment, the above-mentioned voice data can be understood as training samples.
[0032] Here, the first speech recognition network is obtained by quantizing the second speech recognition network. The first speech recognition network and the second speech recognition network are both networks used for speech recognition. Here, the first speech recognition network can be an untrained or incompletely trained speech recognition network.
[0033] Model quantization can be understood as a model compression technique that converts floating-point storage (operations) to integer storage (operations). For example, a weight that originally required a 32-bit floating-point representation can be represented using only an 8-bit integer after quantization, resulting in a nearly 4x network speedup. Model quantization can include both weight and activation quantization.
[0034] In this embodiment, the network structures of the first speech recognition network and the second speech recognition network may be substantially consistent. Substantially consistent can be understood as the same network layer settings, but the parameters may be different. The specific structures of the first speech recognition network and the second speech recognition network are not limited here. As an example, the network structure of the first speech recognition network may include but is not limited to at least one of the following: Long short-term memory model (LSTM), gated recurrent unit model (GRU), and feedforward sequential memory neural network (FSMN).
[0035] In this embodiment, the first speech recognition network extracts features from the speech data to obtain first feature information.
[0036] Step 102: Generate a network loss value of the first speech recognition network based on the first feature information and the enhanced feature information.
[0037] In this embodiment, the enhanced feature information can be obtained by processing the speech data based on the second speech recognition network.
[0038] As an example, the method of obtaining enhanced feature information can refer to Figure 2 The process shown.
[0039] Here, the network loss value of the first speech recognition network can be used to indicate the degree of difference in accuracy between the first speech recognition network and the second speech recognition network.
[0040] Step 103: Adjust the parameters of the first speech recognition network according to the network loss value.
[0041] In this embodiment, the network loss value (loss) of the first speech recognition network can be used to adjust the network parameters of the first speech recognition network. As an example, the error back propagation (BP) algorithm can be used to adjust the size of the parameters in the first speech recognition network during the training process, so that the reconstruction error loss of the first speech recognition network becomes smaller and smaller. Specifically, the parameters of the first speech recognition network are updated by backpropagating the error loss information, so that the error loss converges. The backpropagation algorithm is a backpropagation movement dominated by error loss to obtain the optimal parameters of the neural network model, such as the weight matrix.
[0042] Here, a first speech recognition network that meets a preset training completion condition is used to recognize speech. The training completion condition is used to indicate a stop condition for the first speech recognition network. As an example, the training completion condition may include, but is not limited to, at least one of the following: a network loss value is less than a preset loss value threshold, and the number of iterations is not less than a preset number threshold.
[0043] Here, step 101, step 102 and step 103 may be executed multiple times as a loop segment, that is, the parameters of the first speech recognition network may be updated multiple times.
[0044] It should be noted that the recognition method provided by this embodiment can improve the accuracy of the first speech recognition network obtained by quantization. Specifically, the second speech recognition network is used to process speech data to obtain enhanced feature information; the first speech recognition network is used to process the same segment of speech data to obtain first feature information; and the enhanced feature information can indicate the feature information obtained by the second speech recognition network processing the speech data, and the first feature information is compared with the enhanced feature information to obtain the network loss value. The network loss value is used to update the first speech recognition network, which can improve the processing results of the first speech recognition network in the direction of approaching the processing results of the second speech recognition network. In this way, the first speech recognition network can reduce the amount of calculation and storage compared to the second speech recognition network, while the accuracy rate can not be significantly reduced, that is, the accuracy of the first speech recognition network after training is improved compared to that before training.
[0045] In some embodiments, the enhanced feature information can be generated through a first step.
[0046] Please refer to Figure 2 , Figure 2 This is an exemplary process of the first step, which may include step 201 and step 202.
[0047] Step 201: Input voice data into a second voice recognition network to obtain second feature information generated by the second voice recognition network.
[0048] Here, the accuracy of the second speech recognition network is higher than the accuracy of the first speech recognition network.
[0049] Step 202: Generate enhanced feature information of the second feature information based on the high-frequency component of the second feature information.
[0050] Here, the second characteristic information may indicate the aforementioned voice data, where the voice data includes a high-frequency component and a low-frequency component. The basis for determining the high-frequency component and the low-frequency component may be set according to the actual application scenario. Optionally, a portion greater than or equal to a preset frequency threshold may be considered the high-frequency component, and a portion less than the preset frequency threshold may be considered the low-frequency component.
[0051] It should be noted that the second speech recognition network is used to process speech data to obtain the second feature information; the first speech recognition network is used to process the same speech data to obtain the first feature information; the second feature information is then enhanced to highlight its characteristics, and the first feature information is compared with the enhanced feature information to obtain a network loss value. Using the network loss value to update the first speech recognition network can improve the processing results of the first speech recognition network to be closer to the processing results of the second speech recognition network. In this way, the first speech recognition network can reduce the computational complexity and storage requirements compared to the second speech recognition network without reducing accuracy.
[0052] In some embodiments, step 202 includes: transforming the second feature information to obtain transformed information corresponding to the second feature information; determining a predefined initial high-frequency component from the transformed information; and performing an inverse transformation corresponding to the transformation on the initial high-frequency component to obtain the high-frequency component.
[0053] Here, the role of the above transformation is to separate the initial high-frequency information and the initial low-frequency information from the second feature information.
[0054] As an example, the transformed information may include an initial high-frequency component and an initial low-frequency component. The initial low-frequency component may then be reset to zero to obtain an initial high-frequency component of the same scale as the transformed information. The initial high-frequency component may then be inversely transformed to obtain a high-frequency component of the same scale as the second feature information.
[0055] In some embodiments, transforming the second feature information to obtain transformed information corresponding to the second feature information includes: performing a wavelet transform on the second feature information to obtain the transformed information.
[0056] As an example, the second feature information may be subjected to wavelet transform with a translation amount of 1.
[0057] It should be noted that the use of wavelet transform can take advantage of its strong correlation with speech characteristics. Furthermore, if the wavelet transform's shift is 1, this can be aligned with the quantized nature of the first speech recognition network, making the transformed information obtained through the wavelet transform suitable for application to the first speech recognition network, thereby improving the training speed and accuracy of the first speech recognition network.
[0058] In some embodiments, the step 202 includes: generating the enhanced feature information according to the high-frequency component and the second feature information.
[0059] Here, the specific manner of the high-frequency component and the second characteristic information can be set according to actual conditions.
[0060] Here, the enhanced feature information is combined with the high-frequency component and the second feature information, and the high-frequency component can be enhanced while retaining the low-frequency component. Thus, the feature of the second feature information can be enhanced to obtain the enhanced feature information of the second feature information.
[0061] In some embodiments, the second speech recognition network includes a preset number of second feature extraction layers; and generating the enhanced feature information based on the high-frequency component and the second feature information includes: normalizing the second feature information output by each second feature extraction layer to obtain normalized second feature information corresponding to the second feature extraction layer; normalizing the high-frequency component of each second feature information to obtain a normalized high-frequency component corresponding to the second feature extraction layer; and determining the enhanced feature information corresponding to the second feature extraction layer based on the normalized high-frequency component corresponding to the same feature extraction layer and the normalized second feature information.
[0062] As an example, the sum of the normalized high-frequency component corresponding to the same feature extraction layer and the normalized second feature information can be determined as the enhanced feature information corresponding to the second feature extraction layer.
[0063] Here, the high-frequency component and the second feature information may have different information densities. Combining two information with significantly different information densities may suppress the lower-density information, making it less effective in the combined information. Normalizing the high-frequency component and the second feature information separately can prevent the high-frequency component from being suppressed due to the second feature information having a significantly higher information density than the high-frequency component.
[0064] In some embodiments, the first speech recognition network includes a preset number of first feature extraction layers, and the second speech recognition network includes a preset number of second feature extraction layers, and the first feature extraction layers and the second feature extraction layers correspond one to one; the first feature information output by the first feature extraction layer has a corresponding relationship with the second feature information output by the corresponding second feature extraction layer.
[0065] As an example, see Figure 3 , Figure 3 An exemplary schematic diagram of a first speech recognition network and a second speech recognition network is shown.
[0066] like Figure 3 As shown, the first speech recognition network includes network layer 3011, network layer 3012, network layer 3013, and network layer 3014. The ellipsis in the first speech recognition network may indicate that some network layers are omitted. The second speech recognition network includes network layer 3021, network layer 3022, network layer 3023, and network layer 3024. The ellipsis in the second speech recognition network may indicate that some network layers are omitted. Figure 3 The dotted lines between the network layers in FIG. 30 indicate the corresponding relationship between the network layers. For example, network layer 3011 corresponds to network layer 3021 , network layer 3012 corresponds to network layer 3022 , network layer 3013 corresponds to network layer 3023 , and network layer 3014 corresponds to network layer 3024 .
[0067] like Figure 3 As shown, the voice data is imported into the first voice recognition network, and the network layer 3021, network layer 3022, network layer 3023 and network layer 3024 can all output the first feature information; the voice data is imported into the second voice recognition network, and the network layer 3021, network layer 3022, network layer 3023 and network layer 3024 can all output the second feature information.
[0068] In some embodiments, step 102 may include: determining the layer loss value of the first feature extraction layer based on the first feature information of the first feature extraction layer and the enhanced feature information corresponding to the second feature extraction layer corresponding to the first feature extraction layer; and determining the network loss value of the first speech recognition network based on the layer loss value of the first feature extraction layer in the first speech recognition network.
[0069] As an example, see Figure 3 The first feature information output by network layer 3011 can be compared with the second feature information output by network layer 3021, and the layer loss value of network layer 3011 can be obtained. The first feature information output by network layer 3012 can be compared with the second feature information output by network layer 3022, and the layer loss value of network layer 3012 can be obtained. The first feature information output by network layer 3013 can be compared with the second feature information output by network layer 3023, and the layer loss value of network layer 3013 can be obtained. The first feature information output by network layer 3014 can be compared with the second feature information output by network layer 3024, and the layer loss value of network layer 3014 can be obtained. Then, based on the layer loss values of each layer of the first speech recognition network, the network loss value of the first speech recognition network can be determined.
[0070] It should be noted that the network loss value is determined based on the loss value of each layer. The output of each layer can be referred to to adjust the network parameters of the first speech recognition network so that the parameters of each layer after adjustment are closer to the unquantized model, thereby restoring the accuracy of the quantized model.
[0071] Optionally, the specific method of comparing the two feature information to determine the layer loss value can be determined according to the actual application scenario and is not limited here.
[0072] In some embodiments, step 102 may include: obtaining at least two types of sub-network information, wherein the sub-network information indicates a first feature extraction layer included in the sub-network; for the sub-network indicated by the at least two types of sub-network information, determining a layer loss value of the first feature extraction layer included in the sub-network, and determining a sub-network loss value of the sub-network based on the layer loss value of the first feature extraction layer included in the sub-network; and determining a network loss value of the first speech recognition network based on the sub-network loss values of the at least two sub-networks.
[0073] Optionally, the subnetworks indicated by the at least two subnetwork information may include a first subnetwork and a second subnetwork. The first subnetwork has four layers, for example, including the second layer, the fourth layer, the sixth layer, and the eighth layer. The second subnetwork has two layers, for example, including the fourth layer and the eighth layer.
[0074] Optionally, the number of layers in the subnetwork may be the same as the number of layers in the first speech recognition network. As an example, the subnetworks indicated by the at least two subnetwork information may include a first subnetwork, a second subnetwork, and a third subnetwork. The first subnetwork may have four layers, for example, including the second, fourth, sixth, and eighth layers. The second subnetwork may have two layers, for example, including the fourth and eighth layers. The third subnetwork may have eight layers, i.e., all the layers of the first speech recognition network.
[0075] As an example, see Figure 4A 、 Figure 4B and Figure 4C , Figure 4A shows a first speech recognition network, Figure 4B The first subnetwork is shown, Figure 4C The second sub-network is shown. The first sub-network may, for example, include the second, fourth, sixth, and eighth layers of the first speech recognition network; Figure 4B The X in the first sub-network is input into the first sub-network, and the result output by the first sub-network (e.g. Figure 4BY2) in can be used as the recognition result; the layer loss value of the second layer can be calculated, the layer loss value of the fourth layer can be calculated, the layer loss value of the sixth layer can be calculated, and the layer loss value of the eighth layer can be calculated, and the sub-network loss value of the first sub-network can be generated based on the layer loss values of these four layers. The second sub-network can, for example, include the fourth and eighth layers of the first speech recognition network; the speech data (for example Figure 4C The X in the second sub-network is input into the second sub-network, and the result output by the second sub-network (e.g. Figure 4C Y3 in ( ) can be used as the recognition result; the layer loss value of the fourth layer can be calculated, and the layer loss value of the eighth layer can be calculated, and the sub-network loss value of the second sub-network can be generated based on the layer loss values of these two layers. The third sub-network can include the first speech recognition network (such as Figure 4A The output of the third sub-network (as shown in Figure 4A The value Y1) shown can be used as the recognition result of the third sub-network, and the layer loss values of the eight layers can be calculated, and the sub-network loss value of the third sub-network can be calculated. Then, the network loss value of the first speech recognition network can be determined based on the sub-network loss values of the first sub-network, the sub-network loss values of the second sub-network, and the sub-network loss values of the third sub-network.
[0076] It should be noted that by calculating the loss values of each subnetwork, then determining the network loss value based on the subnetwork loss values, and adjusting the parameters of the first speech recognition network based on the network loss values, the parameter adjustment direction can be achieved to improve not only the accuracy of the first speech recognition network, but also the accuracy of each subnetwork of the first speech recognition network. Therefore, when deploying the first speech recognition network, not only can all layers of the first speech recognition network be enabled for recognition, but also designated subnetworks of the first speech recognition network can be used for recognition, and the accuracy of the designated subnetworks is higher.
[0077] In some embodiments, the method may further include: sending a first speech recognition network that meets preset training completion conditions to a target electronic device, wherein the target electronic device executes a second step; the second step includes: selecting target subnetwork information from the at least two subnetwork information; enabling the first feature extraction layer in the first speech recognition network as the target subnetwork according to the target subnetwork information; and performing speech recognition using the target subnetwork.
[0078] Here, the target electronic device can be any electronic device, that is, the above-mentioned first speech recognition network can be deployed on any electronic device. When the above-mentioned target electronic device runs the first speech recognition network, it can select the preset subnetwork of the first speech recognition network for activation based on the actual application scenario (for example, the computing resources of the target electronic device and the accuracy requirements of the task). For example, the target electronic device can select the first subnetwork (including the four layers of the first speech recognition network) for activation, and the first subnetwork is recorded as the target subnetwork, and the first subnetwork is used for speech recognition.
[0079] It can be understood that, in general, the more layers a sub-network has, the greater the computational effort and the higher the accuracy. The accuracy of the optional sub-networks provided in this application may vary slightly, but all maintain a relatively high accuracy.
[0080] It should be noted that by providing selectable sub-networks, whose parameters are trained to ensure a certain degree of accuracy, the device can autonomously select a sub-network at runtime, thereby balancing accuracy and computational speed. That is, without changing the model size, the target electronic device deployed with the first speech recognition network can flexibly select a large and accurate sub-network or a small and relatively accurate sub-network to complete the task according to different scenarios.
[0081] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an identification device, which is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0082] like Figure 5 As shown, the recognition device of this embodiment includes: a first generation unit 501, a second generation unit 502, and an adjustment unit 503. The first generation unit is configured to input speech data into a first speech recognition network to obtain first feature information generated by the first speech recognition network, wherein the first speech recognition network is obtained by quantizing a second speech recognition network; the second generation unit is configured to generate a network loss value for the first speech recognition network based on the first feature information and enhanced feature information, wherein the enhanced feature information is obtained based on processing the speech data by the second speech recognition network; and the adjustment unit is configured to adjust parameters of the first speech recognition network based on the network loss value, wherein the first speech recognition network that meets the preset training completion condition is used to recognize speech.
[0083] In this embodiment, the specific processing of the first generating unit 501, the second generating unit 502 and the adjusting unit 503 of the recognition device and the technical effects thereof can be referred to in Figure 1The relevant descriptions of step 101, step 102 and step 103 in the corresponding embodiment are not repeated here.
[0084] In some embodiments, the enhanced feature information is generated through a first step, which includes: inputting the speech data into a second speech recognition network to obtain second feature information generated by the second speech recognition network; and generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information.
[0085] In some embodiments, the generation of enhanced feature information of the second feature information based on the high-frequency component of the second feature information includes: transforming the second feature information to obtain transformed information corresponding to the second feature information, wherein the transformation is used to separate the initial high-frequency component and the initial low-frequency component in the second feature information; determining a predefined initial high-frequency component from the transformed information; and performing an inverse transformation corresponding to the transformation on the initial high-frequency component to obtain the high-frequency component.
[0086] In some embodiments, transforming the second feature information to obtain transformed information corresponding to the second feature information includes: performing a wavelet transform on the second feature information to obtain the transformed information.
[0087] In some embodiments, generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information includes: generating the enhanced feature information according to the high-frequency component and the second feature information.
[0088] In some embodiments, the second speech recognition network includes a preset number of second feature extraction layers; and generating the enhanced feature information based on the high-frequency component and the second feature information includes: normalizing the second feature information output by each second feature extraction layer to obtain normalized second feature information corresponding to the second feature extraction layer; normalizing the high-frequency component of each second feature information to obtain a normalized high-frequency component corresponding to the second feature extraction layer; and determining the enhanced feature information corresponding to the second feature extraction layer based on the normalized high-frequency component corresponding to the same feature extraction layer and the normalized second feature information.
[0089] In some embodiments, the first speech recognition network includes a preset number of first feature extraction layers, and the second speech recognition network includes a preset number of second feature extraction layers, and the first feature extraction layers and the second feature extraction layers correspond one to one; the first feature information output by the first feature extraction layer has a corresponding relationship with the second feature information output by the corresponding second feature extraction layer.
[0090] In some embodiments, generating the network loss value of the first speech recognition network based on the first feature information and the enhanced feature information includes: determining the layer loss value of the first feature extraction layer based on the first feature information of the first feature extraction layer and the enhanced feature information corresponding to the second feature extraction layer corresponding to the first feature extraction layer; determining the network loss value of the first speech recognition network based on the layer loss value of the first feature extraction layer in the first speech recognition network.
[0091] In some embodiments, generating the network loss value of the first speech recognition network based on the first feature information and the enhanced feature information includes: obtaining at least two types of sub-network information, wherein the sub-network information indicates the first feature extraction layer included in the sub-network; for the sub-network indicated by the at least two types of sub-network information, determining the layer loss value of the first feature extraction layer included in the sub-network, and determining the sub-network loss value of the sub-network based on the layer loss value of the first feature extraction layer included in the sub-network; determining the network loss value of the first speech recognition network based on the sub-network loss values of the at least two sub-networks.
[0092] In some embodiments, the device is also used to: send a first speech recognition network that meets preset training completion conditions to a target electronic device, wherein the target electronic device executes a second step; the second step includes: selecting target subnetwork information from the at least two subnetwork information; enabling the first feature extraction layer in the first speech recognition network as the target subnetwork according to the target subnetwork information; and performing speech recognition using the target subnetwork.
[0093] Please refer to Figure 6 , Figure 6 An exemplary system architecture is shown in which the identification method according to one embodiment of the present disclosure can be applied.
[0094] like Figure 6 As shown, the system architecture may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 is used to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0095] Terminal devices 601, 602, and 603 can interact with server 605 via network 604 to receive or send messages, etc. Various client applications can be installed on terminal devices 601, 602, and 603, such as web browser applications, search applications, and news and information applications. The client applications in terminal devices 601, 602, and 603 can receive user instructions and perform corresponding functions based on the user instructions, such as adding corresponding information to the message based on the user's instructions.
[0096] Terminal devices 601, 602, and 603 can be hardware or software. When terminal devices 601, 602, and 603 are hardware, they can be various electronic devices with display screens and support web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers, and desktop computers, etc. When terminal devices 601, 602, and 603 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0097] The server 605 may be a server that provides various services, such as receiving information acquisition requests sent by the terminal devices 601, 602, and 603, acquiring display information corresponding to the information acquisition requests through various means according to the information acquisition requests, and sending relevant data of the display information to the terminal devices 601, 602, and 603.
[0098] It should be noted that the identification method provided in the embodiment of the present disclosure can be executed by a terminal device, and accordingly, the identification device can be set in the terminal devices 601, 602, and 603. In addition, the identification method provided in the embodiment of the present disclosure can also be executed by a server 605, and accordingly, the identification device can be set in the server 605.
[0099] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0100] Reference below Figure 7 , which shows an electronic device (eg Figure 6 The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0101] like Figure 7 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0102] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0103] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0104] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0105] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0106] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0107] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: inputs the voice data into the first voice recognition network to obtain the first feature information generated by the first voice recognition network, wherein the first voice recognition network is obtained by quantifying the second voice recognition network; generates a network loss value of the first voice recognition network based on the first feature information and the enhanced feature information, wherein the enhanced feature information is obtained based on the second voice recognition network processing the voice data; adjusts the parameters of the first voice recognition network according to the network loss value, wherein the first voice recognition network that meets the preset training completion conditions is used to recognize voice.
[0108] In some embodiments, the enhanced feature information is generated through a first step, which includes: inputting the speech data into a second speech recognition network to obtain second feature information generated by the second speech recognition network; and generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information.
[0109] In some embodiments, the generation of enhanced feature information of the second feature information based on the high-frequency component of the second feature information includes: transforming the second feature information to obtain transformed information corresponding to the second feature information, wherein the transformation is used to separate the initial high-frequency component and the initial low-frequency component in the second feature information; determining a predefined initial high-frequency component from the transformed information; and performing an inverse transformation corresponding to the transformation on the initial high-frequency component to obtain the high-frequency component.
[0110] In some embodiments, transforming the second feature information to obtain transformed information corresponding to the second feature information includes: performing a wavelet transform on the second feature information to obtain the transformed information.
[0111] In some embodiments, generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information includes: generating the enhanced feature information according to the high-frequency component and the second feature information.
[0112] In some embodiments, the second speech recognition network includes a preset number of second feature extraction layers; and generating the enhanced feature information based on the high-frequency component and the second feature information includes: normalizing the second feature information output by each second feature extraction layer to obtain normalized second feature information corresponding to the second feature extraction layer; normalizing the high-frequency component of each second feature information to obtain a normalized high-frequency component corresponding to the second feature extraction layer; and determining the enhanced feature information corresponding to the second feature extraction layer based on the normalized high-frequency component corresponding to the same feature extraction layer and the normalized second feature information.
[0113] In some embodiments, the first speech recognition network includes a preset number of first feature extraction layers, and the second speech recognition network includes a preset number of second feature extraction layers, and the first feature extraction layers and the second feature extraction layers correspond one to one; the first feature information output by the first feature extraction layer has a corresponding relationship with the second feature information output by the corresponding second feature extraction layer.
[0114] In some embodiments, generating the network loss value of the first speech recognition network based on the first feature information and the enhanced feature information includes: determining the layer loss value of the first feature extraction layer based on the first feature information of the first feature extraction layer and the enhanced feature information corresponding to the second feature extraction layer corresponding to the first feature extraction layer; determining the network loss value of the first speech recognition network based on the layer loss value of the first feature extraction layer in the first speech recognition network.
[0115] In some embodiments, generating the network loss value of the first speech recognition network based on the first feature information and the enhanced feature information includes: obtaining at least two types of sub-network information, wherein the sub-network information indicates the first feature extraction layer included in the sub-network; for the sub-network indicated by the at least two types of sub-network information, determining the layer loss value of the first feature extraction layer included in the sub-network, and determining the sub-network loss value of the sub-network based on the layer loss value of the first feature extraction layer included in the sub-network; determining the network loss value of the first speech recognition network based on the sub-network loss values of the at least two sub-networks.
[0116] In some embodiments, the electronic device can also be enabled to: send the first speech recognition network that meets the preset training completion conditions to a target electronic device, wherein the target electronic device executes the second step; the second step includes: selecting target subnetwork information from the at least two subnetwork information; enabling the first feature extraction layer in the first speech recognition network as the target subnetwork according to the target subnetwork information; and using the target subnetwork for speech recognition.
[0117] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0119] The units described in the embodiments of the present disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, an adjustment unit may also be described as a "unit for adjusting parameters of the first speech recognition network."
[0120] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0121] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0123] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0124] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A recognition method, characterized in that: include: Inputting speech data into a first speech recognition network to obtain first feature information generated by the first speech recognition network, wherein the first speech recognition network is obtained by quantizing the second speech recognition network; generating a network loss value of the first speech recognition network based on the first feature information and the enhanced feature information, wherein the enhanced feature information is obtained by processing the speech data by the second speech recognition network; adjusting parameters of the first speech recognition network according to the network loss value, wherein the first speech recognition network that meets the preset training completion condition is used to recognize speech; The enhanced feature information is generated through a first step, wherein the first step includes: inputting the speech data into a second speech recognition network to obtain second feature information generated by the second speech recognition network; and generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information.
2. The method according to claim 1, characterized in that The step of generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information includes: Transforming the second feature information to obtain transformed information corresponding to the second feature information, wherein the transformation is used to separate an initial high-frequency component and an initial low-frequency component in the second feature information; determining a predefined initial high frequency component from the transformed information; An inverse transformation corresponding to the transformation is performed on the initial high-frequency component to obtain the high-frequency component.
3. The method according to claim 2, characterized in that The transforming the second characteristic information to obtain transformed information corresponding to the second characteristic information includes: Perform wavelet transform on the second feature information to obtain the transformed information.
4. The method according to claim 1, wherein The step of generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information includes: The enhanced feature information is generated based on the high-frequency component and the second feature information.
5. The method according to claim 4, characterized in that The second speech recognition network includes a preset number of second feature extraction layers; as well as Generating the enhanced feature information according to the high-frequency component and the second feature information includes: Normalizing the second feature information output by each second feature extraction layer to obtain normalized second feature information corresponding to the second feature extraction layer; Normalizing the high-frequency components of each second feature information to obtain normalized high-frequency components corresponding to the second feature extraction layer; The enhanced feature information corresponding to the second feature extraction layer is determined according to the normalized high-frequency component corresponding to the same feature extraction layer and the normalized second feature information.
6. The method according to claim 1, characterized in that The first speech recognition network includes a preset number of first feature extraction layers, and the second speech recognition network includes a preset number of second feature extraction layers, and the first feature extraction layers and the second feature extraction layers correspond one to one; There is a corresponding relationship between the first feature information output by the first feature extraction layer and the second feature information output by the corresponding second feature extraction layer.
7. The method according to claim 6, characterized in that Generating a network loss value of the first speech recognition network according to the first feature information and the enhanced feature information includes: Determining a layer loss value of the first feature extraction layer according to the first feature information of the first feature extraction layer and the enhanced feature information corresponding to the second feature extraction layer corresponding to the first feature extraction layer; Determine a network loss value of the first speech recognition network according to a layer loss value of a first feature extraction layer in the first speech recognition network.
8. The method according to claim 6, characterized in that Generating a network loss value of the first speech recognition network according to the first feature information and the enhanced feature information includes: Acquire at least two types of sub-network information, wherein the sub-network information indicates a first feature extraction layer included in the sub-network; For the subnetwork indicated by the at least two types of subnetwork information, determining a layer loss value of a first feature extraction layer included in the subnetwork, and determining a subnetwork loss value of the subnetwork according to the layer loss value of the first feature extraction layer included in the subnetwork; A network loss value of the first speech recognition network is determined according to the sub-network loss values of the at least two sub-networks.
9. The method according to claim 8, characterized in that The method further comprises: sending the first speech recognition network that meets the preset training completion condition to a target electronic device, wherein the target electronic device performs the second step; The second step includes: selecting target sub-network information from the at least two sub-network information; enabling the first feature extraction layer in the first speech recognition network as the target sub-network according to the target sub-network information; and performing speech recognition using the target sub-network.
10. An identification device, characterized in that: include: a first generating unit, configured to input speech data into a first speech recognition network to obtain first feature information generated by the first speech recognition network, wherein the first speech recognition network is obtained by quantizing the second speech recognition network; a second generating unit, configured to generate a network loss value of the first speech recognition network based on the first feature information and the enhanced feature information, wherein the enhanced feature information is obtained by processing the speech data by the second speech recognition network; an adjusting unit, configured to adjust parameters of the first speech recognition network according to the network loss value, wherein the first speech recognition network that meets the preset training completion condition is used to recognize speech; The enhanced feature information is generated through a first step, wherein the first step includes: inputting the speech data into a second speech recognition network to obtain second feature information generated by the second speech recognition network; and generating enhanced feature information of the second feature information based on the high-frequency component of the second feature information.
11. An electronic device, characterized in that: include: at least one processor; a storage device for storing at least one computer program, When the at least one computer program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 9.
12. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Speech recognition method and device, electronic equipment and storage medium
CN110211593A
Quantization method and device for time series speech recognition deep learning model
CN112652299A