Speech recognition method and device, electronic equipment and computer readable storage medium
By introducing the shared convolution module, splicing module and channel attention module into the Transformer model, the speech features of each encoder layer are integrated and optimized to solve the problem of information loss in the Transformer model and improve the effect and accuracy of speech recognition. .
Patent Information
- Application Number
- CN202411011316.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-08
AI Technical Summary
In speech recognition, the output of the encoder layer of the Transformer model represents different levels of acoustic features, while the decoder only uses the output of the last layer, resulting in the loss of some useful information and affecting the recognition effect.
A speech recognition method including an encoder module, a shared convolution module, a splicing module, a channel attention module and a decoder module is adopted to extract speech features through each encoder layer, and the shared convolution module, splicing module and channel attention are used The module performs feature fusion and optimization, and is finally input to the decoder module for conversion processing.
It improves the utilization of low-level acoustic features, alleviates the gap problem between the encoder output and the decoder input, and improves the effect and accuracy of speech recognition.
Smart Images

Figure CN118748012A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to but are not limited to the field of financial technology, and in particular to a speech recognition method, device, electronic device and computer-readable storage medium. Background Art
[0002] In recent years, Transformer networks and their variants have made significant progress in the field of natural language processing and other related fields. In the financial field, people can use Transformer models to build intelligent dialogue systems, and use intelligent dialogue systems to answer questions asked by users, which greatly reduces the workload of financial business personnel; however, the encoder in the Transformer model is composed of multiple sub-layers, and the outputs of different encoder layers represent different levels of acoustic features. The input of each layer of the decoder in the Transformer model only uses the final output of the encoder, which does not fully utilize the multi-level features generated by each layer of the encoder, discards some useful information, and results in poor speech recognition. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] In order to solve the problems mentioned in the above background technology, the embodiments of the present application provide a speech recognition method, device, electronic device and computer-readable storage medium to improve the effect of speech recognition.
[0005] In a first aspect, an embodiment of the present application provides a speech recognition method, which is applied to a speech recognition model, wherein the speech recognition model includes an encoder module, a shared convolution module, a splicing module, a channel attention module, and a decoder module, wherein the encoder module is provided with multiple encoder layers; the method includes:
[0006] Acquire a speech signal to be recognized;
[0007] For each of the encoder layers, performing feature extraction processing on the speech signal to be recognized based on the encoder layer to obtain speech features;
[0008] Performing local feature extraction on the plurality of speech features based on the shared convolution module to obtain a plurality of local speech features;
[0009] Based on the splicing module, a plurality of the local speech features are spliced to obtain a spliced acoustic feature;
[0010] Based on the channel attention module, channel weight calculation processing is performed on the spliced acoustic features to obtain optimized acoustic features;
[0011] The optimized acoustic features are converted and processed based on the decoder module to obtain speech recognition information.
[0012] According to some embodiments of the present application, the shared convolution module includes a convolution layer, a pooling layer and a fully connected layer, and the local feature extraction of the multiple speech features based on the shared convolution module to obtain multiple local speech features includes:
[0013] Based on the convolution layer, convolution processing is performed on the plurality of speech features to obtain speech convolution features;
[0014] Downsampling the speech convolution feature based on the pooling layer to obtain a simplified speech feature;
[0015] The simplified speech features are classified and processed based on the fully connected layer to obtain a plurality of the local speech features.
[0016] According to some embodiments of the present application, the channel weight calculation processing is performed on the spliced acoustic features based on the channel attention module to obtain the optimized acoustic features, including:
[0017] Performing an average pooling operation on the concatenated acoustic features in a channel dimension to obtain a plurality of channel pooling features;
[0018] Performing weight calculation on a plurality of the channel pooling features to obtain a plurality of channel weight values;
[0019] Determining a representative acoustic feature according to the concatenated acoustic feature and a plurality of the channel weight values;
[0020] The representative acoustic features are summed up in the channel dimension to obtain the optimized acoustic features.
[0021] According to some embodiments of the present application, the decoder module includes a masked attention layer, a multi-head attention layer and a feedforward network layer, and the converting and processing the optimized acoustic features based on the decoder module to obtain speech recognition information includes:
[0022] generating a first attention matrix according to the masked attention layer and the optimized acoustic features;
[0023] Determining a second attention matrix according to the first attention matrix, the optimized acoustic features, and the multi-head attention layer;
[0024] The second attention matrix is decoded according to the feedforward network layer to obtain the speech recognition information.
[0025] According to some embodiments of the present application, after converting the optimized acoustic features based on the decoder module to obtain speech recognition information, the method further includes:
[0026] Performing semantic recognition processing on the speech recognition information to obtain semantic recognition information;
[0027] Performing keyword recognition processing on the semantic recognition information to obtain keyword information;
[0028] The question feedback result is determined according to the keyword information and a preset answer database.
[0029] According to some embodiments of the present application, the answer database includes key value information and feedback content corresponding to the key value information, and determining the question feedback result according to the keyword information and the preset answer database includes:
[0030] Matching the keyword information with the key value information;
[0031] In the case of successful matching, the feedback content corresponding to the key-value information matching the keyword information is determined as the question feedback result.
[0032] According to some embodiments of the present application, after matching the keyword information with the key value information, the method further includes:
[0033] In the case of unsuccessful matching, a preset unsuccessful answer example in the answer database is determined as the question feedback result.
[0034] In a second aspect, an embodiment of the present application further provides a speech recognition device, including a speech recognition model, wherein the speech recognition model includes an encoder module, a shared convolution module, a concatenation module, a channel attention module and a decoder module, wherein the encoder module is provided with a plurality of encoder layers; the speech recognition device includes:
[0035] A first processing module, used for acquiring a speech signal to be recognized;
[0036] A second processing module is used for performing feature extraction processing on the speech signal to be recognized based on the encoder layer for each encoder layer to obtain speech features;
[0037] A third processing module, configured to perform local feature extraction on the plurality of speech features based on the shared convolution module to obtain a plurality of local speech features;
[0038] A fourth processing module, configured to perform splicing processing on the plurality of local speech features based on the splicing module to obtain a spliced acoustic feature;
[0039] A fifth processing module, configured to perform channel weight calculation processing on the concatenated acoustic features based on the channel attention module to obtain optimized acoustic features;
[0040] The sixth processing module is used to convert the optimized acoustic features based on the decoder module to obtain speech recognition information.
[0041] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the speech recognition method as described in the first aspect above is implemented.
[0042] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the speech recognition method as described in the first aspect above.
[0043] According to the speech recognition method of the embodiment provided by the present application, at least the following beneficial effects are achieved: in the process of speech recognition processing, firstly, the speech signal to be recognized is obtained; for each encoder layer, feature extraction can be performed on the speech signal to be recognized based on the encoder layer, so as to obtain speech features; then, local feature extraction is performed on multiple speech features based on the shared convolution module, and then multiple local speech features can be obtained; then, multiple local speech features are spliced based on the splicing module to obtain spliced acoustic features; then, channel weight calculation and processing are performed on the spliced acoustic features based on the channel attention module, so as to obtain optimized acoustic features; finally, speech recognition information can be obtained by converting the optimized acoustic features based on the decoder module. Through the above technical scheme, the speech features extracted by each encoder layer are input into the decoder module, thereby improving the utilization of low-level acoustic features, alleviating the fault problem between the output of the encoder module and the input of the decoder module, improving the effect of speech recognition, and bringing a more convenient experience to users in the intelligent dialogue process of the financial industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0045] Figure 1 is a flow chart of a speech recognition method provided by an embodiment of the present application;
[0046] Figure 2 is a specific flow chart of step S300 provided in one embodiment of the present application;
[0047] Figure 3is a specific flow chart of step S500 provided in one embodiment of the present application;
[0048] Figure 4 is a specific flow chart of step S600 provided in one embodiment of the present application;
[0049] Figure 5 is a flow chart of a speech recognition method provided by another embodiment of the present application;
[0050] Figure 6 This is a flow chart of determining a problem feedback result provided by an embodiment of the present application;
[0051] Figure 7 is a flowchart of determining a problem feedback result provided by another embodiment of the present application;
[0052] Figure 8 This is a schematic diagram of a speech recognition method provided by an embodiment of the present application.
[0053] Fig. 9 is a schematic diagram of a speech recognition device provided by an embodiment of the present application;
[0054] Fig.10 It is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0057] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0058] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0059] AI is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial intelligence is a branch of computer science. Artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0060] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0061] Artificial intelligence is AI. AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0062] The servers involved in artificial intelligence technology can be independent servers or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0063] The present application provides a speech recognition method, device, electronic device and computer-readable storage medium. In the process of speech recognition processing, firstly, a speech signal to be recognized is obtained; for each encoder layer, feature extraction can be performed on the speech signal to be recognized based on the encoder layer, so as to obtain speech features; then local feature extraction is performed on multiple speech features based on the shared convolution module, and then multiple local speech features can be obtained; then multiple local speech features are spliced based on the splicing module to obtain spliced acoustic features; then channel weight calculation and processing are performed on the spliced acoustic features based on the channel attention module to obtain optimized acoustic features; finally, speech recognition information is obtained by converting the optimized acoustic features based on the decoder module. Through the above technical scheme, the speech features extracted by each encoder layer are input into the decoder module, thereby improving the utilization of low-level acoustic features, alleviating the fault problem between the output of the encoder module and the input of the decoder module, improving the effect of speech recognition, and bringing users a more convenient experience in the intelligent dialogue process of the financial industry.
[0064] The speech recognition method provided in the embodiment of the present application relates to the field of financial technology. The speech recognition method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the speech recognition method, etc., but is not limited to the above forms.
[0065] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0066] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0067] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0068] like Figure 1 As shown, Figure 1 It is a flowchart of a speech recognition method provided by an embodiment of the present application. The speech recognition method is applied to a speech recognition model. The speech recognition model includes an encoder module, a shared convolution module, a splicing module, a channel attention module and a decoder module, wherein the encoder module is also provided with multiple encoder layers. The speech recognition method includes but is not limited to steps S100 to S600.
[0069] Step S100, obtaining a speech signal to be recognized;
[0070] Step S200, for each encoder layer, performing feature extraction processing on the speech signal to be recognized based on the encoder layer to obtain speech features;
[0071] Step S300, performing local feature extraction on multiple speech features based on a shared convolution module to obtain multiple local speech features;
[0072] Step S400, performing splicing processing on multiple local speech features based on a splicing module to obtain a spliced acoustic feature;
[0073] Step S500, performing channel weight calculation processing on the spliced acoustic features based on the channel attention module to obtain optimized acoustic features;
[0074] Step S600: converting the optimized acoustic features based on the decoder module to obtain speech recognition information.
[0075] It should be noted that in the process of speech recognition processing, the speech signal to be recognized is first obtained; for each encoder layer, the feature extraction of the speech signal to be recognized can be performed based on the encoder layer, so as to obtain the speech feature; then, local feature extraction of multiple speech features can be performed based on the shared convolution module, and then multiple local speech features can be obtained; then, multiple local speech features can be spliced based on the splicing module to obtain the spliced acoustic feature; then, the spliced acoustic feature is calculated based on the channel attention module to obtain the optimized acoustic feature; finally, the optimized acoustic feature is converted based on the decoder module to obtain the speech recognition information. Through the above technical solution, the speech features extracted by each encoder layer are input into the decoder module, thereby improving the utilization of low-level acoustic features, alleviating the fault problem between the output of the encoder module and the input of the decoder module, improving the effect of speech recognition, and bringing users a more convenient experience in the intelligent dialogue process of the financial industry.
[0076] It is worth noting that the voice signal to be recognized in the embodiment of the present application can be the voice signal generated by the user in the consultation dialogue with the intelligent dialogue system of the financial industry; for example, the user consults the intelligent dialogue system "what is the current exchange rate", and then the intelligent dialogue system can convert the received user voice into a voice signal to be recognized, making the prerequisite preparation for the subsequent semantic recognition. Among them, before the intelligent dialogue system communicates with the user, it will first obtain the user's permission, and will obtain the user's separate permission or separate consent through a pop-up window or jump to a confirmation page. After clearly obtaining the user's separate permission or separate consent, it will obtain the necessary user-related data for the normal operation of the embodiment of the present application, which greatly improves the dialogue security of the intelligent dialogue system.
[0077] It should be noted that the speech recognition model in the embodiment of the present application includes an encoder module, a shared convolution module, a splicing module, a channel attention module and a decoder module; wherein the encoder module, the shared convolution module, the splicing module, the channel attention module and the decoder module are data-connected in sequence, and the encoder module includes multiple encoder layers, and the output of each encoder layer is connected to the shared convolution module, making good use of the speech features of each layer, so that subsequent speech recognition can be more accurate, and will not use only the speech features of the last layer as usual, thereby greatly improving the accuracy of speech recognition. Exemplarily, the above-mentioned speech recognition module is included in the intelligent dialogue system of the financial industry, so that more accurate speech recognition processing can be performed on the received speech signal to be recognized based on the speech recognition module.
[0078] It is worth noting that for each encoder layer, the corresponding speech features can be obtained by performing feature extraction processing on the speech signal to be recognized based on the encoder layer; since the encoder module includes multiple encoder layers, multiple speech features can be obtained after the speech signal to be recognized is subjected to feature extraction by the encoder module, and each speech feature corresponds to an encoder layer. Multiple encoder layers are used to perform feature extraction on the speech signal to be recognized, so as to extract speech features at multiple different levels, thereby providing a data basis for subsequent speech recognition and making subsequent speech recognition more accurate.
[0079] It is worth noting that by performing local feature extraction on multiple speech features based on the shared convolution module, multiple local speech features can be obtained. The speech features processed by the shared convolution module can have strong robustness, which improves the accuracy of subsequent speech recognition, and enables the intelligent dialogue system in the financial industry to more accurately feedback relevant answer information to users, which brings great convenience to users.
[0080] It is worth noting that after obtaining multiple local speech features, the splicing module can be used to splice the multiple local speech features to obtain the spliced acoustic features, and finally the channel attention module can be used to perform channel weighting on the spliced acoustic features to obtain the optimized acoustic features; finally, the channel attention module can be used to perform channel weight calculation on the optimized acoustic features to obtain the optimized acoustic features; finally, the decoder module can be used to convert the optimized acoustic features to obtain speech recognition information; in the above manner, the dialogue system in the financial industry can respond to user inquiries more accurately and quickly, which brings great convenience to users.
[0081] In some embodiments, Figure 2As shown, the shared convolution module includes a convolution layer, a pooling layer and a fully connected layer, and the above step S300 may include but is not limited to steps S310 to S330.
[0082] Step S310, performing convolution processing on multiple speech features based on a convolution layer to obtain speech convolution features;
[0083] Step S320, downsampling the speech convolution feature based on the pooling layer to obtain a simplified speech feature;
[0084] Step S330: classify the simplified speech features based on the fully connected layer to obtain multiple local speech features.
[0085] It should be noted that in the process of extracting local features from multiple speech features based on a shared convolution module, first, convolution processing is performed on multiple speech features based on the convolution layer to obtain speech convolution features; then, down-sampling processing is performed on the speech convolution features based on the pooling layer to obtain simplified speech features; finally, classification processing is performed on the simplified speech features based on the fully connected layer to obtain multiple local speech features; through the above technical solution, the process of extracting local features from multiple speech features using a shared convolution module can be more stable and reliable.
[0086] It is worth noting that the shared convolution module includes convolutional layers, pooling layers and fully connected layers. The convolutional layers, pooling layers and fully connected layers are connected in sequence. The convolutional layers can realize feature extraction, the pooling layers can realize data dimensionality reduction processing, and the fully connected layers can realize classification processing. The cooperation of the above three different sub-units can realize the extraction of local speech features, which is the prerequisite for the subsequent speech recognition processing of the intelligent dialogue system.
[0087] In some embodiments, Figure 3 As shown, the above step S500 may also include but is not limited to steps S510 to S540.
[0088] Step S510, performing an average pooling operation on the concatenated acoustic features in the channel dimension to obtain a plurality of channel pooling features;
[0089] Step S520, performing weight calculation on multiple channel pooling features to obtain multiple channel weight values;
[0090] Step S530, determining a representative acoustic feature according to the concatenated acoustic features and multiple channel weight values;
[0091] Step S540: The representative acoustic features are summed up in the channel dimension to obtain optimized acoustic features.
[0092] It should be noted that in the process of calculating the channel weights of the spliced acoustic features based on the channel attention module, first, an average pooling operation is performed on multiple spliced acoustic features in the channel dimension to obtain multiple channel pooling features; then, weight calculation is performed on the multiple channel pooling features to obtain multiple channel weight values; then, the representative acoustic features are determined based on the spliced acoustic features and the multiple channel weight values; finally, the representative acoustic features are summed in the channel dimension to obtain the optimized acoustic features, which is the prerequisite for the subsequent optimized acoustic feature conversion.
[0093] It is worth noting that the channel attention module can be a compression and excitation network, which is divided into two parts: compression and excitation. The purpose of the compression part is to compress the global spatial information, and then perform feature learning in the channel dimension to form the importance of each channel. Finally, different weights are assigned to each channel through the excitation part. The role of the channel attention module is to make the input information more meaningful. The importance (weight) of each channel of the input image is calculated through the network, so as to achieve the purpose of improving the feature representation ability; the importance of the channel is usually learned based on the information in the input data, not just the mean, which means that the model can adaptively assign weights to each channel to better capture the relevant features of the input data.
[0094] It is worth noting that applying the channel attention module to the intelligent dialogue system makes the consultation and feedback of financial industry issues easier, faster and more accurate, thus bringing a good user experience.
[0095] In some embodiments, Figure 4 As shown, the decoder module includes a mask attention layer, a multi-head attention layer and a feedforward network layer, and the above step S600 may also include but is not limited to steps S610 to S630.
[0096] Step S610, generating a first attention matrix according to the masked attention layer and the optimized acoustic features;
[0097] Step S620, determining a second attention matrix according to the first attention matrix, the optimized acoustic features and the multi-head attention layer;
[0098] Step S630, decoding the second attention matrix according to the feedforward network layer to obtain speech recognition information.
[0099] It should be noted that in the process of converting the optimized acoustic features based on the decoder module to obtain speech recognition information, the first attention matrix is first generated according to the masked attention layer and the optimized acoustic features; then the second attention matrix can be determined according to the first attention matrix, the optimized acoustic features and the multi-head attention layer; finally, the second attention matrix can be decoded according to the feedforward network layer to obtain the corresponding speech recognition information. Through the above technical solution, speech recognition information can be determined according to the decoder module and the optimized acoustic features, thereby improving the accuracy of speech recognition.
[0100] It is worth noting that the encoder module and the decoder module in the embodiment of the present application are corresponding, and both have the same submodules, but the operation steps of each submodule are opposite. Through the above settings, speech recognition can be more stable, efficient and accurate.
[0101] In some embodiments, Figure 5 As shown, after executing the above step S600, the speech recognition method may also include but is not limited to steps S710 to S730.
[0102] Step S710, performing semantic recognition processing on the speech recognition information to obtain semantic recognition information;
[0103] Step S720, performing keyword recognition processing on the semantic recognition information to obtain keyword information;
[0104] Step S730, determining the question feedback result according to the keyword information and the preset answer database.
[0105] It should be noted that after determining the voice recognition information based on the voice signal to be recognized, the voice recognition information can also be processed for semantic recognition to obtain semantic recognition information; then, the semantic recognition information can be processed for keyword recognition to obtain keyword information; finally, based on the keyword information and the preset answer database, the corresponding question feedback result can be determined, and then the questions asked by the user can be answered, thereby bringing a good user experience to the user.
[0106] For example, during the process of consulting and communicating with the intelligent dialogue system, the user asks the intelligent dialogue system "What specific types of insurance business are currently included?" After the intelligent dialogue system determines that the question asked by the user is "What specific types of insurance business are currently included", it can perform keyword recognition processing on the text to obtain the keywords "insurance business", "includes" and "type" respectively; finally, the identified keywords "insurance business", "includes" and "type" can be matched with the preset answer data, and finally the final question feedback result can be determined to answer the question asked by the user, which brings great convenience to the user.
[0107] In some embodiments, Figure 6 As shown, the answer database includes key value information and feedback content corresponding to the key value information. The above step S730 may include but is not limited to steps S731 to S732.
[0108] Step S731, matching keyword information with key value information;
[0109] Step S732: When the match is successful, the feedback content corresponding to the key value information matching the keyword information is determined as the question feedback result.
[0110] It should be noted that in the process of determining the question feedback result based on the keyword information and the preset answer database, the keyword information and the key value information are first matched; if the match is successful, the feedback content corresponding to the key value information matching the keyword information can be used as the question feedback result, and the question feedback result can be fed back to the user to inform the user of the consultation result of the current question, which brings the user a better user experience.
[0111] In some embodiments, Figure 7 As shown, after executing step S731, the speech recognition method may also include but is not limited to step S733.
[0112] Step S733: When the matching is unsuccessful, a preset unsuccessful answer example in the answer database is determined as the question feedback result.
[0113] It should be noted that after the keyword information and the key value information are matched, if the keyword information cannot be matched with the key value information in the preset answer database, it is determined that there is no answer in the answer database that can answer the user's question. Therefore, an unsuccessful answer example can be sent to the user, thereby informing the user that the current question cannot be answered.
[0114] For example, when a user asks "How will the exchange rate change in the next week?", the text is processed for keyword recognition to obtain the keywords "future", "week", "exchange rate" and "change", and these keywords are matched with the key value information in the answer database. When the match is unsuccessful, the intelligent dialogue system will feedback to the user "The current question cannot be answered, please ask another question", and can then intuitively and quickly inform the user of the corresponding consultation results, giving the user a better user experience.
[0115] In order to more clearly explain the speech recognition method of the present application, a specific embodiment is provided below for illustration.
[0116] like Figure 8 As shown, the input of the decoder is not only the output of the last layer of the encoder, but the input of the decoder layer comes from the output of the corresponding encoder layer after the channel attention (Squeeze-and-Excitation, SE) module, which also solves the network fault problem at the same time. Since the attention mechanism captures the global information of the input features, in order to enhance the network's ability to capture local features, this application introduces a shared convolution module to strengthen the extraction of local features. In addition, in order to fuse individual-level features, this application introduces an SE module to extract the interaction between the outputs of each encoder layer.
[0117] Specifically, the same X=(X1,...,X N ) is used to represent the output of the i-th encoder layer. Y=(Y1,...,Y N ) represents the output of the i-th decoder layer. X i First, it passes through the shared convolution module, and then is concatenated and passed to the SE module. Among them, the SE module comes from image processing. The advantage of this application is that the shared convolution module has fewer parameters than the hybrid network structure, and can also complete the extraction of local features; in addition, this application cleverly introduces the SE module into speech recognition, which can fuse the high- and low-level features after obtaining global and local features, which is equivalent to multi-scale feature fusion in image processing, and can improve the performance of speech recognition to a certain extent.
[0118] Among them, for the shared convolutional module, any encoder layer output (T is the input feature length, D is the embedding dimension) The output of this module is represented as X′ i =Conv(X i ), the features after the convolution module will be more robust. Then, each encoder layer is concatenated after passing through the convolution module, which is represented by X"=Concat(X′1,...,X′ N ), then the shape of X" is Here, different channels of X″ represent acoustic features of different levels. The SE network can handle the importance of different channels very well. The SE network can handle the importance of different channels very well in the field of image processing, but it has not been widely used in the field of speech recognition. This is due to the difference in processing in the feature dimension. This patent uses the above method to reasonably splice acoustic features of different levels and conform to the application of the SE network. It is a more reasonable design to use the SE module to select the appropriate feature level. Similarly, X" is used as the input of the SE module, and the average pooling operation is performed in the channel dimension. Then z is passed through S = F ex(z) = softmax(z) to get the weights between different channels, and then assign the weight values to the input X", and get the most representative feature output X″′ = S c ×X"c, at this time, different channels are weighted to different degrees, and then The final output is obtained by summing in the channel dimension, that is In this process, better features are obtained with less computing resources. Finally, the output is used as the input of the decoder: Y i =FFN(MHA(MHA(Y i-1 , Y i-1 , Y i-1 ), X″″, X″″); N ) is used to represent the output of the i-th encoder layer. Y=(Y1,...,Y N ) represents the output of the ith decoder layer; FFN represents a feedforward network, and MHA represents a self-attention mechanism. The multi-level feature fusion method for improving speech recognition proposed in the embodiment of the present application uses the output of each layer of the encoder as the input of each layer of the decoder, thereby improving the model's utilization of low-level acoustic features, alleviating the fault problem between the encoder output and the decoder input, and also providing a more flexible architecture design method. Experiments have shown that in the field of automatic speech recognition, this method can better cope with difficulties such as low signal-to-noise ratio and long speech, and achieve better recognition results compared to the traditional Transformer model. This method provides a new direction, points out the direction of improving the Transformer model in the field of automatic speech recognition, and provides useful guidance for better application in speech recognition, speech synthesis and other related fields.
[0119] In addition, if Fig. 9 As shown, an embodiment of the present application further provides a speech recognition device 10, the speech recognition device 10 includes a speech recognition model, the speech recognition model includes an encoder module, a shared convolution module, a concatenation module, a channel attention module and a decoder module, the encoder module is provided with a plurality of encoder layers; the speech recognition device includes:
[0120] The first processing module 100 is used to obtain a speech signal to be recognized;
[0121] The second processing module 200 is used for performing feature extraction processing on the speech signal to be recognized based on the encoder layer for each encoder layer to obtain speech features;
[0122] A third processing module 300 is used to extract local features from the multiple speech features based on the shared convolution module to obtain multiple local speech features;
[0123] A fourth processing module 400 is used to perform splicing processing on multiple local speech features based on the splicing module to obtain a spliced acoustic feature;
[0124] A fifth processing module 500 is used to perform channel weight calculation processing on the concatenated acoustic features based on the channel attention module to obtain optimized acoustic features;
[0125] The sixth processing module 600 is used to convert the optimized acoustic features based on the decoder module to obtain speech recognition information.
[0126] It should be noted that in the process of speech recognition processing, the speech signal to be recognized is first obtained; for each encoder layer, the feature extraction of the speech signal to be recognized can be performed based on the encoder layer, so as to obtain the speech feature; then, local feature extraction of multiple speech features can be performed based on the shared convolution module, and then multiple local speech features can be obtained; then, multiple local speech features can be spliced based on the splicing module to obtain the spliced acoustic feature; then, the spliced acoustic feature is calculated based on the channel attention module to obtain the optimized acoustic feature; finally, the optimized acoustic feature is converted based on the decoder module to obtain the speech recognition information. Through the above technical solution, the speech features extracted by each encoder layer are input into the decoder module, thereby improving the utilization of low-level acoustic features, alleviating the fault problem between the output of the encoder module and the input of the decoder module, improving the effect of speech recognition, and bringing users a more convenient experience in the intelligent dialogue process of the financial industry.
[0127] The specific implementation of the speech recognition device 10 is substantially the same as the specific implementation of the speech recognition method described above, and will not be described in detail herein.
[0128] In addition, if Fig.10 As shown, an embodiment of the present application further provides an electronic device 700 , which includes: a memory 720 , a processor 710 , and a computer program stored in the memory 720 and executable on the processor 710 .
[0129] The processor 710 and the memory 720 may be connected via a bus or in other ways.
[0130] The non-transient software programs and instructions required to implement the speech recognition methods of the above embodiments are stored in the memory 720. When executed by the processor 710, the speech recognition methods of the above embodiments are executed, for example, the above described speech recognition methods are executed. Figure 1 The method steps S100 to S600, Figure 2 Steps S310 to S330 of the method, Figure 3 Steps S510 to S540 of the method, Figure 4Steps S610 to S630 of the method, Figure 5 Steps S710 to S730 of the method, Figure 6 Steps S731 to S732 and Figure 7 Method step S733 in.
[0131] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by a processor 710 or a controller, for example, by a processor 710 in the above-mentioned device embodiment, so that the processor 710 can execute the speech recognition method in the above-mentioned embodiment, for example, execute the above-mentioned Figure 1 The method steps S100 to S600, Figure 2 Steps S310 to S330 of the method, Figure 3 Steps S510 to S540 of the method, Figure 4 Steps S610 to S630 of the method, Figure 5 Steps S710 to S730 of the method, Figure 6 Steps S731 to S732 and Figure 7 Method step S733 in.
[0133] The above embodiments may be used in combination, and modules with the same name in different embodiments may be the same or different.
[0134] The above describes specific embodiments of the present application, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0135] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0136] The apparatus, device, computer-readable storage medium and method provided in the embodiments of the present application correspond to each other. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and computer storage medium will not be repeated here.
[0137] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many improvements to method flows today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0138] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0139] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0140] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0141] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0142] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.
[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 A function specified in one or more boxes.
[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0145] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0146] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0147] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0148] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0149] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0150] Embodiments of the present application may be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. Embodiments of the present application may also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0151] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system 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.
[0152] The above is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A speech recognition method, It is characterized in that Applied to a speech recognition model, the speech recognition model includes an encoder module, a shared convolution module, a concatenation module, a channel attention module and a decoder module, the encoder module is provided with a plurality of encoder layers; the method includes: Acquire a speech signal to be recognized; For each of the encoder layers, performing feature extraction processing on the speech signal to be recognized based on the encoder layer to obtain speech features; Performing local feature extraction on the plurality of speech features based on the shared convolution module to obtain a plurality of local speech features; Based on the splicing module, a plurality of the local speech features are spliced to obtain a spliced acoustic feature; Based on the channel attention module, channel weight calculation processing is performed on the spliced acoustic features to obtain optimized acoustic features; The optimized acoustic features are converted and processed based on the decoder module to obtain speech recognition information.
2. The speech recognition method according to claim 1, It is characterized in that The shared convolution module includes a convolution layer, a pooling layer and a fully connected layer, and the local feature extraction is performed on the multiple speech features based on the shared convolution module to obtain multiple local speech features, including: Performing convolution processing on the plurality of speech features based on the convolution layer to obtain speech convolution features; Downsampling the speech convolution feature based on the pooling layer to obtain a simplified speech feature; The simplified speech features are classified and processed based on the fully connected layer to obtain a plurality of local speech features.
3. The speech recognition method according to claim 1, It is characterized in that The channel weight calculation process is performed on the spliced acoustic features based on the channel attention module to obtain optimized acoustic features, including: Performing an average pooling operation on the concatenated acoustic features in a channel dimension to obtain a plurality of channel pooling features; Performing weight calculation on a plurality of the channel pooling features to obtain a plurality of channel weight values; Determining a representative acoustic feature according to the concatenated acoustic feature and a plurality of the channel weight values; The representative acoustic features are summed up in the channel dimension to obtain the optimized acoustic features.
4. The speech recognition method according to claim 1, It is characterized in that The decoder module includes a masked attention layer, a multi-head attention layer and a feedforward network layer, and the decoder module is based on the optimized acoustic features to convert and process the speech recognition information, including: generating a first attention matrix according to the masked attention layer and the optimized acoustic features; Determining a second attention matrix according to the first attention matrix, the optimized acoustic features, and the multi-head attention layer; The second attention matrix is decoded according to the feedforward network layer to obtain the speech recognition information.
5. The speech recognition method according to claim 1, It is characterized in that After converting the optimized acoustic features based on the decoder module to obtain speech recognition information, the method further includes: Performing semantic recognition processing on the speech recognition information to obtain semantic recognition information; Performing keyword recognition processing on the semantic recognition information to obtain keyword information; The question feedback result is determined according to the keyword information and a preset answer database.
6. The speech recognition method according to claim 5, It is characterized in that The answer database includes key information and feedback content corresponding to the key information, and determining the question feedback result according to the keyword information and the preset answer database includes: Matching the keyword information with the key value information; In the case of successful matching, the feedback content corresponding to the key-value information matching the keyword information is determined as the question feedback result.
7. The speech recognition method according to claim 6, It is characterized in that After matching the keyword information with the key value information, the method further includes: In the case of unsuccessful matching, a preset unsuccessful answer example in the answer database is determined as the question feedback result.
8. A speech recognition device, It is characterized in that The invention comprises a speech recognition model, wherein the speech recognition model comprises an encoder module, a shared convolution module, a concatenation module, a channel attention module and a decoder module, wherein the encoder module is provided with a plurality of encoder layers; and the speech recognition device comprises: A first processing module, used for acquiring a speech signal to be recognized; A second processing module is used for performing feature extraction processing on the speech signal to be recognized based on the encoder layer for each encoder layer to obtain speech features; A third processing module, configured to perform local feature extraction on the plurality of speech features based on the shared convolution module to obtain a plurality of local speech features; A fourth processing module, configured to perform splicing processing on the plurality of local speech features based on the splicing module to obtain a spliced acoustic feature; A fifth processing module, configured to perform channel weight calculation processing on the concatenated acoustic features based on the channel attention module to obtain optimized acoustic features; The sixth processing module is used to convert the optimized acoustic features based on the decoder module to obtain speech recognition information.
9. An electronic device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the speech recognition method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing computer-executable instructions, It is characterized in that The computer executable instructions are used to execute the speech recognition method described in any one of claims 1 to 7.
Citation Information
Cited By
Image transmission method, electronic device, storage medium and computer program product
CN121531135A
Image transmission methods, electronic devices, storage media, and computer program products
CN121531135B
