Speech recognition method, device, electronic device and computer-readable storage medium

By applying transfer learning to a general speech recognition model and combining hot words, the problem of low accuracy of traditional speech recognition technology in vertical domain scenarios is solved, achieving higher recognition accuracy and lower misrecognition rate.

CN117789699BActive Publication Date: 2024-09-06DARK MATTER ARTIFICIAL INTELLIGENT (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311708779.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2024-09-06
Estimated Expiration
2043-12-13

AI Technical Summary

Technical Problem

Traditional general-purpose speech recognition technology has low accuracy and high misrecognition rate when faced with specific vertical domain scenarios, and cannot meet the needs of users.

Method used

By obtaining the general speech recognition model trained with general training samples, and using the training samples of the target vertical domain for transfer learning, a speech recognition model suitable for the vertical domain is obtained, and the hot words in the target vertical domain are combined for recognition to improve the recognition accuracy.

Benefits of technology

It improves the accuracy of speech recognition in vertical domain scenarios and reduces the misrecognition rate, making the speech recognition model more suitable for applications in specific fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117789699B
    Figure CN117789699B
Patent Text Reader

Abstract

The present application provides a speech recognition method, device, electronic device and computer-readable storage medium, wherein the method includes: obtaining a general speech recognition model trained using general training samples; using target vertical domain training samples to perform transfer learning on the general speech recognition model to obtain a trained vertical domain speech recognition model; inputting the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combining the hot words in the target vertical domain to obtain the recognition result of the target speech data. This method is conducive to ensuring the accuracy of speech recognition of the target speech data belonging to the target vertical domain using the vertical domain speech recognition model. At the same time, when using the vertical domain speech recognition model, hot words are used to assist, which further improves the accuracy of the recognition results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a speech recognition method, device, electronic device and computer-readable storage medium. Background Art

[0002] Automatic Speech Recognition (ASR) is an important branch of artificial intelligence. This technology involves multiple technical fields such as digital signal processing, artificial intelligence, linguistics, mathematical statistics, acoustics, emotion and psychology.

[0003] The basic goal of this technology is to enable smart devices to understand human speech. To achieve this goal, speech recognition technology first captures sound signals, then analyzes and converts these signals, and finally converts them into text or commands that machines can understand.

[0004] However, traditional general speech recognition technology often encounters problems such as low accuracy and high misrecognition rate when facing specific vertical scenarios, and cannot meet user needs. Summary of the invention

[0005] In view of this, the purpose of the present application is to provide a speech recognition method, device, electronic device and computer-readable storage medium to improve recognition accuracy and reduce misrecognition rate.

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

[0007] Obtain a general speech recognition model trained using general training samples;

[0008] Use the target vertical domain training samples to perform transfer learning on the general speech recognition model to obtain a trained vertical domain speech recognition model;

[0009] The target speech data belonging to the target vertical domain is input into the trained vertical domain speech recognition model, and combined with the hot words in the target vertical domain to obtain the recognition result of the target speech data.

[0010] In combination with the first aspect, the embodiment of the present application provides a first possible implementation of the first aspect, wherein the general speech recognition model is trained by the following steps:

[0011] Obtain common voice data in multiple different scenarios;

[0012] Vectorize common speech data in different scenarios to obtain speech vectors;

[0013] At the same time, speech vectors in different scenarios are used to train a general speech recognition model; the general speech recognition model includes an encoder and a decoder that work sequentially; the encoder is used to extract and transform features of the input speech vector; the decoder is used to determine the semantic information corresponding to the speech vector based on the attention distribution strategy.

[0014] In combination with the first possible implementation of the first aspect, the embodiment of the present application provides a second possible implementation of the first aspect, wherein the encoder includes a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer;

[0015] The local self-attention layer is used to calculate the correlation between different speech vectors;

[0016] The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation;

[0017] The decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer;

[0018] The global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors;

[0019] The encoding-decoding attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information;

[0020] The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution.

[0021] In combination with the first aspect, the embodiment of the present application provides a third possible implementation of the first aspect, wherein the step uses the target vertical domain training sample to perform transfer learning on the general speech recognition model to obtain a trained vertical domain speech recognition model, including:

[0022] Freezing at least some of the network layers that have feature extraction functions in a general speech recognition model;

[0023] According to the characteristic information of the target vertical domain, the network layer in the unfrozen state is adjusted;

[0024] Use the target vertical domain training samples to train the general speech recognition model;

[0025] The trained general speech recognition model is verified using the target vertical domain verification sample, and after the verification passes, the trained vertical domain speech recognition model is obtained.

[0026] In combination with the first possible implementation of the first aspect, the embodiment of the present application provides a fourth possible implementation of the first aspect, wherein the step of inputting the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combining the hot words in the target vertical domain to obtain the recognition result of the target speech data includes:

[0027] Inputting the target speech data belonging to the target vertical domain into the encoder of the trained vertical domain speech recognition model to extract the second semantic feature information of the target speech data through the encoder;

[0028] Through the decoder of the trained vertical domain speech recognition model, the recognition result of the target speech data is determined based on the second semantic feature information and the reference hot words in the hot word library; the hot words in the hot word library are the words in the target vertical domain obtained according to the frequency of use statistics.

[0029] In combination with the fourth possible implementation of the first aspect, the embodiment of the present application provides a fifth possible implementation of the first aspect, wherein, through the decoder of the trained vertical domain speech recognition model, the recognition result of the target speech data is determined based on the second semantic feature information and the reference hot words in the hot word library, including:

[0030] For each speech vector, searching for at least one reference result corresponding to the speech vector through the decoder of the trained vertical domain speech recognition model; the reference result is a text corresponding to the speech vector and indicating its meaning;

[0031] For each speech vector, determine the candidate result of the speech vector according to the matching relationship between the reference result corresponding to the speech vector and the reference hot word;

[0032] According to the candidate results of each speech vector, the recognition result of the target speech data is determined.

[0033] In combination with the first possible implementation of the first aspect, the embodiment of the present application provides a sixth possible implementation of the first aspect, wherein the step of acquiring general voice data in multiple different scenarios includes:

[0034] Acquire audio data in a target usage scenario through at least one audio acquisition method; the target usage scenario includes at least one of the following: daily conversations, human-computer conversations, film and television programs, concerts or stage plays; the audio acquisition method includes at least one of the following: microphone recording, mobile phone recording, computer recording, network recording, virtual reality device recording, voice chat function recording in games, environmental monitoring equipment or smart home equipment recording, social media live broadcast platform or online conference tool recording;

[0035] The audio data is preprocessed to obtain general voice data; the preprocessing includes at least one of the following: screening valid segments, data segmentation, format adjustment, sampling rate adjustment, and channel number adjustment.

[0036] In a second aspect, the embodiment of the present application further provides a speech recognition method, comprising:

[0037] Obtain target voice data of the target vertical domain;

[0038] The target speech data is input into the trained vertical domain speech recognition model to obtain the recognition result of the target speech data; the vertical domain speech recognition model is obtained by performing transfer learning on the trained general speech recognition model using the target vertical domain training samples.

[0039] In a third aspect, an embodiment of the present application further provides a speech recognition device, including:

[0040] A first acquisition module is used to acquire a general speech recognition model trained using a general training sample;

[0041] A learning module, used to perform transfer learning on a general speech recognition model using target vertical domain training samples to obtain a trained vertical domain speech recognition model;

[0042] The first recognition module is used to input the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combine the hot words in the target vertical domain to obtain the recognition result of the target speech data.

[0043] In combination with the third aspect, the embodiment of the present application provides a first possible implementation of the third aspect, which further includes a training module; the training module is used to:

[0044] Obtain common voice data in multiple different scenarios;

[0045] Vectorize common speech data in different scenarios to obtain speech vectors;

[0046] At the same time, speech vectors in different scenarios are used to train a general speech recognition model; the general speech recognition model includes an encoder and a decoder that work sequentially; the encoder is used to extract and transform features of the input speech vector; the decoder is used to determine the semantic information corresponding to the speech vector based on the attention distribution strategy.

[0047] In combination with the first possible implementation of the third aspect, the embodiment of the present application provides a second possible implementation of the third aspect, wherein the encoder includes a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer;

[0048] The local self-attention layer is used to calculate the correlation between different speech vectors;

[0049] The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation;

[0050] The decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer;

[0051] The global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors;

[0052] The encoding-decoding attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information;

[0053] The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution.

[0054] In combination with the third aspect, an embodiment of the present application provides a third possible implementation of the third aspect, wherein the learning module, when used to perform transfer learning on a general speech recognition model using a target vertical domain training sample to obtain a trained vertical domain speech recognition model, is specifically used to:

[0055] Freezing at least some of the network layers that have feature extraction functions in a general speech recognition model;

[0056] According to the characteristic information of the target vertical domain, the network layer in the unfrozen state is adjusted;

[0057] Use the target vertical domain training samples to train the general speech recognition model;

[0058] The trained general speech recognition model is verified using the target vertical domain verification sample, and after the verification passes, the trained vertical domain speech recognition model is obtained.

[0059] In combination with the first possible implementation of the third aspect, the embodiment of the present application provides a fourth possible implementation of the third aspect, wherein the first recognition module is used to input the target voice data belonging to the target vertical domain into the trained vertical domain voice recognition model, and combine the hot words in the target vertical domain to obtain the recognition result of the target voice data, specifically for:

[0060] Inputting the target speech data belonging to the target vertical domain into the encoder of the trained vertical domain speech recognition model to extract the second semantic feature information of the target speech data through the encoder;

[0061] Through the decoder of the trained vertical domain speech recognition model, the recognition result of the target speech data is determined based on the second semantic feature information and the reference hot words in the hot word library; the hot words in the hot word library are the words in the target vertical domain obtained according to the frequency of use statistics.

[0062] In combination with the fourth possible implementation of the third aspect, the embodiment of the present application provides a fifth possible implementation of the third aspect, wherein the first recognition module is used to determine the recognition result of the target speech data based on the second semantic feature information and the reference hot words in the hot word library through the decoder of the vertical domain speech recognition model completed by the training, and is specifically used to:

[0063] For each speech vector, searching for at least one reference result corresponding to the speech vector through the decoder of the trained vertical domain speech recognition model; the reference result is a text corresponding to the speech vector and indicating its meaning;

[0064] For each speech vector, determine the candidate result of the speech vector according to the matching relationship between the reference result corresponding to the speech vector and the reference hot word;

[0065] According to the candidate results of each speech vector, the recognition result of the target speech data is determined.

[0066] In combination with the first possible implementation of the third aspect, the embodiment of the present application provides a sixth possible implementation of the third aspect, wherein the training module, when used to obtain common voice data in multiple different scenarios, is specifically used to:

[0067] Acquire audio data in a target usage scenario through at least one audio acquisition method; the target usage scenario includes at least one of the following: daily conversation, human-computer conversation, and film and television programs; the audio acquisition method includes at least one of the following: microphone recording, mobile phone recording, computer recording, and network recording;

[0068] The audio data is preprocessed to obtain general voice data; the preprocessing includes at least one of the following: screening valid segments, data segmentation, format adjustment, sampling rate adjustment, and channel number adjustment.

[0069] In a fourth aspect, an embodiment of the present application further provides a speech recognition device, including:

[0070] The second acquisition module is used to acquire the target voice data of the target vertical domain;

[0071] The second recognition module is used to input the target voice data into the trained vertical domain voice recognition model to obtain the recognition result of the target voice data; the vertical domain voice recognition model is obtained by transfer learning the trained general voice recognition model using the target vertical domain training samples.

[0072] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, steps in any possible implementation of the first aspect or any possible implementation of the second aspect are performed.

[0073] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computer program executes the steps of any possible implementation of the first aspect or any possible implementation of the second aspect.

[0074] The embodiments of the present application provide a speech recognition method, device, electronic device and computer-readable storage medium, wherein the method includes: obtaining a general speech recognition model trained using general training samples; performing transfer learning on the general speech recognition model using target vertical domain training samples to obtain a trained vertical domain speech recognition model; inputting the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combining the hot words in the target vertical domain to obtain the recognition result of the target speech data. The method provided in the present application performs transfer learning on the trained general speech recognition model using the target vertical domain training samples, so that the obtained vertical domain speech recognition model is more suitable for the vertical domain, thereby ensuring the accuracy of speech recognition of the target speech data belonging to the target vertical domain using the vertical domain speech recognition model. At the same time, when using the vertical domain speech recognition model, hot words are used to assist, further improving the accuracy of the recognition results.

[0075] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0077] Figure 1 A flow chart of a speech recognition method provided by an embodiment of the present application is shown;

[0078] Figure 2 A flowchart of a general speech recognition model training method provided in an embodiment of the present application is shown;

[0079] Figure 3 A schematic diagram of a network architecture of a general speech recognition model provided in an embodiment of the present application is shown;

[0080] Figure 4 A flow chart of a method for completing transfer learning by freezing a network layer provided in an embodiment of the present application is shown;

[0081] Figure 5 A schematic diagram of the structure of a speech recognition device provided in an embodiment of the present application is shown;

[0082] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0083] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0084] Among the related technologies, the development of intelligent speech recognition methods and systems for vertical scenarios is of great significance. Its purpose is to provide more accurate and efficient speech recognition solutions for specific industries and fields, helping professionals to use voice to communicate and record more conveniently at work.

[0085] However, when training speech recognition models for vertical scenarios, a large amount of speech data for vertical scenarios is often required. Due to the insufficient amount of vertical scenario data, the speech recognition accuracy for vertical scenarios is low and cannot meet the speech recognition needs in specific fields.

[0086] Therefore, in the case of insufficient voice data in vertical scenarios, it is of great significance to develop intelligent voice recognition methods and systems for vertical scenarios. The purpose is to provide more accurate and efficient voice recognition solutions for specific industries and fields, helping professionals to use voice to communicate and record more conveniently at work.

[0087] In response to the above problems, this application provides a speech recognition method for vertical scenarios, such as Figure 1 As shown, the following steps are included:

[0088] S101, obtaining a general speech recognition model trained using general training samples;

[0089] S102, using the target vertical domain training sample to perform transfer learning on the general speech recognition model to obtain a trained vertical domain speech recognition model;

[0090] S103, inputting the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combining with the hot words in the target vertical domain to obtain the recognition result of the target speech data.

[0091] In step S101, the general speech recognition model refers to a model trained using speech samples from various fields. Here, the speech samples from various fields correspond to the vertical domain speech samples. The vertical domain refers to a specific technical field, and the classification method of the general speech samples from various fields used to train the general speech recognition model can be the same as the classification method of the vertical domain training samples, or it can be different.

[0092] Specifically, the training samples used to train the general speech recognition model can be samples from the news field, sports field, and agricultural field, and the corresponding vertical domain training samples can be samples from the aviation field (at this time, the classification method of the vertical domain training samples is the same as the classification method of the general training samples, both are classified according to the technical field, and the vertical domain training samples are not in the general training samples); the vertical domain training samples can also be the steel utensil field (at this time, the classification method of the vertical domain training samples is different from the classification method of the general training samples, because the steel utensil field can be used in many different technical fields such as news and sports at the same time).

[0093] Generally speaking, the classification method of the training samples used for training the general speech recognition model is preferably different from the classification method of the vertical domain training samples, so that the vertical domain training data can be used to a certain extent when training the general speech recognition model (not all vertical domain training samples are used in the process of training the general language recognition model), when performing vertical domain transfer learning in step S102, otherwise there will be no vertical domain training samples at all in the general training samples, which will be abrupt during transfer learning and the learning effect will be worse. Correspondingly, if the classification methods of the two samples are the same, regardless of whether the vertical domain training samples are used when training the general speech recognition model, it will eventually make the transfer learning effect worse to a certain extent. Of course, in the case of the same classification method, the solution can also be implemented by using a small amount of vertical domain training samples to participate in the training process of the general speech recognition model.

[0094] The general language model in step S101 can be pre-trained (since the trainer is not the user, the samples in various fields used to train the general speech recognition model do not need to be classified at this time), such as a trained model obtained from an open source database, or it can be temporarily trained using general training samples. If the temporary training method is adopted, the general training samples can be obtained from an open source database, can be temporarily collected, or can be a combination of the two methods.

[0095] After obtaining the general speech recognition model, the general speech recognition model can be processed by the transfer learning method in step S102 to obtain a speech recognition model for the vertical domain. Transfer learning is a method in machine learning that refers to applying the solution model of an existing problem to a new problem to improve the model's ability to solve new problems. This process mainly achieves the purpose of transfer learning by finding the similarity between existing knowledge and new knowledge and using the transfer of this similarity.

[0096] When step S102 is executed, it is first necessary to collect the target vertical domain training samples, and the source of the samples is preferably not single. It is best to obtain audio data under various environmental conditions. For example, audio data obtained in a relatively quiet environment, audio data obtained in a relatively noisy environment. The closer the target vertical domain training samples are to the real production and living environment, the better.

[0097] There are many ways to conduct transfer learning, such as instance-based transfer learning, feature-based transfer learning, shared parameter-based transfer learning, etc. These methods have their own advantages and disadvantages. A solution suitable for the technical environment of this solution will be introduced later.

[0098] By executing steps S101 and S102, the training of the vertical domain speech recognition model can be completed, and then the trained vertical domain speech recognition model can be directly used in step S103. That is, the target speech data belonging to the target vertical domain can be input into the trained vertical domain speech recognition model, and combined with the hot words in the target vertical domain to obtain the recognition result of the target speech data. The recognition result is the text information or semantic information corresponding to the target speech data belonging to the target vertical domain.

[0099] Among them, hot words refer to words that are only used with high frequency in the target vertical domain. In the specific implementation, the results output by the vertical domain speech recognition model can be combined with hot words to determine the final recognition result. Specifically, the results output by the model include four words A, B, C, and D, and the basic probability of each word being the recognition result is 20%, 25%, 28%, and 27%, respectively. After that, the probability of occurrence of hot words (the probability can be determined based on the frequency of occurrence of hot words) can be used to select one from the four words A, B, C, and D as the recognition result. For example, the probability of occurrence of A is 30%; the probability of occurrence of B is 80%; the probability of occurrence of C is 50%; and D is not a hot word. After adjusting the basic probability by the probability of occurrence, the final probabilities of the four words A, B, C, and D can be determined to be 6%, 20%, 14%, and 0, respectively, by multiplying the two probabilities (since D is not a hot word, its probability of occurrence is set to 0, and the probability of occurrence of words that are not hot words can also be set to a uniform smaller value to implement the solution). After that, B can be used as the recognition result.

[0100] The above is an example of using hot words to assist the vertical domain speech recognition model in recognition. Of course, there are other implementation methods, which will be explained in detail later.

[0101] It should be noted that the execution subject of steps S101-S102 and the execution subject of step S103 may be the same or different. In most cases, the device for training the model and the device for using the model are not the same device, for example, the device for training the model is a server, and the device for using the model is a terminal on the user side (such as a mobile phone).

[0102] The following provides a method for training a general speech recognition model. It should be noted that the execution subject of the training of the general speech recognition model can be the same as the execution subject of steps S101-S102, or the same as the execution subject of step S103, or of course, different. For example, if the general speech recognition model is obtained from an open source database, the execution subject of the training of the general speech recognition model is different from the execution subject of steps S101-S102.

[0103] Specifically, Figure 2As shown, the general speech recognition model can be trained as follows.

[0104] S201, obtaining common voice data in multiple different scenarios;

[0105] S202, respectively vectorizing common speech data in different scenarios to obtain speech vectors;

[0106] S203, simultaneously using speech vectors in different scenarios to train a general speech recognition model; the general speech recognition model includes an encoder and a decoder that work sequentially; the encoder is used to extract and transform features of the input speech vector; the decoder is used to determine the semantic information corresponding to the speech vector based on an attention distribution strategy.

[0107] In step S201, the scene classification method can be various. As mentioned above, the scene can be divided according to the technical field, or it can be distinguished according to the life scene or the work scene. The purpose of scene division here is to ensure that the samples obtained are rich. If the scene covered by the sample is too few, the accuracy of the general voice recognition model will decrease and the value will decrease. Therefore, in actual operation, after obtaining the general voice data, the general voice data can be classified, and then the data volume of each category of general voice data can be counted respectively. If the data volume of each category of general voice data exceeds the predetermined requirement (such as more than 100 segments, and the effective sound in each segment exceeds 5 seconds), and the difference between the data volume of different categories of general voice data is less than the predetermined value, it can be considered that the current general voice data is usable, and step S202 can be executed. In specific implementation, a technical classification table or a classification table of other classification methods can be used to determine whether the general voice data can cover all categories, or to determine whether the covered categories have met the requirements.

[0108] Specifically, the steps of obtaining common voice data in multiple different scenarios can be implemented as follows:

[0109] Acquire audio data in a target usage scenario through at least one audio acquisition method; the target usage scenario includes at least one of the following: daily conversations, human-computer conversations, film and television programs, concerts or stage plays; the audio acquisition method includes at least one of the following: microphone recording, mobile phone recording, computer recording, network recording, virtual reality device recording, voice chat function recording in games, environmental monitoring equipment or smart home equipment recording, social media live broadcast platform or online conference tool recording;

[0110] For example, using virtual reality equipment to simulate conversations in different scenarios to obtain realistic audio data of daily conversations;

[0111] Obtain audio data of daily conversations through the in-game voice chat function;

[0112] Obtain audio data of daily conversations in family life through environmental monitoring devices or smart home devices;

[0113] Record daily conversations during webcasts via social media live streaming platforms or online conferencing tools.

[0114] Use professional recording equipment to capture audio data of live conversations or speeches at concerts or stage plays.

[0115] In step S202, the general voice data needs to be vectorized. This step mainly translates the voice to obtain the corresponding vector so that the model can recognize the voice. When vectorizing, it is usually done frame by frame, that is, the voice signal is first divided into a series of voice frames, and then each voice frame is vectorized separately so that each voice vector can represent a voice frame.

[0116] Specifically, when vectorizing through the encoder, the audio data also needs to be cleaned up through preprocessing, that is, the method provided in the present application also includes: preprocessing the audio data to obtain general voice data; the preprocessing includes at least one of the following: screening valid segments, data segmentation, format adjustment, sampling rate adjustment, and channel number adjustment.

[0117] Data segmentation mainly involves segmenting the speech signal into a series of speech frames so that the speech frames can be vectorized. After that, the sound features of each speech frame are extracted and converted into vector representation using the Mel spectrum coefficient method. At the same time, preprocessing operations such as speech enhancement can be used to improve the accuracy of the model.

[0118] In step S203, the model can be trained using the speech vectors of all or part of the general speech data obtained. Generally, in step S203, the model can be a blank model before being trained.

[0119] The speech recognition model is mainly composed of two parts, namely the encoder and the decoder. The main task of the encoder is to convert the input sound signal into a feature sequence. This process is usually implemented through a deep learning model, such as using a convolutional neural network (CNN) or a transformer to extract multi-level features of the sound signal. These feature sequences are then fed into the decoder. The decoder searches on the hidden Markov model (HMM) based on the Viterbi algorithm to generate a state sequence of the observation value sequence with the maximum probability (i.e., the acoustic features of the speech to be recognized). More specifically, the decoder generates a word sequence based on these feature sequences, thereby completing the conversion of sound to text.

[0120] like Figure 3 As shown, a schematic diagram of the network architecture of the general speech recognition model is shown.

[0121] from Figure 3 As can be seen from the figure, the encoder includes a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer (corresponding to Figure 3 mid-feedforward network layer);

[0122] Among them, the local self-attention layer is used to calculate the correlation between different speech vectors;

[0123] The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation;

[0124] The local self-attention layer uses the local attention mechanism to calculate the dependency between each element (speech vector) and other elements in the input sequence. In the local self-attention layer, for each position in the input sequence, a local neighborhood window (i.e., observation window) size is determined. In this local neighborhood window, the similarity between the current position (current speech vector) and other positions (other adjacent speech vectors) is calculated, that is, the feature of the current position (the value of the speech vector) is dot-producted with the features of other positions in the window to obtain the similarity of the two features (the similarity of the two speech vectors). The similarity is then normalized by softmax to obtain the attention weight, and the attention weight is used to perform weighted summation on the features of other positions in the window to obtain the context representation of the current position (i.e., the correlation between different speech vectors). Finally, the local self-attention layer outputs the result in the form of a feature vector sequence, which records the correlation of each speech vector in turn (i.e., each feature in the feature vector sequence corresponds to the correlation of a speech vector).

[0125] The feedforward neural network layer is another component in the encoder. The feedforward neural network layer accepts the feature vector sequence output by the self-attention layer as input, and processes the correlation between each speech vector in the feature vector sequence (each feature in the feature vector sequence) through a multi-layer perceptron. Specifically, the feedforward neural network layer consists of multiple fully connected layers and non-linear activation functions. The function of these layers is to perform non-linear transformations on each vector-like feature in the feature vector sequence to further extract abstract semantic information. In the encoder, local self-attention layers and feedforward neural network layers are usually stacked alternately multiple times. Each stacked local self-attention layer and feedforward neural network layer will further extract and transform the input sequence. Through multiple stacking, the encoder can gradually extract deeper and richer semantic information from the input sequence.

[0126] Correspondingly, the decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer;

[0127] Among them, the global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors; in the global self-attention layer of the decoder, each output element generates a query vector, a key vector and a value vector. By calculating the attention score between the query vector and all key vectors and taking the weighted sum of all value vectors, the context information of each output element (speech vector) can be obtained.

[0128] The encoder-decoder attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information; the encoder-decoder attention layer is a layer unique to the decoder, which is used to focus the decoder's attention on the feature vector sequence generated by the encoder when generating each output element. Specifically, the encoder-decoder attention layer uses the feature vector sequence generated by the encoder as the key and value, calculates the attention score between the decoder's query and the key vector, and performs a weighted summation on the value vector. In this way, the decoder can determine the attention distribution when generating each output element based on the semantic information of the input sequence.

[0129] The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution. Specifically, the feedforward neural network layer is composed of multiple fully connected layers and nonlinear activation functions in the decoder, which is used to perform nonlinear transformation on the feature vector to further extract abstract semantic information.

[0130] In the specific implementation, in order to retain the order information of the input sequence, the general speech recognition model (Transformer-based model) uses position encoding to embed the position information of each input frame (the position information is used to record the chronological relationship between different speech frames) into the representation of the vector (speech vector).

[0131] In this scheme, both the encoder and the decoder are forward propagation. In each decoding layer of the decoder, the text label corresponding to the current frame is predicted based on the context information output by the encoder. Through multiple decoding layers of iteration, the semantic information of the speech vector is finally determined. After the semantic information is determined, the standard information (the text label of the accurate semantic information corresponding to the training sample that has been determined during training, and the text label can be manually determined) can be used to calculate the difference between the output speech information and the standard information, and the difference is used as the loss function. The model parameters are optimized through the back propagation algorithm to make it more accurately predict the semantic information, and finally achieve the purpose of training the model.

[0132] The transfer learning part in step S102 is explained below. Generally speaking, freezing the network layer is mainly to keep the parameters of the pre-trained model from being updated, and only train the unfrozen layers. This can prevent the weights of the pre-trained model from being destroyed, and can also save a lot of computing resources and time.

[0133] When determining which layers need to be frozen, the general approach is to freeze the bottom layer of the model and only fine-tune the network later. To train the unfrozen network layers, you can use stochastic gradient descent (SGD) or other optimizers for training. During training, we need to monitor the performance of the validation set so that we can stop training and adjust the hyperparameters in time.

[0134] like Figure 4 As shown, this scheme provides a specific method for completing transfer learning by freezing the network layer, including the following steps:

[0135] S1021, freezing at least part of the network layers having a feature extraction function in the general speech recognition model;

[0136] S1022, adjusting the network layer in an unfrozen state according to the characteristic information of the target vertical domain;

[0137] S1023, training a general speech recognition model using the target vertical domain training sample;

[0138] S1024, using the target vertical domain verification sample to verify the trained general speech recognition model, and after the verification is passed, the trained vertical domain speech recognition model is obtained.

[0139] In step S1021, some network layers of the general speech recognition model are frozen, that is, their parameters are not updated. By freezing the first six transformer layers of the encoder (the transformer layer is a part of the network layer of the encoding layer, each layer is composed of a local self-attention layer and a feedforward neural network layer), these network layers are usually the underlying feature extraction layers or intermediate layers, and the feature representations of these layers are usually universal and do not need to be significantly adjusted.

[0140] In step S1022, for other unfrozen network layers, fine-tuning is performed according to the characteristics of the vertical domain scenario task (the characteristic information of the target vertical domain). The network structure is adjusted to adapt to the new task requirements by increasing the number of decoder layers, and the L2 regularization method is used to prevent the parameter values ​​from being too large and evenly distribute the parameters to each feature. In addition, the Adam optimization algorithm is used to speed up the training process.

[0141] During fine-tuning, you can use data augmentation to expand the training data set. Generate new training samples by adding noise, reverberation, speed disturbance, pitch change, etc. to the audio. This helps the model better adapt to factors such as noise and voice changes in vertical scenarios.

[0142] Among them, the main purpose of the L2 regularization method is to control the complexity of the model and reduce overfitting. More specifically, when training the model, the L2 regularization method adds a penalty term proportional to the sum of the squares of the model weights to the loss function to limit the size of the model weights. Mathematically, the formula for L2 regularization is: L is the loss function, W is the network weight, b is the bias value, m is the number of samples, n_x is the number of network layers, and λ is a hyperparameter. Its goal is to make all weights as small as possible while minimizing the loss function. This can be achieved through the gradient descent method, that is, adding a penalty term proportional to the size of the weight in the process of updating the parameters. In addition, L2 regularization assumes that the prior distribution of the weight w is a Gaussian distribution.

[0143] The Adam optimization algorithm, full name "Adaptive Moment Estimation", is an algorithm used to solve optimization problems with large amounts of data and high feature dimensions in machine learning. The Adam algorithm combines two optimization algorithms: "Adagrad" and "RMSProp". Adagrad is suitable for processing sparse gradients, while RMSProp is suitable for processing non-steady-state data. From a computational point of view, the Adam algorithm is based on the first-order derivative of the objective function, which ensures relatively high efficiency. In addition, the Adam algorithm only requires a small amount of memory, which makes it very advantageous in practical use.

[0144] However, although the Adam algorithm has been widely used in practical applications and has achieved good results, its theoretical properties are still relatively complex, and qualitative understanding is relatively simple, while quantitative understanding is more difficult. In general, the Adam optimization algorithm provides an effective and efficient tool to solve optimization problems in machine learning.

[0145] Afterwards, in S1023, the target vertical domain training sample can be used to train the general speech recognition model. The training method is to input the target vertical domain training sample sample into the general speech recognition model, and compare the output of the general speech recognition model with the standard information recorded in the target vertical domain training sample (the text label of the accurate semantic information corresponding to the training sample determined during training, which can be manually determined) to calculate the difference between the two, and use the difference as a loss function to optimize the model parameters through the back propagation algorithm, so that it can more accurately predict the semantic information, and finally achieve the purpose of training the model. After the training is completed, it is necessary to further verify it through the verification method in step S1024. When the performance of accuracy and stability meets the established requirements, the model training can be completed. At this time, the model obtained is the vertical domain speech recognition model that has been trained. If it is found that the model cannot meet the requirements after verification by the verification sample, it is also necessary to increase the sample size by the aforementioned data enhancement method or by collecting samples again, and continue to train the model until the model can pass the verification sample test.

[0146] Finally, in addition to the use of hot words described above, the hot words can also be used to coordinate the trained vertical domain speech recognition model in the following manner. Specifically, step S103 can be implemented in the following manner:

[0147] S1031, inputting the target speech data belonging to the target vertical domain into the encoder of the trained vertical domain speech recognition model, so as to extract the second semantic feature information of the target speech data through the encoder;

[0148] S1032, through the decoder of the trained vertical domain speech recognition model, determine the recognition result of the target speech data based on the second semantic feature information and the reference hot words in the hot word library; the hot words in the hot word library are the words in the target vertical domain obtained according to the usage frequency statistics.

[0149] In step S1031, it should be noted that it is necessary to judge whether the target voice data belongs to the data in the target vertical domain. Since the vertical domain voice recognition model is designed for a specific vertical domain (such as a specific technical field), the recognition effect for voice data in other vertical domains is not ideal. To ensure the recognition effect, the technical field of the target voice data should be judged before the target voice data is input into the model. This can be achieved by limiting the source of the voice data or by manual verification.

[0150] In step S1032, a hot word library is used in conjunction with the second semantic feature information to determine the final recognition result. The hot word library contains a large number of hot words in the target vertical domain. These hot words can reflect the unique habits in the vertical domain, or in other words, in the target vertical domain, when the pronunciation is the same or the context information is similar, the probability of hot words appearing is higher than other common words. Therefore, the accuracy of the recognition results can be improved by constructing a hot word library in advance. Specifically, the hot word library can count hot words whose frequency of occurrence exceeds a predetermined value, or it can count the frequency of use of each hot word. The higher the frequency, the higher the probability that the word appears in the candidate results. Therefore, by using the hot word library in conjunction with the second semantic feature information, the accuracy of the recognition results can be further improved.

[0151] In specific implementation, the hot word library can be used in the following manner, that is, step S1032 can be implemented in the following manner:

[0152] For each speech vector, searching for at least one reference result corresponding to the speech vector through the decoder of the trained vertical domain speech recognition model; the reference result is a text corresponding to the speech vector and indicating its meaning;

[0153] For each speech vector, determine the candidate result of the speech vector according to the matching relationship between the reference result corresponding to the speech vector and the reference hot word;

[0154] According to the candidate results of each speech vector, the recognition result of the target speech data is determined.

[0155] Specifically, when processing through the decoder, each speech vector is processed separately. First, the decoder needs to find the reference result of the speech vector (the result obtained by the decoder when there is no hot word library to cooperate), and then the final candidate result is helped to find according to the matching relationship between the reference result and the reference hot word in the hot word library. Specifically, whether the reference hot word in the hot word library appears in the reference result, if it appears, it means that the credibility of the reference result is relatively high. Correspondingly, if the frequency of occurrence of each reference hot word is recorded in the hot word library, the credibility of the reference result can be further accurately determined based on the frequency of occurrence of the reference hot word in the reference result.

[0156] Generally, the acoustic model generates multiple candidate results. The decoder saves the top few optimal paths during the decoding search process, which represent possible text results (reference results). During the decoder search process, the system can determine whether a hot word is included in the decoding result of each frame (each speech vector) based on the established hot word library. If a hot word appears in the candidate results, the reference result can be further processed, that is, the probability of the reference result being a candidate result is increased, and the probability of it appearing in the final recognition result is increased.

[0157] Embodiment 2:

[0158] Corresponding to the aforementioned speech recognition method, the present application also provides a speech recognition method that directly uses the trained vertical domain speech recognition model for recognition, the method comprising:

[0159] Obtain target voice data of the target vertical domain;

[0160] The target speech data is input into the trained vertical domain speech recognition model to obtain the recognition result of the target speech data; the vertical domain speech recognition model is obtained by performing transfer learning on the trained general speech recognition model using the target vertical domain training samples.

[0161] Specifically, the process of training the vertical domain speech recognition model in this method can refer to the content in the aforementioned embodiment 1, and will not be repeated here.

[0162] Embodiment three:

[0163] Based on the same technical concept, the embodiment of the present application also provides a speech recognition device, Figure 5 A schematic diagram of the structure of a speech recognition device provided in an embodiment of the present application is shown. Figure 5 As shown, the device comprises:

[0164] A first acquisition module 501 is used to acquire a general speech recognition model trained using a general training sample;

[0165] A learning module 502 is used to perform transfer learning on the general speech recognition model using the target vertical domain training samples to obtain a trained vertical domain speech recognition model;

[0166] The first recognition module 503 is used to input the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combine the hot words in the target vertical domain to obtain the recognition result of the target speech data.

[0167] Optionally, a training module is also included; the training module is used to:

[0168] Obtain common voice data in multiple different scenarios;

[0169] Vectorize common speech data in different scenarios to obtain speech vectors;

[0170] At the same time, speech vectors in different scenarios are used to train a general speech recognition model; the general speech recognition model includes an encoder and a decoder that work sequentially; the encoder is used to extract and transform features of the input speech vector; the decoder is used to determine the semantic information corresponding to the speech vector based on the attention distribution strategy.

[0171] Optionally, the encoder comprises a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer;

[0172] The local self-attention layer is used to calculate the correlation between different speech vectors;

[0173] The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation;

[0174] The decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer;

[0175] The global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors;

[0176] The encoding-decoding attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information;

[0177] The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution.

[0178] Optionally, when the learning module is used to perform transfer learning on a general speech recognition model using a target vertical domain training sample to obtain a trained vertical domain speech recognition model, it is specifically used to:

[0179] Freezing at least some of the network layers that have feature extraction functions in a general speech recognition model;

[0180] According to the characteristic information of the target vertical domain, the network layer in the unfrozen state is adjusted;

[0181] Use the target vertical domain training samples to train the general speech recognition model;

[0182] The trained general speech recognition model is verified using the target vertical domain verification sample, and after the verification passes, the trained vertical domain speech recognition model is obtained.

[0183] Optionally, when the first recognition module is used to input the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combine the hot words in the target vertical domain to obtain the recognition result of the target speech data, it is specifically used to:

[0184] Inputting the target speech data belonging to the target vertical domain into the encoder of the trained vertical domain speech recognition model to extract the second semantic feature information of the target speech data through the encoder;

[0185] Through the decoder of the trained vertical domain speech recognition model, the recognition result of the target speech data is determined based on the second semantic feature information and the reference hot words in the hot word library; the hot words in the hot word library are the words in the target vertical domain obtained according to the frequency of use statistics.

[0186] Optionally, when the first recognition module is used to determine the recognition result of the target speech data based on the second semantic feature information and the reference hot words in the hot word library through the decoder of the trained vertical domain speech recognition model, it is specifically used to:

[0187] For each speech vector, searching for at least one reference result corresponding to the speech vector through the decoder of the trained vertical domain speech recognition model; the reference result is a text corresponding to the speech vector and indicating its meaning;

[0188] For each speech vector, determine the candidate result of the speech vector according to the matching relationship between the reference result corresponding to the speech vector and the reference hot word;

[0189] According to the candidate results of each speech vector, the recognition result of the target speech data is determined.

[0190] Optionally, when the training module is used to obtain common speech data in multiple different scenarios, it is specifically used to:

[0191] Acquire audio data in a target usage scenario through at least one audio acquisition method; the target usage scenario includes at least one of the following: daily conversations, human-computer conversations, film and television programs, concerts or stage plays; the audio acquisition method includes at least one of the following: microphone recording, mobile phone recording, computer recording, network recording, virtual reality device recording, voice chat function recording in games, environmental monitoring equipment or smart home equipment recording, social media live broadcast platform or online conference tool recording;

[0192] The audio data is preprocessed to obtain general voice data; the preprocessing includes at least one of the following: screening valid segments, data segmentation, format adjustment, sampling rate adjustment, and channel number adjustment.

[0193] Embodiment 4:

[0194] Corresponding to the aforementioned speech recognition device, the present application also provides a speech recognition device that directly uses the trained vertical domain speech recognition model for recognition, and the device includes:

[0195] The second acquisition module is used to acquire the target voice data of the target vertical domain;

[0196] The second recognition module is used to input the target voice data into the trained vertical domain voice recognition model to obtain the recognition result of the target voice data; the vertical domain voice recognition model is obtained by transfer learning the trained general voice recognition model using the target vertical domain training samples.

[0197] Among them, the process of training the vertical domain speech recognition model can refer to the content in the aforementioned embodiment 1, and will not be repeated here.

[0198] Embodiment five:

[0199] Figure 6 A structural diagram of an electronic device provided for an embodiment of the present application includes: a processor 601, a memory 602 and a bus 603, wherein the memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device runs the above-mentioned information processing method, the processor 601 communicates with the memory 602 through the bus 603, and the processor 601 executes the machine-readable instructions to execute the method steps described in Example 1 or Example 2.

[0200] Embodiment six:

[0201] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps described in the first or second embodiment are executed.

[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, electronic devices, and computer-readable storage media can refer to the corresponding processes in the aforementioned method embodiments one or two, and will not be repeated here.

[0203] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices, electronic devices, and computer-readable storage media can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0206] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0207] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A speech recognition method, characterized in that: include: Obtain a general speech recognition model trained using general training samples; Use the target vertical domain training samples to perform transfer learning on the general speech recognition model to obtain a trained vertical domain speech recognition model; Inputting the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combining with the hot words in the target vertical domain to obtain the recognition result of the target speech data; The general speech recognition model is trained through the following steps: Obtain common voice data in multiple different scenarios; Vectorize common speech data in different scenarios to obtain speech vectors; The general speech recognition model is trained using speech vectors in different scenarios at the same time; the general speech recognition model includes an encoder and a decoder that work in sequence; the encoder is used to extract and transform features of the input speech vector; The decoder is used to determine the semantic information corresponding to the speech vector based on the attention distribution strategy; The encoder comprises a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer; The local self-attention layer is used to calculate the correlation between different speech vectors; The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation; The decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer; The global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors; The encoding-decoding attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information; The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution.

2. The method according to claim 1, characterized in that: Step 1: Use the target vertical domain training sample to perform transfer learning on the general speech recognition model to obtain a trained vertical domain speech recognition model, including: Freezing at least some of the network layers that have feature extraction functions in a general speech recognition model; According to the characteristic information of the target vertical domain, the network layer in the unfrozen state is adjusted; Use the target vertical domain training samples to train the general speech recognition model; The trained general speech recognition model is verified using the target vertical domain verification sample, and after the verification passes, the trained vertical domain speech recognition model is obtained.

3. The method according to claim 1, characterized in that: The step of inputting the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model and combining the hot words in the target vertical domain to obtain the recognition result of the target speech data includes: Inputting the target speech data belonging to the target vertical domain into the encoder of the trained vertical domain speech recognition model to extract the second semantic feature information of the target speech data through the encoder; Through the decoder of the trained vertical domain speech recognition model, the recognition result of the target speech data is determined based on the second semantic feature information and the reference hot words in the hot word library; the hot words in the hot word library are the words in the target vertical domain obtained according to the frequency of use statistics.

4. The method according to claim 3, characterized in that: Determining the recognition result of the target speech data based on the second semantic feature information and the reference hot words in the hot word library by the decoder of the trained vertical domain speech recognition model includes: For each speech vector, searching for at least one reference result corresponding to the speech vector through the decoder of the trained vertical domain speech recognition model; the reference result is a text corresponding to the speech vector and indicating its meaning; For each speech vector, determine the candidate result of the speech vector according to the matching relationship between the reference result corresponding to the speech vector and the reference hot word; According to the candidate results of each speech vector, the recognition result of the target speech data is determined.

5. The method according to claim 1, characterized in that: Steps to obtain common voice data in multiple different scenarios, including: Acquire audio data in a target usage scenario through at least one audio acquisition method; the target usage scenario includes at least one of the following: daily conversations, human-computer conversations, film and television programs, concerts or stage plays; the audio acquisition method includes at least one of the following: microphone recording, mobile phone recording, computer recording, network recording, virtual reality device recording, voice chat function recording in games, environmental monitoring equipment or smart home equipment recording, social media live broadcast platform or online conference tool recording; The audio data is preprocessed to obtain general voice data; the preprocessing includes at least one of the following: screening valid segments, data segmentation, format adjustment, sampling rate adjustment, and channel number adjustment.

6. A speech recognition method, characterized in that: include: Obtain target voice data of the target vertical domain; Input the target speech data into the trained vertical domain speech recognition model to obtain the recognition result of the target speech data; the vertical domain speech recognition model is obtained by performing transfer learning on the trained general speech recognition model using the target vertical domain training samples; Among them, the general speech recognition model is trained through the following steps: Obtain common voice data in multiple different scenarios; Vectorize common speech data in different scenarios to obtain speech vectors; The general speech recognition model is trained using speech vectors in different scenarios at the same time; the general speech recognition model includes an encoder and a decoder that work in sequence; the encoder is used to extract and transform features of the input speech vector; the decoder is used to determine the semantic information corresponding to the speech vector based on the attention distribution strategy; The encoder comprises a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer; The local self-attention layer is used to calculate the correlation between different speech vectors; The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation; The decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer; The global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors; The encoding-decoding attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information; The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution.

7. A speech recognition device, characterized in that: include: A first acquisition module is used to acquire a general speech recognition model trained using a general training sample; A learning module, used to perform transfer learning on a general speech recognition model using target vertical domain training samples to obtain a trained vertical domain speech recognition model; A first recognition module, configured to input the target speech data belonging to the target vertical domain into the trained vertical domain speech recognition model, and combine the hot words in the target vertical domain to obtain the recognition result of the target speech data; The device also includes: a training module; The training module is used to: Obtain common voice data in multiple different scenarios; Vectorize common speech data in different scenarios to obtain speech vectors; The general speech recognition model is trained using speech vectors in different scenarios at the same time; the general speech recognition model includes an encoder and a decoder that work in sequence; the encoder is used to extract and transform features of the input speech vector; the decoder is used to determine the semantic information corresponding to the speech vector based on the attention distribution strategy; The encoder comprises a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer; The local self-attention layer is used to calculate the correlation between different speech vectors; The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation; The decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer; The global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors; The encoding-decoding attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information; The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution.

8. A speech recognition device, characterized in that: include: The second acquisition module is used to acquire the target voice data of the target vertical domain; A second recognition module is used to input the target speech data into the trained vertical domain speech recognition model to obtain a recognition result of the target speech data; the vertical domain speech recognition model is obtained by performing transfer learning on the trained general speech recognition model using the target vertical domain training sample; Among them, the general speech recognition model is trained by the training module through the following steps: Obtain common voice data in multiple different scenarios; Vectorize common speech data in different scenarios to obtain speech vectors; The general speech recognition model is trained using speech vectors in different scenarios at the same time; the general speech recognition model includes an encoder and a decoder that work in sequence; the encoder is used to extract and transform features of the input speech vector; the decoder is used to determine the semantic information corresponding to the speech vector based on the attention distribution strategy; The encoder comprises a plurality of sequentially arranged encoding layers; each encoding layer is provided with a local self-attention layer and a feedforward neural network layer; The local self-attention layer is used to calculate the correlation between different speech vectors; The feedforward neural network layer is used to further extract the first semantic feature information of the speech vector based on the correlation; The decoder includes a plurality of sequentially arranged decoding layers; each decoding layer is provided with a global self-attention layer, an encoding-decoding attention layer and a feedforward neural network layer; The global self-attention layer is used to calculate the correlation between different speech vectors based on the attention scores of different speech vectors; The encoding-decoding attention layer is used to determine the attention distribution of each speech vector based on the first semantic feature information; The feedforward neural network layer is used to determine the semantic information of the speech vector based on the correlation and the attention distribution.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method as described in any one of claims 1 to 5 or 6 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method as claimed in any one of claims 1 to 5 or 6.