Speech recognition method and device

Through the knowledge distillation method, a small amount of new business scenario data is used to incrementally train the ASR model of the old business scenario, which solves the problem of reduced recognition accuracy of automatic speech recognition technology in new scenarios, reduces development difficulty and time costs, and achieves Speech recognition capabilities in new and old scenarios are compatible.

CN113674745BActive Publication Date: 2024-10-18JINGDONG TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010361720.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-30
Publication Date
2024-10-18
Estimated Expiration
2040-04-30

AI Technical Summary

Technical Problem

When existing automatic speech recognition technology is migrated to new business scenarios, the recognition accuracy decreases, and deep transfer learning methods require experience to fix and adjust model parameters, which increases development difficulty and time costs.

Method used

The knowledge distillation method is used to process the ASR model of old business scenarios through incremental training models, and a small amount of audio data of new business scenarios is used to build ASR models suitable for new and old scenarios, reducing difficulty and time costs.

Benefits of technology

It achieves the ability to maintain the recognition of old business scenarios in new business scenarios, reduces training time and costs, and improves the versatility and generalization capabilities of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113674745B_ABST
    Figure CN113674745B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a speech recognition method and device. After the server obtains the speech signal to be processed, it uses a pre-deployed incremental training model to recognize the speech signal to obtain text information. Since the incremental training model is pre-adopted by knowledge distillation, only a small number of samples of new business scenarios are used to train the ASR model of the old business scenario, so that the incremental training model can be applied to new business scenarios while retaining the recognition ability of speech signals of old business scenarios, solving the time cost brought by full data training and the problem of decreased generalization ability caused by deep transfer learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a speech recognition method and device. Background Art

[0002] With the rapid development of artificial intelligence technology, automatic speech recognition (ASR) technology has been widely used in various business scenarios such as intelligent customer service, voice assistants, and human-computer interaction. Automatic speech recognition technology is essentially a process of automatically converting the semantics of user speech into text and executing corresponding instructions based on the text.

[0003] During the automatic speech recognition process, for a certain scenario one, the audio data of the scenario one is obtained, and the ASR model is trained using the audio data. The ASR model is mainly used to recognize the audio data in scenario one. For another new scenario two, if the aforementioned ASR for scenario one continues to be used, the recognition accuracy is likely to drop significantly. To overcome this problem, a deep transfer learning method is usually used to migrate the ASR model from the original business scenario to the new business scenario by using audio data without the new business scenario. During the migration process, some parameters of the ASR model are fixed based on experience, and other parameters of the ASR model are adjusted until the adjusted ASR model adapts to the new business scenario.

[0004] In the above deep transfer learning method, some parameters need to be fixed and the remaining parameters need to be adjusted. Which parameters to fix and which parameters to adjust are determined through empirical trials, which greatly increases the difficulty and time cost of developing the ASR model. Summary of the invention

[0005] The embodiments of the present application provide a speech recognition method and device. By adopting the knowledge distillation method, only a small amount of audio data of new business scenarios is used to obtain an ASR model that is suitable for both new business scenarios and old business scenarios, thereby reducing the difficulty and time cost of automatic speech recognition.

[0006] In a first aspect, an embodiment of the present application provides a speech recognition method, comprising:

[0007] Acquire a voice signal to be processed, where the voice signal is a voice signal of a new service scenario;

[0008] The speech signal is recognized using an incremental training model to obtain text information; wherein the incremental training model is obtained by performing knowledge distillation processing on an automatic speech recognition ASR model for an old business scenario using samples for the new business scenario.

[0009] In a feasible design, before using the incremental training model to recognize the speech signal to obtain text information, the method further includes:

[0010] Building a fixed model according to the ASR model, wherein the fixed model has the same structure and parameters as the ASR model, and the parameters of the fixed model remain unchanged during the training process;

[0011] Determining a loss function of the incremental training model according to the ASR model, the fixed model and samples for the new business scenario;

[0012] The ASR model is trained using samples for the new business scenario so that the loss value of the loss function of the ASR model is minimized to obtain the incremental training model.

[0013] In a feasible design, determining the loss function of the incremental training model according to the ASR model, the fixed model and the sample for the new business scenario includes:

[0014] Inputting a sample for the new business scenario into the ASR model to obtain a first output result, and inputting a sample for the new business scenario into the ASR model to obtain a second output result;

[0015] Constructing a knowledge distillation loss function according to the first output result and the second output result;

[0016] Constructing a connectionist temporal classification (CTC) loss function for the new business scenario according to the sample for the new business scenario and the ASR model;

[0017] The loss function of the incremental training model is determined according to the knowledge distillation loss function and the CTC loss function for the new business scenario.

[0018] In a feasible design, any sample in the first sample set and the second sample set is represented as The first sample set includes samples from the old business scenario, and the second sample set includes samples from the new business scenario, i∈[1,Nk], Nk represents the number of samples in the sample set, represents the spectral feature vector of the sample, represents the pinyin annotation result, k∈[1,2]; when k=1, The sample represented belongs to the first sample set. When k=2, The sample represented belongs to the second sample set;

[0019] The knowledge distillation loss function is: Among them, F srepresents the ASR model, F t represents the fixed model, represents the first output result, represents the second output result, L 2,KL represents the knowledge distillation loss function, l KL (·) represents divergence;

[0020] The CTC loss function for the new business scenario is: Among them, L 2,c represents the CTC loss function including the regularization term for the new business scenario, l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient;

[0021] The loss function of the incremental training model is: L2 = λ2L 2,c +(1-λ2)σL 2,KL , where L2 represents the loss function of the incremental training model, λ2 represents the learning ability of the incremental training model for the speech signal of the old business scenario and the speech signal of the new business scenario, and σ represents the loss function for balancing L 2,KL and L 2,c The numerical scale of .

[0022] In a feasible design, before using the incremental training model to recognize the speech signal to obtain text information, the method further includes:

[0023] The samples for the old business scenario are trained to obtain the ASR model, and the loss function of the ASR model is: Wherein, L1 represents the CTC loss function including the regularization term for the old business scenario, and l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient.

[0024] In a feasible design, before training the sample for the old business scenario to obtain the ASR model, the method further includes:

[0025] Annotating the audio data for the old business scenario to obtain a Chinese character annotation result of the audio data;

[0026] According to the correspondence between Chinese characters and pinyin, the Chinese character annotation result is converted into a pinyin annotation result;

[0027] A sample of the old business scenario is obtained according to the frequency spectrum feature vector of the audio data and the pinyin annotation result.

[0028] In a feasible design, the method of recognizing the speech signal using the incremental training model to obtain text information includes:

[0029] Determining a frequency spectrum feature vector corresponding to the speech signal;

[0030] Inputting the frequency spectrum feature vector into the incremental training model to obtain a target matrix;

[0031] The text information is determined according to the target matrix.

[0032] In a feasible design, after using the incremental training model to recognize the speech signal to obtain text information, the method further includes:

[0033] Execute the control instruction corresponding to the text information.

[0034] In a second aspect, an embodiment of the present application provides a speech recognition device, comprising:

[0035] An acquisition module, used for acquiring a voice signal to be processed, wherein the voice signal is a voice signal of a new service scenario;

[0036] A recognition module is used to recognize the voice signal using an incremental training model to obtain text information; wherein the incremental training model is obtained by performing knowledge distillation processing on an automatic speech recognition ASR model for an old business scenario using samples for the new business scenario.

[0037] In a feasible design, the above-mentioned device also includes: a training module, which is used to construct a fixed model based on the ASR model, the fixed model and the ASR model have the same structure and the same parameters, and the parameters of the fixed model remain unchanged during the training process. The loss function of the incremental training model is determined according to the ASR model, the fixed model and the samples for the new business scenario, and the ASR model is trained using the samples for the new business scenario so that the loss value of the loss function of the ASR model is minimized to obtain the incremental training model.

[0038] In a feasible design, the training module, when determining the loss function of the incremental training model based on the ASR model, the fixed model and the samples for the new business scenario, is used to input the samples for the new business scenario into the ASR model to obtain a first output result, input the samples for the new business scenario into the ASR model to obtain a second output result, construct a knowledge distillation loss function based on the first output result and the second output result, construct a connectionist temporal classification CTC loss function for the new business scenario based on the samples for the new business scenario and the ASR model, and determine the loss function of the incremental training model based on the knowledge distillation loss function and the CTC loss function for the new business scenario.

[0039] In a feasible design, any sample in the first sample set and the second sample set is represented as The first sample set includes samples from the old business scenario, and the second sample set includes samples from the new business scenario, i∈[1,N k ],N k represents the number of samples in the sample set, represents the spectral feature vector of the sample, represents the pinyin annotation result, k∈[1,2]; when k=1, The sample represented belongs to the first sample set. When k=2, The sample represented belongs to the second sample set;

[0040] The knowledge distillation loss function is: Among them, F s represents the ASR model, F t represents the fixed model, represents the first output result, represents the second output result, L 2,KL represents the knowledge distillation loss function, l KL (·) represents divergence;

[0041] The CTC loss function for the new business scenario is: Among them, L 2,c represents the CTC loss function including the regularization term for the new business scenario, l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient;

[0042] The loss function of the incremental training model is: L2 = λ2L 2,c +(1-λ2)σL 2,KL, where L2 represents the loss function of the incremental training model, λ2 represents the learning ability of the incremental training model for the speech signal of the old business scenario and the speech signal of the new business scenario, and σ represents the loss function for balancing L 2,KL and L 2,c The numerical scale of .

[0043] In a feasible design, the above device also includes:

[0044] The training module is used to train the samples for the old business scenario to obtain the ASR model before the recognition module recognizes the speech signal using the incremental training model to obtain text information, wherein the loss function of the ASR model is: Wherein, L1 represents the CTC loss function including the regularization term for the old business scenario, and l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient.

[0045] In a feasible design, the above-mentioned device also includes: a labeling module, which is used to label the audio data for the old business scenario before the training module trains the samples for the old business scenario to obtain the ASR model, so as to obtain the Chinese character labeling result of the audio data, convert the Chinese character labeling result into a pinyin labeling result according to the correspondence between Chinese characters and pinyin, and obtain the sample of the old business scenario according to the spectral feature vector of the audio data and the pinyin labeling result.

[0046] In a feasible design, the recognition module is used to determine the spectral feature vector corresponding to the speech signal, input the spectral feature vector into the incremental training model to obtain a target matrix, and determine the text information according to the target matrix.

[0047] In a feasible design, the above-mentioned device also includes: an execution module, which is used to execute the control instructions corresponding to the text information after the recognition module uses the incremental training model to recognize the voice signal to obtain the text information.

[0048] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, and executable instructions; wherein the executable instructions are stored in the memory and are configured to be executed by the processor, and the executable instructions include methods for executing the first aspect or various possible implementations of the first aspect as above.

[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method in the first aspect or various possible implementation methods of the first aspect.

[0050] In the speech recognition method and device provided in the embodiment of the present application, after the server obtains the speech signal to be processed, it uses the pre-deployed incremental training model to recognize the speech signal to obtain text information. Since the incremental training model is pre-trained using knowledge distillation, the ASR model of the old business scenario is trained using only a small number of samples of the new business scenario, so that the incremental training model can be applied to new business scenarios while retaining the recognition ability of speech signals of the old business scenarios, solving the time cost caused by full data training and the problem of decreased generalization ability caused by deep transfer learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0052] Figure 1 It is a schematic diagram of the network architecture of the speech recognition method provided in the embodiment of the present application;

[0053] Figure 2 is a flow chart of a speech recognition method provided by an embodiment of the present application;

[0054] Figure 3 It is a process diagram of the speech recognition method provided by an embodiment of the present application;

[0055] Figure 4 It is a structural diagram of an ASR model in the speech recognition method provided in an embodiment of the present application;

[0056] Figure 5 is a schematic diagram of incremental learning of knowledge distillation in the speech recognition method provided in an embodiment of the present application;

[0057] Figure 6 A schematic diagram of the structure of a speech recognition device provided in an embodiment of the present application;

[0058] Figure 7 A schematic diagram of the structure of another speech recognition device provided in an embodiment of the present application;

[0059] Figure 8 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0061] At present, the speech recognition model based on end-to-end deep neural network (DNN) takes audio data as input at the input end and outputs the corresponding text information, i.e., the text recognition result, at the output end. The DNN-based speech recognition model has the advantages of simple training process and convenient model update for different application scenarios, and has become the mainstream development trend of current ASR technology.

[0062] Generally speaking, the main frameworks of end-to-end DNN speech recognition models include: Connectionist Temporal Classification (CTC) framework, Listen Attention Spell (LAS) framework, Recurrent Neural Network Transducer (RNN-T) framework, etc. The subsequent end-to-end neural network speech recognition models are all evolved on the basis of these three frameworks. Compared with the earliest proposed end-to-end ASR model, the latest end-to-end ASR model has significantly improved the speech recognition accuracy and generalization ability. Despite this, the current end-to-end ASR technology still cannot achieve: accurately recognize the audio data of all scenarios by training a general ASR model. Generally speaking, the ASR model is obtained by training the audio data of one scenario, and the ASR model is called the ASR model for the old business scenario. If the ASR model for the old business scenario is used to recognize the speech signal of the new business scenario, the recognition accuracy may drop significantly, resulting in failure to meet the needs of the new business scenario.

[0063] Compared with training data such as images and texts, audio data is usually difficult to obtain easily due to issues such as privacy and copyright. For new business scenarios, the problem of obtaining audio data is particularly prominent. At the same time, since the annotation of audio data requires manual listening at least once, the annotation success rate is also very high. Therefore, for new business scenarios, if the full data training method is adopted, that is, sufficient samples are obtained and trained to train an ASR model that adapts to the new business scenario, it will be difficult to accumulate a large amount of training data for model training in a short period of time, which will directly affect the business launch progress of the new business scenario. Obviously, if the ASR model is trained for a new business scenario, it is very difficult to obtain large-scale audio data and annotation data for the new business scenario.

[0064] Therefore, how to use a small amount of audio data from new business scenarios to achieve short-term, low-cost training to obtain an ASR model that can be applied to new business scenarios is considered an urgent problem to be solved.

[0065] To solve the above problems, a common practice is to adopt the method of deep transfer learning. In this method, the ASR model for the old business scenario is migrated to the new business scenario by using a small amount of audio data from the new business scenario. The common practice is to fix part of the parameters of the ASR model of the old business scenario, and use a small amount of audio data from the new business scenario to fine-tune the remaining parameters to achieve model migration. However, in the engineering application of deep transfer learning, the ASR model structure consists of a multi-layer neural network, and the characteristics of different layer structure models are quite different. It is only possible to determine which network layer parameters to specify, which network layer parameters to train, and the fine-tuning of the learning rate parameters, etc. through empirical methods, which greatly increases the difficulty and time cost of developing ASR models for new business scenarios.

[0066] At the same time, the model trained by deep transfer learning is prone to the phenomenon that the ASR model finally trained is difficult to accurately recognize the audio data of the old business scenarios because the audio data of the old business scenarios are no longer involved in the training process. However, although the old business scenarios and the new business scenarios are different in scenes, the audio data in different business scenarios has a certain overlap. Therefore, the above-mentioned method of using deep transfer learning may cause the trained model to have difficulty in accurately recognizing the audio data of some new business scenarios, and the versatility of the ASR model is poor.

[0067] In view of this, an embodiment of the present application provides a speech recognition method and device. By adopting the knowledge distillation approach, only a small amount of audio data of new business scenarios is used to obtain an ASR model that is suitable for both new and old business scenarios, thereby reducing the difficulty and time cost of automatic speech recognition.

[0068] Figure 1This is a schematic diagram of the network architecture of the speech recognition method provided in the embodiment of the present application. Figure 1 The network architecture includes a terminal device 1 and a server 2, and the terminal device 1 and the server 2 establish a network connection. The incremental training model is pre-deployed on the server 2. After the server obtains the semantic signal to be processed, the incremental training model is used to recognize the voice signal to obtain text information. The incremental training model is obtained by performing knowledge distillation processing on the automatic speech recognition ASR model for the old business scenario using samples for the new business scenario.

[0069] Figure 1 In the example, the terminal device 1 may be a smart phone, a tablet computer, a portable computer, a desktop computer, etc., and the server 2 may be an independently deployed server or a server cluster composed of multiple servers, etc. The network between the terminal device 1 and the server 2 may be a wired communication connection, a wireless communication connection, etc.

[0070] It should be noted that the speech recognition method provided in the embodiment of the present application is usually executed by the server 2, and accordingly, the incremental training model is generally set in the server 2. However, in other embodiments of the present application, the terminal device 1 may also have similar functions as the server 2, so as to execute the speech recognition method provided in the embodiment of the present application.

[0071] Below, in the above Figure 1 Based on this, taking the incremental training model set on the server as an example, the speech recognition method described in the embodiment of the present application is described in detail. Figure 2 , Figure 2 : is a flow chart of a speech recognition method provided in an embodiment of the present application, and this embodiment includes:

[0072] 101. Acquire a voice signal to be processed, where the voice signal is a voice signal of a new service scenario.

[0073] The voice signal may be a piece of voice emitted by the user when speaking, or a piece of audio data obtained from a voice database, etc. For example, a voice recognition engine is installed on the terminal device, and the voice signal emitted by the user is collected by the voice recognition engine and sent to the server. For another example, the server obtains a piece of pre-stored audio data from a local database or a remote database.

[0074] 102. Use an incremental training model to recognize the voice signal to obtain text information; wherein the incremental training model is obtained by performing knowledge distillation processing on an automatic speech recognition ASR model for an old business scenario using samples for the new business scenario.

[0075] Exemplarily, an incremental training model is pre-deployed on the server. The model is obtained by pre-distilling the knowledge of the ASR model of the old business scenario using a small number of samples of the new business scenario. In addition to the ability to recognize the voice signal of the new business scenario, the incremental training model also retains the voice recognition ability of the old business scenario. In other words, the incremental model is an automatic speech recognition model that is universal for both the old and new business scenarios.

[0076] In the speech recognition method provided in the embodiment of the present application, after the server obtains the speech signal to be processed, it uses the pre-deployed incremental training model to recognize the speech signal to obtain text information. Since the incremental training model is pre-trained using knowledge distillation, the ASR model of the old business scenario is trained using only a small number of samples of the new business scenario, so that the incremental training model can be applied to new business scenarios while retaining the recognition ability of speech signals of the old business scenarios, solving the time cost brought by full data training and the problem of decreased generalization ability caused by deep transfer learning.

[0077] In an embodiment of the present application, after obtaining the incremental training model, the incremental training model is used to recognize the voice signal of a new business scenario to obtain text information. The spectral feature vector of the voice signal is first determined, and then the spectral feature vector of the voice signal is input into the incremental training model to obtain a target matrix, and the text information corresponding to the voice signal is determined based on the target matrix.

[0078] Exemplarily, after acquiring the speech signal to be processed, the server converts the speech signal into a spectral feature to obtain a spectral feature vector. Afterwards, the spectral feature vector is input into the incremental training model for operation to obtain a target matrix. Each column of the target matrix represents a probability value, and each probability represents the probability that the speech signal belongs to a certain type of pinyin annotation result among the 1300 types of pinyin annotation results. In this way, multiple probabilities can be determined according to each column of the target matrix, and the pinyin annotation result corresponding to the maximum probability among these probabilities is the pinyin annotation result of the speech signal. By adopting this scheme, the purpose of recognizing speech signals using the incremental training model is achieved.

[0079] After the server uses the incremental training model to recognize the voice signal and obtain the text information, it executes the control instruction corresponding to the text information. For example, if the text information is "how to get to XXX place", the server generates the navigation path between the current location and XXX place and returns it to the terminal device.

[0080] Figure 3 This is a process diagram of the speech recognition method provided by the embodiment of the present application. Figure 3 , the embodiments of the present application include:

[0081] 201. Obtain samples for legacy business scenarios.

[0082] Legacy business scenarios refer to business scenarios where automatic speech recognition technology is relatively mature and ASR models with high accuracy have been trained for these scenarios. A large number of samples can be obtained for legacy business scenarios, and these samples are used to train ASR models for legacy business scenarios.

[0083] 202. Obtain samples for new business scenarios.

[0084] New business scenarios refer to business scenarios where automatic speech recognition technology is immature and no ASE model with high accuracy has been trained for such scenarios. There are relatively few samples available for new business scenarios. The samples for new business scenarios are combined with the ASR model for old business scenarios to construct a knowledge distillation loss function, and the ASR model for old business scenarios is retrained to obtain an incremental training model. The incremental training model is the ASR model for new business scenarios.

[0085] In the embodiment of the present application, each sample is a segment of audio data, such as 10 seconds or other length of audio data. The samples of the old business scene are relatively large, with a total duration of, for example, 12,000 hours, and the samples of the new business scene are relatively small, with a total duration of, for example, 300 hours.

[0086] The samples of the old business scenario are included in the first sample set Ψ1, and the samples of the new business scenario are included in the second sample set Ψ2. Any one of the samples in the first sample set Ψ1 and the second sample set Ψ2 is represented as Among them, i∈[1,N k ],N k Represents the number of samples in the sample set, Spectral feature vector, represents the pinyin annotation result, k∈[1,2]; when k=1, The sample represented belongs to the first sample set. When k=2, The sample represented belongs to the second sample set.

[0087] For each sample, the traditional short-time Fourier transform (STFT) can be used to obtain the spectrum feature vector of the sample. The window size of STFT is 20 milliseconds (ms) and the window sliding step is 10ms. Through STFT, an 81-dimensional spectrum information sequence of each sample can be obtained, and the spectrum feature vector can be obtained based on the 81-dimensional spectrum information sequence. Usually, the number of samples for old business scenarios is much larger than the number of samples for new business scenarios, that is, N1>>N2.

[0088] For each sample, since audio data is usually annotated with Chinese characters, the sample can be annotated with Chinese characters to obtain the Chinese character annotation result of the sample. Since there are many categories of Chinese character annotation results, about 7,000 categories, the Chinese character annotation results can also be converted into pinyin annotation results according to the correspondence between Chinese characters and pinyin. For example, the business tool pypinyin can be used to convert the Chinese character annotation results into pinyin annotation results, and pinyin can be used as a modeling unit to merge homophones in Chinese characters and reduce the number of categories to 1,300 categories. For example, the Chinese annotation result of sample 1 is "Chinese", and the Chinese annotation result of sample 2 is "clock", and the pinyin "zhong", "wen", and "biao" are numbered ①, ②, and ③ respectively, then the pinyin annotation result of sample 1 is "①②", and the pinyin annotation result of sample 2 is "①③". Using this scheme, the convergence effect of the model is improved by reducing the classification categories.

[0089] 203. Pre-train samples of old business scenarios to obtain an ASR model for the old business scenarios.

[0090] Exemplarily, before incremental learning, the structure of the end-to-end ASR model needs to be set. Unlike the LAS framework and the RNN-TT framework, the CTC framework does not rely on the recognition result of the previous frame of audio in the process of recognizing each frame of audio. It has the advantages of high efficiency and good real-time performance, and is suitable for a large number of practical application scenarios. The embodiment of the present application adopts the CTC framework among the three popular network frameworks to build an ASR model for old business scenarios.

[0091] The ASR model based on the CTC framework aims to use samples from old business scenarios to construct a nonlinear mapping function from samples to pinyin annotation results. The ASR model for old business scenarios, that is, the nonlinear mapping function is expressed as F s . Figure 4 It is a structural diagram of the ASR model in the speech recognition method provided in the embodiment of the present application.

[0092] Please refer to Figure 4 , the ASR model F for the old business scenario s It includes 3 layers of Convolutional Neural Network (CNN), 10 layers of Self-Attention Block (SAB), and 2 layers of Fully Connected (FC). Figure 4 The ASR model F s The structure of 3+10+2 is described, however, the embodiments of the present application do not limit the number of layers of CNN, SAB and FC.

[0093] Set up the ASR model F s After the structure is obtained, the samples for the old business scenarios are trained to obtain the ASR model F for the old business scenarios. s During the training process, samples of old business scenarios are trained to obtain the ASR model F s , the ASR model F s The loss function is:

[0094]

[0095] Among them, L1 represents the ASR model F s The loss function, l c (·) represents the CTC loss function for the old business scenario, F s represents the ASR model, Denotes the ASR model F s The sum of the 2-norms of all parameters in , λ1 represents the regularization coefficient, for example, λ1 = 10 -5 The CTC loss function for the old business scenario can be understood as the CTC loss function of the sample whose input is the old business scenario.

[0096] In the embodiment of the present application, the back propagation algorithm is used to train the neural network model. For example, the adaptive moment estimation (ADAM) optimization algorithm [5] can be used. The initial value of ADAM is set to 4×10 -4 When the initialized ASR model converges, that is, when the loss value of the loss function shown in the above formula (1) is minimized, the ASR model for the old business scenario can be obtained.

[0097] It should be noted that if the ASR model for the old scene can be directly obtained, the ASR model can be directly used without executing the above steps 201 and 203.

[0098] 204. Construct knowledge distillation loss function.

[0099] The server constructs a fixed model based on the ASR model. The fixed model has the same structure and parameters as the ASR model. The parameters of the fixed model remain unchanged during the training process. Figure 5 , Figure 5 It is a schematic diagram of incremental learning of knowledge distillation in the speech recognition method provided in an embodiment of the present application.

[0100] Please refer to Figure 5 , the left side is the ASR model F s , the ASR model F sThe parameters of the model change during the training process; the right side is the fixed model F t , the fixed model F t The parameters of the ASR model F change during the training process. s , the fixed model F t And for the samples of the new business scenario, determine the loss function of the incremental training model.

[0101] In the process of determining the loss function of the incremental training model, a knowledge distillation loss function is first constructed, and then the loss function of the incremental training model is constructed based on the knowledge distillation loss function. In the process of constructing the knowledge distillation loss function, a sample for the new business scenario is input into the ASR model to obtain a first output result, and a sample for the new business scenario is input into the ASR model to obtain a second output result, and a knowledge distillation loss function is constructed based on the first output result and the second output result.

[0102] For example, each sample for a new business scenario is processed by the above ASR model F s and fixed model F t After that, the first output results are obtained respectively And the second output result Among them, the ASR model F s The parameters of change with training, so the first output result represents the feature extraction result of the sample by the incremental training model (new model) obtained by subsequent training, while the fixed model F t The parameters of the fixed model F t represents the ASR model for the old business scenario, so the second output result Indicates the feature extraction result of the sample by the ASR model (old model) for the old business scenario. If the first output result And the second output result If the first output result is consistent, it means that the incremental training model and the ASR model have the same recognition ability for samples of the new business scenario. And the annotation results of this sample If they remain consistent, it means that the incremental training model can accurately identify samples of new business scenarios. And the second output result The consistency of the first output And the annotation results of this sample In the embodiment of the present application, the knowledge distillation loss function is constructed as follows:

[0103]

[0104] Among them, F s represents the ASR model, F t represents the fixed model, represents the first output result, represents the second output result, L 2,KL represents the knowledge distillation loss function, l KL (·) represents divergence.

[0105] 205. Construct the loss function of the incremental training model.

[0106] In the process of constructing the loss function of the incremental training model, the server constructs a first connection time classification CTC loss function based on the samples for the new business scenario and the ASR model, and determines the loss function of the incremental training model based on the knowledge distillation loss function and the CTC loss function for the new business scenario.

[0107] Exemplarily, the CTC loss function for the new business scenario is:

[0108]

[0109] Among them, L 2,c represents the loss function of the ASR model, l c (·) represents the CTC loss function, F s represents the ASR model, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient. The CTC loss function for the new business scenario can be understood as the CTC loss function of the sample whose input is the new business scenario.

[0110] After constructing the knowledge distillation loss function and the CTC loss function for the new business scenario, the server weights the two loss functions to obtain the loss function of the incremental training model. The loss function of the incremental training model is:

[0111] L2=λ2L 2,c +(1-λ2)σL 2,KL (4)

[0112] Wherein, L2 represents the loss function of the incremental training model, λ2 represents the learning ability of the incremental training model for the speech signal of the old business scenario and the speech signal of the new business scenario, and σ represents the loss function for balancing L 2,KL and L 2,c The numerical scale of .

[0113] In formula (4), parameter λ2 is used to balance the learning ability of the incremental training model for the audio data of the old business scenarios and the new business scenarios. If λ2=1, it means that the incremental training model only focuses on the new business scenarios, which will make the incremental training model fit the audio data of the new business scenarios as much as possible. The advantage of this is to maximize the use of samples of the new business scenarios. However, due to the relatively small number of samples of the new business scenarios, it is very likely that the generalization ability of the incremental training model is relatively poor, affecting the actual effect of the incremental training model. On the contrary, if λ2=0, it means that during the training process of the incremental training model, the knowledge of the ASR model of the old business scenarios is retained as much as possible, so that the incremental training model and the ASR model have the same recognition performance. This is equivalent to not using samples of the new business scenarios, and the incremental training model obtained by training is difficult to apply to the new business scenarios. Due to the different physical meanings of the loss functions shown in the above formulas (2) and (3), the order of magnitude difference is large. In the embodiment of the present application, the parameter σ is used to smooth the numerical scales of the above two loss functions, and the values ​​of the parameter λ2 and the parameter σ are, for example: λ2=0.5, σ=0.02.

[0114] 206. Retrain the ASR model using samples of the new business scenario so that the loss value of the loss function of the incremental training model is minimized to obtain the incremental training model.

[0115] For example, the server uses the business data of the new business scenario to retrain the ASR model of the old business scenario. During the training process, the back propagation algorithm can be used to train the neural network model. For example, the ADAM optimization algorithm [5] can be used, and the initial value of ADAM can be set to 1×10 -4 wait.

[0116] Next, a set of data is used to verify the incremental training model described in the embodiment of the present application. For example, see Table 1.

[0117] Table 1 Accuracy of incremental learning end-to-end speech recognition model on the test set

[0118]

[0119] Please refer to Table 1, and test 7 test sets using the baseline model, the ASR model for the old business scenario, and the incremental training model. The 7 Chinese speech test sets are: Chinese open source test sets Aishell1, Aishell2, Primewords, ST-CMDS, THU-30, and the original business and new business test sets. Among them, the baseline model is a model trained by mixing the audio data of the old business scenario with the audio data of the new business scenario. For example, the semantic recognition model is obtained by mixing 12,000 hours of audio data of the old business scenario and 12,000 hours of audio data of the new business scenario and then training them in full.

[0120] Please refer to Table 1. Compared with the ASR model for the old business scenarios, the incremental training model described in the embodiment of the present application has a slight decrease in the recognition accuracy of Aishell1, Aishell2, Primewords, ST-CMDS, THU-30 and the old business test machine. This is because although knowledge distillation is used to retain the recognition ability of the incremental training model for the old business scenarios to a certain extent, since the audio data of the old business scenarios is not involved at all during the training process of the incremental training model, a small amount of "forgetting" of the knowledge of the old business scenarios is inevitable. However, the magnitude of this decrease in accuracy is very small, less than 0.5%. In the test of the new business scenario, the performance of the incremental training model is significantly improved compared with the recognition accuracy of the ASR model of the old business scenario, and the performance is close to the baseline model.

[0121] Therefore, the experimental results show that the incremental training model obtained by the incremental learning of this application can improve the recognition accuracy of new business scenarios while maintaining (or slightly reducing) the accuracy of the ASR model of the old business scenarios. Moreover, during the training process, only a small amount of audio data of new business scenarios is used, so the training time of the model can be greatly improved, and the efficiency of model update is improved.

[0122] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0123] Figure 6 1 is a schematic diagram of the structure of a speech recognition device provided in an embodiment of the present application. The speech recognition device 100 can be implemented in software and / or hardware. Figure 6 As shown, the speech recognition device 100 includes:

[0124] An acquisition module 11 is used to acquire a voice signal to be processed, where the voice signal is a voice signal of a new service scenario;

[0125] The recognition module 12 is used to recognize the speech signal using an incremental training model to obtain text information; wherein the incremental training model is obtained by performing knowledge distillation processing on the automatic speech recognition ASR model for the old business scenario using samples for the new business scenario.

[0126] Figure 7 FIG. 1 is a schematic diagram of the structure of another speech recognition device provided in an embodiment of the present application. The speech recognition device 100 provided in this embodiment is Figure 6 On the basis of

[0127] The training module 13 is used to construct a fixed model based on the ASR model. The fixed model and the ASR model have the same structure and parameters, and the parameters of the fixed model remain unchanged during the training process. The loss function of the incremental training model is determined according to the ASR model, the fixed model and the samples for the new business scenario. The ASR model is trained using the samples for the new business scenario so that the loss value of the loss function of the ASR model is minimized to obtain the incremental training model.

[0128] In a feasible design, the training module 13, when determining the loss function of the incremental training model based on the ASR model, the fixed model and the samples for the new business scenario, is used to input the samples for the new business scenario into the ASR model to obtain a first output result, input the samples for the new business scenario into the ASR model to obtain a second output result, construct a knowledge distillation loss function based on the first output result and the second output result, construct a connectionist temporal classification CTC loss function for the new business scenario based on the samples for the new business scenario and the ASR model, and determine the loss function of the incremental training model based on the knowledge distillation loss function and the CTC loss function for the new business scenario.

[0129] In a feasible design, any sample in the first sample set and the second sample set is represented as The first sample set includes samples from the old business scenario, and the second sample set includes samples from the new business scenario, i∈[1,N k ],N k represents the number of samples in the sample set, represents the spectral feature vector of the sample, represents the pinyin annotation result, k∈[1,2]; when k=1, The sample represented by belongs to the first sample set. When k=2, The sample represented belongs to the second sample set;

[0130] The knowledge distillation loss function is: Among them, F s represents the ASR model, F t represents the fixed model, represents the first output result, represents the second output result, L 2,KL represents the knowledge distillation loss function, l KL (·) represents divergence;

[0131] The CTC loss function for the new business scenario is: Among them, L 2,c represents the CTC loss function including the regularization term for the new business scenario, l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient;

[0132] The loss function of the incremental training model is: L2 = λ2L 2,c +(1-λ2)σL 2,KL , where L2 represents the loss function of the incremental training model, λ2 represents the learning ability of the incremental training model for the speech signal of the old business scenario and the speech signal of the new business scenario, and σ represents the loss function for balancing L 2,KL and L 2,c The numerical scale of .

[0133] In a feasible design, the training module 13 is used to train the samples for the old business scenario to obtain the ASR model before the recognition module 12 uses the incremental training model to recognize the voice signal to obtain text information. The loss function of the ASR model is: Wherein, L1 represents the CTC loss function including the regularization term for the old business scenario, and l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient.

[0134] Please refer to Figure 7 In a feasible design, the speech recognition device 100 further includes:

[0135] The labeling module 14 is used to label the audio data for the old business scenario before the training module 13 trains the samples for the old business scenario to obtain the ASR model, so as to obtain the Chinese character labeling results of the audio data, convert the Chinese character labeling results into pinyin labeling results according to the correspondence between Chinese characters and pinyin, and obtain the samples of the old business scenario according to the frequency spectrum feature vector of the audio data and the pinyin labeling results.

[0136] In a feasible design, the recognition module 12 is used to determine the spectrum feature vector corresponding to the speech signal, input the spectrum feature vector into the incremental training model to obtain a target matrix, and determine the text information according to the target matrix.

[0137] Please refer to Figure 7 In a feasible design, the above-mentioned speech recognition device 100 also includes: an execution module 15, which is used to execute the control instruction corresponding to the text information after the recognition module 12 uses the incremental training model to recognize the speech signal to obtain the text information.

[0138] The speech recognition device provided in the embodiment of the present application can execute the actions of the server in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.

[0139] Figure 8 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 8 As shown, the electronic device 200 includes:

[0140] Processor 21 and memory 22;

[0141] The memory 22 stores executable instructions;

[0142] The at least one processor 21 executes the executable instructions stored in the memory 22, so that the processor 21 performs the speech recognition method as described above.

[0143] The specific implementation process of the processor 21 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0144] Optionally, the electronic device 200 further includes a communication component 23 , wherein the processor 21 , the memory 22 and the communication component 23 may be connected via a bus 24 .

[0145] An embodiment of the present application also provides a computer-readable storage medium, in which executable instructions are stored. When the executable instructions are executed by a processor, they are used to implement the speech recognition method as described above.

[0146] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0147] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A speech recognition method, characterized in that: include: Acquire a voice signal to be processed, where the voice signal is a voice signal of a new service scenario; The speech signal is recognized by using an incremental training model to obtain text information; wherein the incremental training model is obtained by performing knowledge distillation processing on an automatic speech recognition ASR model for an old business scenario using samples for the new business scenario, and the samples for the new business scenario include the annotation results of the pinyin annotation of the audio data; Before the step of using the incremental training model to recognize the speech signal to obtain text information, the step further includes: Building a fixed model according to the ASR model, wherein the fixed model has the same structure and parameters as the ASR model, and the parameters of the fixed model remain unchanged during the training process; Inputting samples for the new business scenario into the ASR model and the fixed model respectively, and obtaining a first output result and a second output result respectively; Constructing a knowledge distillation loss function according to the first output result and the second output result; Constructing a connectionist temporal classification (CTC) loss function for the new business scenario according to the sample for the new business scenario and the ASR model; Weighting the knowledge distillation loss function and the CTC loss function to determine the loss function of the incremental training model; The ASR model is trained using samples for the new business scenario so that the loss value of the loss function of the ASR model is minimized to obtain the incremental training model.

2. The method according to claim 1, characterized in that Any sample in the first sample set and the second sample set is expressed as The first sample set includes samples from the old business scenario, and the second sample set includes samples from the new business scenario, i∈[1,N k ],N k represents the number of samples in the sample set, represents the spectral feature vector of the sample, represents the pinyin annotation result, k∈[1,2]; when k=1, The sample represented by belongs to the first sample set. When k=2, The sample represented belongs to the second sample set; The knowledge distillation loss function is: Among them, F s represents the ASR model, F t represents the fixed model, represents the first output result, represents the second output result, L 2,KL represents the knowledge distillation loss function, l KL (·) represents divergence; The CTC loss function for the new business scenario is: Among them, L 2,c represents the CTC loss function including the regularization term for the new business scenario, l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient; The loss function of the incremental training model is: L2 = λ2L 2,c +(1-λ2)σL 2,KL , where L2 represents the loss function of the incremental training model, λ2 represents the learning ability of the incremental training model for the speech signal of the old business scenario and the speech signal of the new business scenario, and σ represents the loss function for balancing L 2,KL and L 2,c The numerical scale of .

3. The method according to claim 2, characterized in that Before the method of using the incremental training model to recognize the voice signal to obtain text information, the method further includes: The samples for the old business scenario are trained to obtain the ASR model, and the loss function of the ASR model is: Wherein, L1 represents the CTC loss function including the regularization term for the old business scenario, and l c (·) represents the CTC loss function, represents the sum of the 2-norms of all parameters in the ASR model, and λ1 represents the regularization term coefficient.

4. The method according to claim 3, characterized in that Before training the sample for the old business scenario to obtain the ASR model, the method further includes: Annotating the audio data for the old business scenario to obtain a Chinese character annotation result of the audio data; According to the correspondence between Chinese characters and pinyin, the Chinese character annotation result is converted into a pinyin annotation result; A sample of the old business scenario is obtained according to the frequency spectrum feature vector of the audio data and the pinyin annotation result.

5. The method according to claim 1 or 2, characterized in that: The step of using the incremental training model to recognize the speech signal to obtain text information includes: Determining a frequency spectrum feature vector corresponding to the speech signal; Inputting the frequency spectrum feature vector into the incremental training model to obtain a target matrix; The text information is determined according to the target matrix.

6. The method according to claim 1 or 2, characterized in that: After the incremental training model is used to recognize the speech signal to obtain text information, the method further includes: Execute the control instruction corresponding to the text information.

7. A speech recognition device, characterized in that: include: An acquisition module, used for acquiring a voice signal to be processed, wherein the voice signal is a voice signal of a new service scenario; A recognition module, used to recognize the speech signal using an incremental training model to obtain text information; wherein the incremental training model is obtained by performing knowledge distillation processing on an automatic speech recognition ASR model for an old business scenario using samples for the new business scenario, and the samples for the new business scenario include annotated results of pinyin annotations of audio data; The device also includes a training module, The training module is used to construct a fixed model according to the ASR model, the fixed model has the same structure and parameters as the ASR model, and the parameters of the fixed model remain unchanged during the training process; Inputting samples for the new business scenario into the ASR model and the fixed model respectively, and obtaining a first output result and a second output result respectively; Constructing a knowledge distillation loss function according to the first output result and the second output result; Constructing a connectionist temporal classification (CTC) loss function for the new business scenario according to the sample for the new business scenario and the ASR model; Weighting the knowledge distillation loss function and the CTC loss function to determine the loss function of the incremental training model; The ASR model is trained using samples for the new business scenario so that the loss value of the loss function of the ASR model is minimized to obtain the incremental training model.

8. An electronic device, characterized in that: include: A memory for storing program instructions; A processor, configured to call and execute program instructions in the memory to execute the method according to any one of claims 1 to 6.

9. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Classification task increment processing method and device, electronic device and storage medium

    CN108960283A

  • Incremental voice command word recognition method

    CN110808036A