Method and device for constructing speech recognition model and method and device for speech recognition
By enhancing audio and text data to train acoustic and language models, and combining it with a specific neural network structure, a speech recognition model is built, which solves the problem of low accuracy of mixed language speech recognition and achieves high-accuracy recognition and cost reduction under limited data. .
Patent Information
- Application Number
- CN202410544270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-06
AI Technical Summary
Existing mixed-language speech recognition models suffer from low recognition accuracy when modeling multiple languages. This is mainly due to differences in different languages and insufficient training data, making it difficult to effectively build high-accuracy models.
By acquiring and enhancing audio training data and text training data, the acoustic model and language model are trained respectively, and a speech recognition model is built based on the combination of these models, using structures such as multi-head self-attention modules, convolution modules, and forward feedback modules, combined with Features such as Fbank features and MFCC features are extracted to generate a speech recognition model to improve recognition accuracy.
In the case of limited training data, the recognition accuracy of the hybrid speech recognition model is improved, the manpower and material costs in the process of obtaining training data and model training are reduced, and the effect of multilingual speech recognition is improved.
Smart Images

Figure CN118136002B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of speech recognition, and more specifically to a method, a computer device, a computer-readable storage medium for constructing a speech recognition model, and a method, a computer device, and a computer-readable storage medium for speech recognition. Background Art
[0002] Automatic Speech Recognition (ASR) is a technology that converts speech data into corresponding text or symbols. Automatic speech recognition technology has been widely used in daily life, for example, translation between speech in different languages, voice interaction between electronic devices and users, and conversion of instant speech input into text information.
[0003] With the development of globalization, mixed languages are used for communication in more and more scenarios. Therefore, mixed language recognition models have gradually developed into an important research direction of automatic speech recognition technology. At present, mixed language recognition models can be constructed through various neural network structures such as deep neural networks, convolutional neural networks, and time recursive neural networks.
[0004] However, it is not easy to model multiple languages simultaneously in a neural network structure, because different languages (e.g., Chinese, English, etc.) have significant differences in modeling units, pronunciation methods, etc. In addition, it is difficult to collect enough mixed language training data to train the neural network model even with a lot of manpower and material resources. Therefore, the recognition accuracy of the current mixed language recognition model is low. Summary of the invention
[0005] In order to solve or at least alleviate one or more of the above problems, the following technical solutions are provided.
[0006] According to a first aspect of the present application, a method for constructing a speech recognition model is provided, the method comprising the following steps: acquiring audio training data and text training data, the audio training data comprising enhanced extracted features of audio data and speech recognition tags corresponding to the audio data, and the text training data comprising enhanced text data; training an acoustic model using the audio training data to obtain a trained acoustic model, and training a language model using the text training data to obtain a trained language model; and constructing the speech recognition model based on a fusion of one or more combinations of the trained acoustic model and the trained language model.
[0007] According to the method for constructing a speech recognition model described in one embodiment of the present application, the audio training data and the text training data each include at least training data in a first language, training data in a second language, and mixed training data in the first language and the second language.
[0008] According to the method for constructing a speech recognition model described in one embodiment or any of the above embodiments of the present application, the enhanced audio data in the audio training data is generated by one or more of the following methods: adjusting the audio speed of the original audio data to generate the enhanced audio data based on one or more audio data having an audio speed different from the original audio data; adjusting the volume of the original audio data to generate the enhanced audio data based on one or more audio data having a volume different from the original audio data; performing spectral enhancement processing on the original audio data to generate the enhanced audio data; and processing the text training data using a text-to-speech model to generate the enhanced audio data.
[0009] According to the method for constructing a speech recognition model according to one embodiment of the present application or any of the above embodiments, the extracted features of the enhanced audio data include one or more of the following: Fbank features, MFCC features, and PNCC features.
[0010] According to the method for building a speech recognition model according to one embodiment of the present application or any of the above embodiments, the enhanced text data in the text training data is generated in the following manner: multiple sentences arranged in chronological order in the same conversation are randomly combined in pairs to obtain the enhanced text data.
[0011] According to the method for constructing a speech recognition model according to one embodiment of the present application or any of the above embodiments, the acoustic model is a perceptual language coding model or a hybrid expert model, and the language model is a built-in language model or a long-context language model.
[0012] According to the method for constructing a speech recognition model according to one embodiment of the present application or any one of the above embodiments, the acoustic model includes multiple hybrid expert sub-models or multiple perceptual language coding sub-models, and each of the multiple hybrid expert sub-models or multiple perceptual language coding sub-models includes: a multi-head self-attention module, which is used to obtain the attention output features of the audio training data to extract the global context information of the audio training data based on the attention output features; and a convolution module, which is used to obtain the audio convolution features of the audio training data at least based on the attention output features of the audio training data to extract the local feature information of the audio training data based on the audio convolution features.
[0013] According to the method for constructing a speech recognition model according to one embodiment of the present application or any of the above embodiments, each of the multiple hybrid expert sub-models or the multiple perceptual language coding sub-models includes: a first forward feedback module, which is used to perform linear transformation and nonlinear mapping on the audio regularization features output by the regular network layer to obtain the first transformation features of the audio training data; a second forward feedback module, which is used to perform linear transformation and nonlinear mapping on the fusion features of the audio convolution features to obtain the second transformation features of the audio training data.
[0014] According to the method for constructing a speech recognition model according to one embodiment of the present application or any of the above embodiments, each of the multiple hybrid expert sub-models includes: a first language feed-forward neural network, which is used to process the fused features of the second transformed features of the audio training data associated with the first language to generate a first language vector; a second language feed-forward neural network, which is used to process the fused features of the second transformed features of the audio training data associated with the second language to generate a second language vector.
[0015] According to the method for constructing a speech recognition model according to one embodiment of the present application or any one of the above embodiments, each of the multiple perceptual language coding sub-models includes: a shared encoder, which is used to encode the fusion features of the second transformation features of the audio training data to generate shared coding information; a first language encoder, which is used to encode the shared coding information to generate first language coding information; a second language encoder, which is used to encode the shared coding information to generate second language coding information; and a gating network, which is used to selectively use the first language coding information or the second language coding information as the output coding information of the current frame at least based on the output coding information of the previous frame.
[0016] According to the method for constructing a speech recognition model described in one embodiment of the present application or any of the above embodiments, constructing the speech recognition model based on the fusion of one or more combinations of a trained acoustic model and a trained language model includes: combining a trained perceptual language coding model with a built-in language model to generate a first combined model; combining a trained hybrid expert model with a long-context language model to generate a second combined model; and fusing the first combined model with the second combined model to construct the speech recognition model.
[0017] According to the second aspect of the present application, a computer device for constructing a speech recognition model is provided, the computer device comprising: a memory; a processor coupled to the memory; and a computer program stored on the memory and running on the processor, the running of the computer program resulting in the execution of the steps of the method for constructing a speech recognition model according to the first aspect of the present application.
[0018] According to a third aspect of the present application, a computer storage medium is provided, which includes instructions, and the instructions, when run, execute the steps of the method for constructing a speech recognition model according to the first aspect of the present application.
[0019] According to the fourth aspect of the present application, a method for speech recognition is provided, the method comprising the following steps: acquiring feature data of input speech, the input speech comprising speech data in multiple languages; inputting the feature data into a speech recognition model constructed according to the method for constructing a speech recognition model described in the first aspect of the present application to obtain a speech recognition result.
[0020] According to the method of speech recognition described in one embodiment of the present application, inputting the feature data into the speech recognition model to obtain a speech recognition result includes: inputting the feature data into a first combination model of the speech recognition model to obtain a first recognition result; inputting the feature data into a second combination model of the speech recognition model to obtain a second recognition result; and obtaining the speech recognition result based on the fusion of the first recognition result and the second recognition result.
[0021] According to the method of speech recognition described in one embodiment of the present application or any of the above embodiments, the fusion of the first recognition result and the second recognition result to obtain the speech recognition result includes: using a first weight and a second weight to perform weighted summation on the speech recognition result of the first language and the speech recognition result of the second language respectively; and obtaining the speech recognition result based on the weighted summation result.
[0022] According to the method of speech recognition according to one embodiment of the present application or any of the above embodiments, the first weight and the second weight are determined by testing the speech recognition model using a test data set.
[0023] According to the fifth aspect of the present application, a computer device for language recognition is provided, the computer device comprising: a memory; a processor coupled to the memory; and a computer program stored on the memory and running on the processor, the running of the computer program resulting in the execution of the steps of the method for speech recognition according to the fourth aspect of the present application.
[0024] According to a sixth aspect of the present application, a computer storage medium is provided, which includes instructions, and the instructions, when run, execute the steps of the method for speech recognition according to the fourth aspect of the present application.
[0025] The solution for constructing a speech recognition model according to one or more embodiments of the present application trains an acoustic model and a language model respectively through enhanced audio data and text data, and constructs a speech recognition model based on the fusion of one or more combinations of the trained acoustic model and the trained language model, thereby improving the recognition accuracy of the hybrid speech recognition model with limited training data and reducing the manpower and material costs consumed in obtaining training data and the model training process. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and / or other aspects and advantages of the present application will become clearer and easier to understand through the following description of various aspects in conjunction with the accompanying drawings, in which the same or similar units are represented by the same reference numerals. The accompanying drawings include:
[0027] Figure 1 A flowchart of a method for constructing a speech recognition model according to one or more embodiments of the present application is shown.
[0028] Figure 2 A schematic block diagram of an acoustic model according to an embodiment of the present application is shown.
[0029] Figure 3 A schematic block diagram of an acoustic model according to another embodiment of the present application is shown.
[0030] Figure 4 A schematic block diagram of a speech recognition model constructed according to one or more embodiments of the present application is shown.
[0031] Figure 5 A flowchart of a method for speech recognition according to one or more embodiments of the present application is shown.
[0032] Figure 6 A schematic block diagram of a computer device for building a speech recognition model according to one or more embodiments of the present application is shown.
[0033] Figure 7 A schematic block diagram of a computer device for language recognition according to one or more embodiments of the present application is shown. DETAILED DESCRIPTION
[0034] The present application is described more fully below with reference to the accompanying drawings in which illustrative embodiments of the present application are illustrated. However, the present application may be implemented in different forms and should not be interpreted as being limited to the embodiments given herein. The above embodiments are given to make the disclosure herein comprehensive and complete, so as to more fully convey the scope of protection of the present application to those skilled in the art.
[0035] In this specification, terms such as "comprise" and "include" indicate that in addition to the units and steps directly and explicitly stated in the specification and claims, the technical solution of the present application does not exclude the situation where there are other units and steps that are not directly or explicitly stated.
[0036] Unless otherwise specified, terms such as "first" and "second" do not indicate the order of the units in terms of time, space, size, etc., but are merely used to distinguish the units.
[0037] Hereinafter, various exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings.
[0038] Figure 1 A flowchart of a method for constructing a speech recognition model according to one or more embodiments of the present application is shown.
[0039] like Figure 1 As shown in , in step S101, audio training data and text training data are obtained, the audio training data includes enhanced extracted features of audio data and speech recognition tags corresponding to the audio data, and the text training data includes enhanced text data.
[0040] In one embodiment, enhanced audio data can be generated by one or more of the following methods: adjusting the audio speed of the original audio data to generate the enhanced audio data based on one or more audio data having an audio speed different from the original audio data; adjusting the volume of the original audio data to generate enhanced audio data based on one or more audio data having a volume different from the original audio data; performing spectrum enhancement processing on the original audio data to generate enhanced audio data; and processing text training data using a text-to-speech (TTS) model to generate enhanced audio data. Exemplarily, original audio data with a duration of 10,000 hours can be collected, and by adjusting the audio speed of the original audio data, audio data with 0.9 times, 1 times, and 1.1 times the audio speed of the original audio data can be obtained as enhanced audio data. Exemplarily, the volume can be adjusted within the preset parameter [-40,40] range using the Sox audio operation tool to generate enhanced audio data. Exemplarily, the original audio data can be subjected to spectrum enhancement processing to generate enhanced audio data by time warping, frequency channel masking, time step masking, etc. Exemplarily, the text training data can be processed using a pre-trained TTS model to generate enhanced audio data. In one embodiment, multiple sentences in the same conversation arranged in chronological order can be randomly combined in pairs to obtain enhanced text data. By enhancing the audio training data and text training data, it is possible to obtain several times more training data than the existing training data, which is beneficial to improve the recognition accuracy of the trained speech recognition model and reduce the manpower and material costs of obtaining training data.
[0041] In one embodiment, the extracted features of the enhanced audio data may include Fbank (Filter Bank) features, MFCC (Mel-scale Frequency Cepstral Coefficients) features, PNCC (Perceptual Nonlinear Complex Cepstrum) features, etc. Exemplarily, the Fbank features can be extracted by filtering and calculating the energy of the enhanced audio data. Specifically, the enhanced audio data can be pre-emphasized first, that is, the signal is high-pass filtered to enhance the high-frequency components in the time domain. Then the pre-emphasized audio signal is divided into short-time segments, each segment, for example, containing 20-40 milliseconds of audio data, and then a window function (such as a Hamming window, a Hamming window, etc.) is applied to each segment to obtain a window frame. Then, each window frame can be fast Fourier transformed to convert the time domain signal into a frequency domain signal, and the frequency domain signal is filtered through a set of Mel filters, which have different passband and stopband characteristics in different frequency ranges. Then, the signal output by each filter can be squared and accumulated to obtain an energy value to capture the energy values in different frequency ranges. Finally, the energy value may be logarithmically operated to obtain the spectral energy distribution of the audio signal as the Fbank feature. Exemplarily, the Fbank feature may be subjected to discrete cosine transform (DCT) to obtain the MFCC feature. In one embodiment, the speech recognition tag corresponding to the audio data may include phonemes, syllables, semi-syllables, etc. of the audio data.
[0042] Optionally, in step S101, the audio training data and the text training data may each include training data in multiple languages and mixed training data thereof, for example, each may include at least training data in a first language, training data in a second language, and mixed training data in the first language and the second language.
[0043] In step S103, the acoustic model is trained using the audio training data to obtain a trained acoustic model, and the language model is trained using the text training data to obtain a trained language model.
[0044] Optionally, the acoustic model can be implemented as a Language-Aware Encoder model or a Mixture of Export model, and the language model can be implemented as an Internal Language model or a Long Context Language model. During the training of the acoustic model using audio training data, the acoustic model is used to learn at least the global context information and local feature information of the audio training data.
[0045] In step S105, a speech recognition model is constructed based on the fusion of the trained acoustic model and one or more combinations of the trained language model.
[0046] Optionally, in step S105, the trained perceptual language coding model and the built-in language model may be combined to generate a first combined model, the trained hybrid expert model and the long-context language model may be combined to generate a second combined model, and the first combined model and the second combined model may be fused to construct a speech recognition model. Alternatively, the trained perceptual language coding model and the long-context language model may be combined to generate a first combined model, the trained hybrid expert model and the built-in language model may be combined to generate a second combined model, and the first combined model and the second combined model may be fused to construct a speech recognition model. Optionally, a pronunciation dictionary may be used to connect the trained acoustic model and the trained language model during the combination process, and the pronunciation dictionary may include a mapping between words or terms and phonemes.
[0047] In one embodiment, the trained acoustic model can generate a phoneme sequence (for example, a pinyin sequence and a consonant and vowel sequence in Chinese) based on the feature data of the input speech, for example, "da3 kai1 yin1 yue4 bo1 fang4qi4", which can be understood as realizing the mapping from the feature data of the input speech to the phoneme sequence. In one embodiment, the trained language model can generate a corresponding text sequence based on the phoneme sequence, for example, the corresponding text sequence "open the music player" is generated based on the phoneme sequence "da3kai1yin1 yue4 bo1 fang4 qi4". Thus, the trained acoustic model and the trained language model can be combined using a pronunciation dictionary that pre-stores the mapping between words or phrases and phonemes.
[0048] In one embodiment, a multi-system fusion method based on ROVER (Recognizer Output Voting Error Reduction) can be used to fuse one or more combinations of trained acoustic models and trained language models, so as to make a final decision based on the output results of each combination of trained acoustic model and trained language model, thereby significantly reducing the mixed error rate (Mix Error Rate, MER) of the recognition results.
[0049] According to one or more embodiments of the present application, the method for constructing a speech recognition model trains the acoustic model and the language model respectively through enhanced audio data and text data, and constructs the speech recognition model based on the fusion of one or more combinations of the trained acoustic model and the trained language model, thereby improving the recognition accuracy of the hybrid speech recognition model with limited training data and reducing the manpower and material costs consumed in obtaining training data and the model training process.
[0050] The following combination Figure 2-4 The schematic structures of the acoustic model and the constructed speech recognition model according to one or more embodiments of the present application are described respectively.
[0051] Figure 2 A schematic block diagram of an acoustic model according to an embodiment of the present application is shown.
[0052] like Figure 2 As shown in , the acoustic model 200 includes an enhancement module 210, a convolutional downsampling module 220, a linear network layer 230, a regular network layer 240, and multiple (e.g., Figure 2 Shown in FIG. 1 are N) mixed expert sub-models 250.
[0053] The enhancement module 210 is used to perform enhancement operations and feature extraction operations on the input audio data to obtain extracted features of the enhanced audio data.
[0054] Optionally, the enhancement module 210 may perform enhancement operations on the input audio data including one or more of the following operations: adjusting the audio speed of the input audio data to generate enhanced audio data based on one or more audio data having an audio speed different from the input audio data; adjusting the volume of the input audio data to generate enhanced audio data based on one or more audio data having a volume different from the input audio data; performing spectrum enhancement processing on the input audio data to generate enhanced audio data; and processing text training data using a text-to-speech (TTS) model to generate enhanced audio data. Optionally, the extracted features of the enhanced audio data may include Fbank features, MFCC features, PNCC features, etc.
[0055] The convolution down-sampling module 220 is used to process the extracted features of the enhanced audio data to obtain audio sample features.
[0056] The linear network layer 230 is used to perform linear transformation processing on the audio sample features to obtain linear transformation features, wherein the linear network layer 230 can be implemented as one or more fully connected layers to map the audio sample features to the feature space of the next layer.
[0057] The regular network layer 240 is used to regularize the linear transformation features to obtain audio regularization features. Optionally, the regular network layer 240 can be implemented as a BN (Batch Normalization) layer, an LN (LayerNorm) layer, an IN (InstanceNorm) layer, a GN (GroupNorm) layer, a Dropout layer, etc., to stabilize the model training and prevent the network from overfitting.
[0058] Continue as Figure 2 As shown in , each mixed expert sub-model 250 includes a first feedforward module 2501, a multi-head self-attention module 2502, a convolution module 2503, a second feedforward module 2504, a first language feedforward neural network 2505, a second language feedforward neural network 2506 and a normalization layer 2507. A multi-head self-attention module 2502 and a convolution module 2503 are connected between the first feedback-forward module 2501 and the second feedback-forward module 2504, wherein each of the first feedback-forward module 2501 and the second feedback-forward module 2504 can output half of the value, that is, the output features of the first feedback-forward module 2501 and the second feedback-forward module 2504 are multiplied by one half before being input into the next module. For example, the output features of the first feedback-forward module 2501 are multiplied by one half before being input into the multi-head self-attention module 2502, and the output features of the second feedback-forward module 2504 are multiplied by one half before being input into the first language forward neural network 2505 and the second language forward neural network 2506.
[0059] The first forward feedback module 2501 is used to perform linear transformation and nonlinear mapping on the audio regularization feature output by the regular network layer 240 to obtain the first transformation feature of the audio training data. The multi-head self-attention module 2502 is used to obtain the attention output feature of the audio training data to extract the global context information of the audio training data based on the attention output feature, wherein the input of the multi-head self-attention module 2502 can be a combination of the first transformation feature of the audio training data and the audio regularization feature. The convolution module 2503 is used to obtain the audio convolution feature of the audio training data based on at least the attention output feature of the audio training data to extract the local feature information of the audio training data based on the audio convolution feature, wherein the input of the convolution module 2503 can be a combination of the attention output feature and the input of the multi-head self-attention module 2502. The second forward feedback module 2504 is used to perform linear transformation and nonlinear mapping on the fusion feature of the audio convolution feature to obtain the second transformation feature of the audio training data, wherein the input of the second forward feedback module 2504 (i.e., the fusion feature of the audio convolution feature) can be a combination of the audio convolution feature and the input of the convolution module 2503. The first language feed-forward neural network 2505 is used to process the fused features of the second transformed features of the audio training data associated with the first language to generate a first language vector, and the second language feed-forward neural network 2506 is used to process the fused features of the second transformed features of the audio training data associated with the second language to generate a second language vector, wherein the fused features of the second transformed features of the audio training data can be a combination of the second transformed features of the audio training data and the input of the second forward feedback module 2504. The normalization layer 2507 is used to normalize the selective output results based on the first language vector and the second language vector.
[0060] Figure 3 A schematic block diagram of an acoustic model according to another embodiment of the present application is shown.
[0061] like Figure 3 As shown in , the acoustic model 300 includes an enhancement module 310, a convolutional downsampling module 320, a linear network layer 330, a regular network layer 340, and multiple (e.g., Figure 3 Shown in FIG. 1 are N) perceptual language encoding sub-models 350.
[0062] The enhancement module 310 is used to perform enhancement operations and feature extraction operations on the input audio data to obtain extracted features of the enhanced audio data.
[0063] The convolution down-sampling module 320 is used to process the extracted features of the enhanced audio data to obtain audio sample features.
[0064] The linear network layer 330 is used to perform linear transformation processing on the audio sample features to obtain linear transformation features, wherein the linear network layer 330 can be implemented as one or more fully connected layers to map the audio sample features to the feature space of the next layer.
[0065] The regularized network layer 340 is used to perform regularization processing on the linear transformation features to obtain audio regularized features.
[0066] Continue as Figure 3 As shown in , each perceptual language encoding sub-model 350 includes a first feedforward module 3501, a multi-head self-attention module 3502, a convolution module 3503, a second feedforward module 3504, a shared encoder 3505, a first language encoder 3506, a second language encoder 3507, a gating network 3508 and a normalization layer 3509. A multi-head self-attention module 3502 and a convolution module 3503 are connected between the first feedback-forward module 3501 and the second feedback-forward module 3504, wherein each of the first feedback-forward module 3501 and the second feedback-forward module 3504 can output half of the value, that is, the output features of the first feedback-forward module 3501 and the second feedback-forward module 3504 are multiplied by one half before being input into the next module. For example, the output features of the first feedback-forward module 3501 are multiplied by one half and then input into the multi-head self-attention module 3502, and the output features of the second feedback-forward module 3504 are multiplied by one half and then input into the shared encoder 3505.
[0067] The first forward feedback module 3501 is used to perform linear transformation and nonlinear mapping on the audio regularization feature output by the regular network layer 340 to obtain the first transformation feature of the audio training data. The multi-head self-attention module 3502 is used to obtain the attention output feature of the audio training data to extract the global context information of the audio training data based on the attention output feature, wherein the input of the multi-head self-attention module 3502 can be a combination of the first transformation feature of the audio training data and the audio regularization feature. The convolution module 3503 is used to obtain the audio convolution feature of the audio training data based on at least the attention output feature of the audio training data to extract the local feature information of the audio training data based on the audio convolution feature, wherein the input of the convolution module 3503 can be a combination of the attention output feature and the input of the multi-head self-attention module 3502. The second forward feedback module 3504 is used to perform linear transformation and nonlinear mapping on the fusion feature of the audio convolution feature to obtain the second transformation feature of the audio training data, wherein the input of the second forward feedback module 3504 (i.e., the fusion feature of the audio convolution feature) can be a combination of the audio convolution feature and the input of the convolution module 3503. The shared encoder 3505 is used to encode the fused features of the second transformed features of the audio training data to generate shared encoded information, wherein the fused features of the second transformed features of the audio training data can be a combination of the second transformed features of the audio training data and the input of the second forward feedback module 3504. The first language encoder 3506 is used to encode the shared encoded information to generate first language encoded information, the second language encoder 3507 is used to encode the shared encoded information to generate second language encoded information, and the gating network 3508 is used to selectively use the first language encoded information or the second language encoded information as the output encoded information of the current frame based on at least the output encoded information of the previous frame. The normalization layer 3509 is used to normalize the output encoded information of the current frame.
[0068] Figure 4 A schematic block diagram of a speech recognition model constructed according to one or more embodiments of the present application is shown.
[0069] like Figure 4 As shown in the figure, the speech recognition model 400 constructed according to one or more embodiments of the present application includes a combined recognition model 410, a combined recognition model 420 and a fusion model 430, wherein the combined recognition model 410 includes a perceptual language coding model 4101 and a built-in language model 4102, and the combined recognition model 420 includes a hybrid expert model 4201 and a long-context language model 4202.
[0070] The combined recognition model 410 is configured to generate a first recognition result based on the input speech, the combined recognition model 420 is configured to generate a second recognition result based on the input speech, and the fusion model 430 is configured to fuse the first recognition result and the second recognition result to obtain a speech recognition result. Optionally, the first recognition result and the second recognition result may each include the recognized characters and their corresponding probability values, for example, the first recognition result may include character A and its corresponding probability value 0.9, character B and its corresponding probability value 0.8, and the second recognition result may include character A and its corresponding probability value 0.8, character D and its corresponding probability value 0.9.
[0071] In one embodiment, the fusion model 430 may use a multi-system fusion method based on ROVER (Recognizer Output Voting Error Reduction) to fuse the first recognition result and the second recognition result to obtain a speech recognition result, for example, the speech recognition result is character A and character B. In one embodiment, during the fusion process, the fusion model 430 may use different weights to perform unbalanced weighting on the recognition results of the combined recognition model 410 and the combined recognition model 420, for example, weighting and summing the above-mentioned first recognition result and the second recognition result using weights of 0.6 and 0.4 respectively, to obtain a weighted sum probability of 0.86 for character A, a weighted sum probability of 0.48 for character B, and a weighted sum probability of 0.36 for character D, thereby determining that the speech recognition results are character A and character B.
[0072] In one embodiment, weights may be pre-assigned to the recognition results of the combined recognition model 410 and the combined recognition model 420 and the accuracy of the constructed speech recognition model 400 may be tested using a test set to determine the weight corresponding to each combined recognition model in different application scenarios (e.g., scenarios with different mixing ratios of different languages). Alternatively, the constructed speech recognition model may include three or more combined recognition models, and the mixing ratios of different languages in the mixed training data of each combined recognition model may be different, so that the constructed speech recognition model can achieve high recognition accuracy in various application scenarios. As an example, the combined recognition model 410 and the combined recognition model 420 may be trained respectively using at least mixed training data of a mixture of Chinese and English, wherein the proportion of Chinese in the mixed training data of the combined recognition model 410 is higher, and the proportion of English in the mixed training data of the combined recognition model 420 is higher. When using the combined recognition model 410 and the combined recognition model 420 for speech recognition, different weights can be used to unbalance the recognition results of the combined recognition model 410 and the combined recognition model 420 based on the different proportions of Chinese and English speech in the recognition scenario. For example, when the proportion of Chinese speech is higher in the recognition scenario, a greater weight is assigned to the combined recognition model 410 than to the combined recognition model 420; and when the proportion of English speech is higher in the recognition scenario, a smaller weight is assigned to the combined recognition model 410 than to the combined recognition model 420.
[0073] It should be noted that Figure 4 The combined recognition model 410 and the combined recognition model 420 are only schematically illustrated, but without departing from the spirit and scope of the present application, the speech recognition model 400 may include more combined recognition models, each of which is recognized as a combination of an acoustic model and a language model.
[0074] Figure 5 A flowchart of a method for speech recognition according to one or more embodiments of the present application is shown.
[0075] like Figure 5 As shown in , in step S501, feature data of input speech is acquired, and the input speech includes speech data in multiple languages.
[0076] Optionally, the feature data of the input speech may include Fbank features, MFCC features, PNCC features, etc.
[0077] In step S503, the feature data is input into a speech recognition model constructed according to the method for constructing a speech recognition model according to one or more embodiments of the present application to obtain a speech recognition result.
[0078] Optionally, in step S503, the feature data may be input into a first combination model of the speech recognition model to obtain a first recognition result, the feature data may be input into a second combination model of the speech recognition model to obtain a second recognition result, and the speech recognition result may be obtained based on the fusion of the first recognition result and the second recognition result. Optionally, the first combination model of the speech recognition model may include a perceptual language coding model and a built-in language model, and the second combination model of the speech recognition model may include a hybrid expert model and a long-context language model.
[0079] In one embodiment, the first weight and the second weight may be used to perform weighted summation on the speech recognition result of the first language and the speech recognition result of the second language, respectively, and the speech recognition result may be obtained based on the weighted summation result.
[0080] In one embodiment, the speech recognition model constructed according to the method for constructing a speech recognition model of one or more embodiments of the present application may include three combined recognition models, which respectively output a first recognition result, a second recognition result, and a third recognition result. The first recognition result, the second recognition result, and the third recognition result may be weighted and summed using different weights, and the speech recognition result may be obtained based on the weighted summation result. Exemplarily, the first recognition result may include character A and its corresponding probability value 0.9, character B and its corresponding probability value 0.8, the second recognition result may include character A and its corresponding probability value 0.8, character D and its corresponding probability value 0.9, and the third recognition result may include character A and its corresponding probability value 0.9, character B and its corresponding probability value 0.9. The above speech recognition results may be weighted and summed using weights 0.3, 0.3, and 0.4, respectively, to obtain a weighted sum probability of 0.87 for character A, a weighted sum probability of 0.6 for character B, and a weighted sum probability of 0.27 for character D, thereby determining that the speech recognition results are character A and character B. In one embodiment, the weight for each recognition result can be determined by a combination of one or more of the following methods: pre-assigning weights to the output results of each combined recognition model and using a test set to test the accuracy of the constructed speech recognition model to select the weight corresponding to each combined recognition model when the accuracy is the highest; based on the mixing ratio of different languages in the mixed training data of each combined recognition model and the mixing ratio of different languages of the mixed speech in the current speech recognition scenario.
[0081] The speech recognition method according to one or more embodiments of the present application can be applied to the recognition scenario of mixed speech of multiple languages, thereby improving the accuracy of the multilingual speech recognition results and facilitating promotion and application.
[0082] Figure 6A schematic block diagram of a computer device for building a speech recognition model according to one or more embodiments of the present application is shown.
[0083] like Figure 6 As shown in FIG. 6 , a computer device 60 for constructing a speech recognition model includes a memory 610, a processor 620, and a computer program 630 stored in the memory 610 and executable on the processor 620. The processor 620 executes the computer program 630 to implement a method for constructing a speech recognition model according to one aspect of the present application.
[0084] Figure 7 A schematic block diagram of a computer device for language recognition according to one or more embodiments of the present application is shown.
[0085] like Figure 7 As shown in FIG. 7 , the computer device 70 for speech recognition includes a memory 710, a processor 720, and a computer program 730 stored in the memory 710 and executable on the processor 720. The processor 720 executes the computer program 730 to implement a method for speech recognition according to one aspect of the present application.
[0086] In addition, the present application may also be implemented as a computer storage medium, in which a program for causing a computer to execute a method for constructing a speech recognition model according to one aspect of the present application is stored. In addition, the present application may also be implemented as a computer storage medium, in which a program for causing a computer to execute a method for language recognition according to one aspect of the present application is stored.
[0087] Computer storage media can be implemented as disks (e.g., magnetic disks, optical disks, etc.), cards (e.g., memory cards, optical cards, etc.), semiconductor memories (e.g., ROM, non-volatile memory, etc.), tapes (e.g., magnetic tapes, cassettes, etc.), etc.
[0088] In the applicable situation, hardware, software or a combination of hardware and software can be used to realize the various embodiments provided by the application. Moreover, in the applicable situation, without departing from the scope of the application, the various hardware components and / or software components set forth herein can be combined into a composite component comprising software, hardware and / or both. In the applicable situation, without departing from the scope of the application, the various hardware components and / or software components set forth herein can be divided into subcomponents comprising software, hardware or both. In addition, in the applicable situation, it is contemplated that the software component can be implemented as a hardware component, and vice versa.
[0089] Software according to the present application (such as program code and / or data) can be stored on one or more computer storage media. It is also contemplated that the software identified herein can be implemented using one or more general or special-purpose computers and / or computer systems, networked and / or otherwise. Where applicable, the order of the various steps described herein can be changed, combined into composite steps, and / or divided into sub-steps to provide the features described herein.
[0090] The embodiments and examples set forth herein are provided to best illustrate embodiments according to the present application and its specific applications, and thereby enable those skilled in the art to implement and use the present application. However, those skilled in the art will appreciate that the above description and examples are provided only for ease of illustration and example. The description set forth is not intended to cover all aspects of the present application or to limit the present application to the precise form disclosed.
Claims
1. A method for constructing a speech recognition model, characterized in that: The method comprises the following steps: Acquire audio training data and text training data, wherein the audio training data includes enhanced extracted features of audio data and speech recognition tags corresponding to the audio data, and the text training data includes enhanced text data; Using the audio training data to train the acoustic model to obtain a trained acoustic model, and using the text training data to train the language model to obtain a trained language model; as well as The speech recognition model is constructed based on the fusion of one or more combinations of a trained acoustic model and a trained language model, wherein the acoustic model is a perceptual language coding model or a hybrid expert model, and the language model is a built-in language model or a long-context language model, The method of constructing the speech recognition model based on the fusion of one or more combinations of the trained acoustic model and the trained language model includes: combining the trained perceptual language encoding model with the built-in language model to generate a first combined model; combining the trained hybrid expert model with the long-context language model to generate a second combined model; and The first combined model and the second combined model are fused to construct the speech recognition model.
2. The method according to claim 1, wherein the audio training data and the text training data each include at least training data in a first language, training data in a second language, and mixed training data in the first language and the second language.
3. The method according to claim 1, wherein the enhanced audio data in the audio training data is generated by one or more of the following ways: adjusting an audio speed of the original audio data to generate the enhanced audio data based on one or more audio data having an audio speed different from that of the original audio data; adjusting the volume of the original audio data to generate the enhanced audio data based on one or more audio data having a volume different from the original audio data; Performing spectrum enhancement processing on the original audio data to generate the enhanced audio data; as well as The text training data is processed using a text-to-speech model to generate the enhanced audio data. 4 . The method according to claim 1 , wherein the extracted features of the enhanced audio data include one or more of the following: Fbank features, MFCC features, and PNCC features.
5. The method according to claim 1, wherein the enhanced text data in the text training data is generated by: A plurality of sentences in the same conversation arranged in chronological order are randomly combined in pairs to obtain the enhanced text data.
6. The method according to claim 1, wherein the acoustic model comprises a plurality of mixed expert sub-models or a plurality of perceptual language coding sub-models, each of the plurality of mixed expert sub-models or the plurality of perceptual language coding sub-models comprising: a multi-head self-attention module, which is used to obtain the attention output features of the audio training data to extract global context information of the audio training data based on the attention output features; as well as A convolution module is used to obtain an audio convolution feature of the audio training data based on at least the attention output feature of the audio training data to extract local feature information of the audio training data based on the audio convolution feature.
7. The method of claim 6, wherein each of the plurality of hybrid expert sub-models or the plurality of perceptual language coding sub-models comprises: A first forward feedback module, which is used to perform linear transformation and nonlinear mapping on the audio regularization features output by the regular network layer to obtain a first transformation feature of the audio training data; The second forward feedback module is used to perform linear transformation and nonlinear mapping on the fusion features of the audio convolution features to obtain second transformation features of the audio training data.
8. The method of claim 7, wherein each of the plurality of hybrid expert sub-models comprises: A first language feed-forward neural network, which is used to process the fused features of the second transformed features of the audio training data associated with the first language to generate a first language vector; A second language feed-forward neural network is used to process fused features of second transformed features of the audio training data associated with the second language to generate a second language vector.
9. The method of claim 7, wherein each of the plurality of perceptual language encoding sub-models comprises: A shared encoder configured to encode the fused features of the second transformed features of the audio training data to generate shared coding information; A first language encoder, configured to encode the shared encoding information to generate first language encoding information; A second language encoder, configured to encode the shared encoding information to generate second language encoding information; as well as A gating network is used to selectively use the first language encoding information or the second language encoding information as the output encoding information of the current frame based at least on the output encoding information of the previous frame.
10. A computer device for building a speech recognition model, characterized in that: The computer device comprises: Memory; a processor coupled to the memory; and A computer program stored on the memory and running on the processor, wherein the running of the computer program results in the execution of the method for constructing a speech recognition model according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions that, when executed, execute the method for building a speech recognition model according to any one of claims 1-9.
12. A computer program product, characterized in that The computer program product comprises instructions, which, when executed by a processor, implement the method for constructing a speech recognition model according to any one of claims 1 to 9.
13. A method for speech recognition, characterized in that: The method comprises the following steps: Acquire feature data of input speech, wherein the input speech includes speech data in multiple languages; The feature data is input into a speech recognition model constructed according to the method for constructing a speech recognition model according to any one of claims 1 to 9 to obtain a speech recognition result.
14. The method according to claim 13, wherein inputting the feature data into the speech recognition model to obtain a speech recognition result comprises: Inputting the feature data into a first combined model of the speech recognition model to obtain a first recognition result; Inputting the feature data into a second combined model of the speech recognition model to obtain a second recognition result; as well as The speech recognition result is obtained based on the fusion of the first recognition result and the second recognition result.
15. The method according to claim 14, wherein obtaining the speech recognition result based on the fusion of the first recognition result and the second recognition result comprises: Using the first weight and the second weight, respectively, a weighted sum is performed on the speech recognition result of the first language and the speech recognition result of the second language; as well as The speech recognition result is obtained based on the weighted summation result.
16. The method of claim 15, wherein the first weight and the second weight are determined by testing the speech recognition model using a test data set.
17. A computer device for language recognition, characterized in that: The computer device comprises: Memory; a processor coupled to the memory; and A computer program stored on the memory and running on the processor, wherein the running of the computer program results in the execution of the method for speech recognition according to any one of claims 13 to 16.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, which, when executed, execute the method for speech recognition according to any one of claims 13-16.
19. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed by a processor, the method for speech recognition according to any one of claims 13 to 16 is implemented.
