Multi-speaker speech recognition method and system, storage medium and electronic equipment

By extracting audio features and using a large language model combined with the CTC greedy search algorithm, the input feature matrix is ​​dynamically updated to identify multiple speakers, which solves the problems of strong dependence and limited number of voices in the existing technology, and achieves efficient multi-talk in complex environments. Voice recognition.

CN118588091APending Publication Date: 2024-09-03SHANGHAI MIDU DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410747287.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing multi-speaker speech recognition technology has problems such as strong dependence, limited number of human voices, and poor recognition results in complex environments.

Method used

A multi-speaker speech recognition method is adopted to obtain audio data, extract audio features and combine them with special character tags, use the wav2vec model and large language model for feature fusion, combine with the CTC greedy search algorithm for decoding, and dynamically update the input feature matrix for recognition Multiple speakers.

Benefits of technology

It improves the recognition accuracy and efficiency in multi-talking environments, reduces the error rate, is suitable for complex environments and real-time applications, and enhances the ability to handle conversation length and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118588091A
    Figure CN118588091A
Patent Text Reader

Abstract

The invention provides a multi-speaker speech recognition method and system, a storage medium and electronic equipment, and the method comprises the following steps: obtaining audio data, and setting special characters; extracting audio features of the audio data, and extracting special character features; constructing an input feature matrix based on the extracted features; inputting the input feature matrix into a large language model to obtain a fusion feature matrix; decoding the fused feature matrix to obtain speaker recognition content; according to vectors corresponding to the special characters in the fusion feature matrix, judging whether the audio data still contain other speakers; and if yes, acquiring an updated input feature matrix based on the speaker recognition content and the input feature matrix, and acquiring other speaker recognition content based on the updated input feature matrix. The multi-speaker speech recognition method improves the accuracy and efficiency of multi-speaker speech recognition, and is suitable for speech processing in a complex audio environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of speech recognition, and in particular relates to a multi-speaker speech recognition method, system, storage medium and electronic equipment. Background Art

[0002] With the increasing popularity of modern communications and smart devices, speech recognition technology, especially multi-speaker speech recognition technology, has become increasingly important. Multi-speaker speech recognition technology not only involves the separation of human voices, but also includes the accurate recognition of the separated human voices. This process faces multiple challenges in technical implementation. Although existing processing methods can cope with these challenges to a certain extent, they also have some obvious drawbacks.

[0003] The existing multi-speaker speech recognition processing logic usually includes two main stages: voice separation and speech recognition. This multi-stage approach not only increases the complexity of the processing, but also increases the system's dependence on the accuracy of each stage. Errors in the previous stage (voice separation) will directly affect the accuracy of the next stage (speech recognition). In addition, the current voice separation model can usually only separate a limited number of voices during model training. This limitation limits the system's processing capabilities when faced with more speakers that may appear in actual scenarios. In addition, due to data limitations during model training, the model is difficult to effectively handle the number of unseen voices and speaking styles in actual applications. This lack of generalization ability limits the performance of the model in a changing environment. At the same time, in scenarios such as multi-person discussions and meetings, the number and overlap of speakers are high, accompanied by problems such as far-field speech signal attenuation, noise and reverberation interference, all of which put higher requirements on voice separation.

[0004] It can be seen that although the existing multi-speaker speech recognition processing logic can solve practical problems to a certain extent, it still faces challenges such as strong dependence and limited number of human voices. Therefore, how to provide a multi-speaker speech recognition method to solve the above problems has become an urgent problem to be solved by those skilled in the art. Summary of the invention

[0005] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a multi-speaker speech recognition method, system, storage medium and electronic device to solve the problems of strong dependence and limited number of human voices in the existing speech recognition technology, and to achieve the technical effect of multi-speaker voice recognition in complex environments.

[0006] In a first aspect, the present invention provides a multi-speaker speech recognition method, the method comprising the following steps: acquiring audio data, and setting audio characters and first speaker recognition content characters;

[0007] Extracting audio features of the audio data;

[0008] extracting audio character features and first speaker recognition content character features of the audio character and the first speaker recognition content character respectively;

[0009] constructing an input feature matrix based on the audio features, the audio character features, and the first speaker recognition content character features;

[0010] Inputting the input feature matrix into a large language model to obtain a fused feature matrix;

[0011] Decoding the fused feature matrix to obtain first speaker recognition content;

[0012] Determining whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix;

[0013] If so, an updated input feature matrix is ​​obtained based on the first speaker recognition content and the input feature matrix, and a second speaker recognition content is obtained based on the updated input feature matrix, and the input feature matrix is ​​updated again until the audio data no longer contains other speakers to obtain the speech content of all people in the audio data.

[0014] In an implementation manner of the first aspect, audio features of the audio data are extracted based on a wav2vec model.

[0015] In an implementation of the first aspect, extracting audio character features and first speaker recognition content character features of the audio character and the first speaker recognition content character respectively comprises the following steps:

[0016] Extracting audio character features of the audio characters based on a word segmenter and a multi-layer perceptron;

[0017] A first speaker recognition content character feature of the first speaker recognition content character is extracted based on a word segmenter and a multi-layer perceptron.

[0018] In an implementation of the first aspect, constructing an input feature matrix based on the audio features, the audio character features, and the first speaker recognition content character features includes:

[0019] The audio features, the audio character features and the first speaker recognition content character features are sequentially concatenated to obtain the input feature matrix.

[0020] In an implementation manner of the first aspect, the fused feature matrix is ​​decoded based on a CTC greedy search algorithm.

[0021] In an implementation of the first aspect, judging whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix comprises the following steps:

[0022] Input the vector into a multilayer perceptron and a softmax function to obtain a first probability that the speaker is still included and a second probability that the speaker is no longer included;

[0023] When the first probability is greater than the second probability, determining that the audio data still contains other speakers;

[0024] When the first probability is not greater than the second probability, it is determined that the audio data no longer contains other speakers.

[0025] In an implementation manner of the first aspect, acquiring an updated input feature matrix based on the first speaker recognition content and the input feature matrix includes:

[0026] The first speaker recognition content, the first speaker recognition content character feature, and the second speaker recognition content character feature are sequentially added to the end of the input feature matrix to obtain an updated input feature matrix.

[0027] In a second aspect, the present invention provides a multi-speaker speech recognition system, the system comprising a first acquisition module, a first extraction module, a second extraction module, a feature construction module, a feature fusion module, a second acquisition module and a speech judgment module;

[0028] The first acquisition module is used to acquire audio data and set audio characters and first speaker recognition content characters;

[0029] The first extraction module is used to extract audio features of the audio data;

[0030] The second extraction module is used to extract the audio character features and the first speaker recognition content character features of the audio character and the first speaker recognition content character respectively;

[0031] The feature construction module is used to construct an input feature matrix based on the audio features, the audio character features and the first speaker recognition content character features;

[0032] The feature fusion module is used to input the input feature matrix into a large language model to obtain a fused feature matrix;

[0033] The second acquisition module decodes the fusion feature matrix to obtain first speaker recognition content;

[0034] The speech judgment module is used to judge whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix;

[0035] If so, an updated input feature matrix is ​​obtained based on the first speaker recognition content and the input feature matrix, and a second speaker recognition content is obtained based on the updated input feature matrix, and the input feature matrix is ​​updated again until the audio data no longer contains other speakers to obtain the speech content of all people in the audio data.

[0036] In a third aspect, the present invention provides an electronic device, the electronic device comprising: a processor and a memory;

[0037] The memory is used to store computer programs;

[0038] The processor is used to execute the computer program stored in the memory, so that the electronic device executes the multi-speaker speech recognition method.

[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned multi-speaker speech recognition method when executed by an electronic device.

[0040] As described above, the multi-speaker speech recognition method, system, storage medium and electronic device of the present invention have the following beneficial effects:

[0041] The multi-speaker speech recognition method, system, storage medium and electronic device of the present invention solve the problems of strong dependence and limited number of human voices in the existing speech recognition technology, and can achieve the technical effect of multi-voice recognition in complex environments. By using special characters to mark different audio streams and speakers, combined with the audio features extracted by the wav2vec model, the speech content of different speakers can be effectively distinguished and recognized. This method greatly improves the accuracy of identifying each individual speech in a multi-speaking environment (such as a meeting or a discussion group). Through information fusion by a large language model (LLM), the model's understanding of the context and the continuity of speech recognition are further enhanced, thereby optimizing the recognition process and reducing the error rate. The CTC Generic Search decoding method is adopted to make the decoding process faster and more efficient. This fast decoding strategy is particularly suitable for applications that require real-time or quasi-real-time feedback, such as real-time call transcription or video conference recording. The input feature matrix is ​​dynamically updated during the iteration process, and whether to continue to recognize new speakers is determined based on the probability distribution. This design supports the system to adapt to the length and complexity of the conversation more flexibly and enhances the ability to handle dynamic conversations. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1Shown is a flow chart of a multi-speaker speech recognition method in one embodiment of the present invention;

[0043] Figure 2 FIG. 2 is a structural flow chart of a multi-speaker speech recognition method in one embodiment of the present invention;

[0044] Figure 3 FIG. 2 is a schematic diagram showing the structure of a multi-speaker speech recognition system in one embodiment of the present invention;

[0045] Figure 4 FIG. 1 is a schematic structural diagram of an electronic device of the present invention in one embodiment. DETAILED DESCRIPTION

[0046] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0047] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0048] The technical solutions in the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0049] like Figure 1 As shown, in one embodiment, the multi-speaker speech recognition method of the present invention includes steps S11 to S18.

[0050] Step S11, obtaining audio data, and setting audio characters and first speaker recognition content characters.

[0051] Specifically, get a piece of audio data and set special characters: <audio> 、 <p1> : <audio>Indicates that the following information is audio. <p1>Indicates that the following information is the identification content of the first speaker.

[0052] By introducing <audio>and <p1>With such special characters, the model can clearly distinguish between audio data and the corresponding speaker text information, which is crucial for subsequent data processing and analysis. The use of special characters helps to define a clear data structure, allowing the model to better understand how the data is organized, so as to effectively parse and process information. In the speech recognition process, special characters serve as markers to help the model quickly locate key information, reduce unnecessary calculations, and improve the efficiency of the entire recognition process. With the guidance of special characters, the model can better adapt to different speakers and audio environments, and enhance its ability to handle changing scenarios. In the decoding stage, special characters provide clear signals to help the model more accurately convert audio features into text information and improve recognition accuracy. The use of special characters simplifies the complexity of model training and reasoning, making the model easier to implement and maintain. Special characters can also help prevent data leakage or exploitation by malware, while ensuring the compatibility of the model on different platforms and devices.

[0053] Step S12: extracting audio features of the audio data.

[0054] Specifically, an audio feature matrix of the audio data is extracted based on a wav2vec model.

[0055] Wav2vec is a self-supervised learning model that improves the performance of speech recognition by learning representations directly from raw audio data. The wav2vec model uses a self-supervised learning approach that does not require a large amount of labeled data for training. It learns useful audio representations by hiding parts of the audio content and then training the model to predict these hidden parts. The wav2vec model is able to extract rich audio features from the raw audio waveform, which include audio attributes such as pitch, timbre, and volume. This feature extraction method can better preserve subtle information in the audio compared to traditional methods such as spectrograms or MFCCs. Because wav2vec learns features directly from raw audio, it shows good robustness when processing audio data in noisy environments. This means that wav2vec can effectively extract audio features even in the presence of background noise. Not only local audio information is considered, but also long-distance dependencies in audio sequences are captured. This allows the model to understand the context of the audio, allowing for more accurate speech recognition.

[0056] In one embodiment, the wav2vec model is integrated in the transformers library and can be used directly by calling the library. The sampling rate needs to be set to 16kHz, which ensures that the model can correctly process the input audio signal; first instantiate wav2vec2processor, which is used to prepare audio data to adapt it to the input requirements of the model, and then instantiate wav2vec2Model to load the pre-trained model parameters; input a batch of audio data, use the processor process method to preprocess the input audio, including adjusting the dimension to match the expected input format of the model, and the process method returns values ​​suitable for the model input, which can be directly passed to the network for forward propagation; pass the preprocessed input to the instantiated wav2vec model to perform forward propagation operations; the model finally outputs the last hidden state (last_hidden_state), which is the feature extracted from the audio.

[0057] Step S13: extracting audio character features and first speaker recognition content character features of the audio character and the first speaker recognition content character respectively.

[0058] Specifically, extracting the audio character features and the first speaker recognition content character features of the audio character and the first speaker recognition content character respectively comprises the following steps:

[0059] Extracting audio character features of the audio characters based on a tokenizer and a multi-layer perceptron MLP;

[0060] The first speaker recognition content character features of the first speaker recognition content characters are extracted based on a tokenizer and a multi-layer perceptron MLP.

[0061] In multi-speaker speech recognition systems, feature concatenation is an important step, which involves effectively combining different types of data (such as audio features and special character features) so that subsequent deep learning models can better understand and process this information.

[0062] In one embodiment, special characters <audio>and <p1>After being processed by the tokenizer, it is converted into a corresponding sequence of tokens. Tokenizer is a tool that converts characters or strings into numerical representations and is commonly used in natural language processing tasks. Next, these tokens are processed by a multi-layer perceptron MLP, which is a feed-forward neural network that can learn the complex mapping relationship between these tokens. The purpose of the processing is to make the embedding dimension of the special characters the same as the embedding dimension of the audio feature matrix so that subsequent splicing operations can be performed. The embedding dimensions of the special character features and the audio feature vectors need to be the same because the splicing operation requires all input features to have the same dimensions. This dimensional matching is achieved by adjusting the output layer of the MLP to ensure that the embedding vectors of the special characters are numerically comparable and combinable with the audio feature vectors. The process of feature splicing not only helps the model distinguish between different data types, but also enhances the model's overall understanding of the audio scene. In this way, the model can more effectively process complex multi-speaker audio data and improve the accuracy and efficiency of speech recognition. In the subsequent large language model processing, feature splicing promotes deep fusion between different information. The large language model uses these concatenated features for further analysis and processing, thereby achieving accurate identification of the speaker and in-depth understanding of the speech content.

[0063] Step S14: construct an input feature matrix based on the audio features, the audio character features and the first speaker recognition content character features.

[0064] Specifically, constructing an input feature matrix based on the audio feature, the audio character feature and the first speaker recognition content character feature includes:

[0065] The audio features, the audio character features and the first speaker recognition content character features are sequentially concatenated to obtain the input feature matrix.

[0066] In one embodiment, the special character features (audio characters and first speaker recognition content characters) and the audio feature vector are concatenated in a certain order. This order is <audio>, audio, <audio> 、 <p1>,in <audio>Indicates the start and end of audio data. <p1>Represents the speech content of the first speaker. This sequential design helps the model distinguish different data segments and correctly identify and separate the voices of different speakers in subsequent processing. By concatenating special character features and audio feature vectors, a complete input feature matrix is ​​formed. This matrix contains the characteristics of the audio signal and related metadata (such as speaker information), providing rich input information for subsequent large language models. The formation of the input feature matrix is ​​based on the model's in-depth understanding of audio data and special characters, ensuring the integrity and consistency of the information.

[0067] Step S15: input the input feature matrix into a large language model to obtain a fused feature matrix.

[0068] In one embodiment, a suitable large language model is selected according to the task requirements. This can be a Transformer-based model such as BERT, RoBERTa, or a larger model such as GPT-3. Make sure that the selected model can handle your specific task and that there are sufficient computing resources to support the operation of the model. Use the pre-trained weights of the selected large language model. These pre-trained models are usually trained on large-scale data sets and capture a large amount of language regularities and knowledge, which are suitable for various downstream tasks. Configure model parameters according to specific task requirements, including input and output sizes, hidden layer dimensions, etc. If necessary, you can also add additional layers or modify the existing network structure to better suit specific tasks. Convert the input feature matrix to a format that the model can accept. This may include adjusting the shape of the matrix, standardizing the data, or performing any necessary type conversion. Build the input tensor according to the requirements of the model. For some models, it may be necessary to add additional dimensions to represent batch size, sequence length, or attention mask, etc. Feed the prepared input tensor into the model for forward propagation. The model will process these inputs and pass them through its multi-layer structure to ultimately produce an output tensor. The output of the model usually contains rich fused features, which are the result of the model combining the internally learned knowledge with the features of the input data. Depending on the model, the output may need to be further processed to obtain the final fused feature matrix.

[0069] Step S16: Decode the fused feature matrix to obtain first speaker recognition content.

[0070] Specifically, the fused feature matrix is ​​decoded based on a CTC greedy search algorithm.

[0071] The fused feature matrix can be decoded by CTC Greedy Search to effectively extract the content of the first speaker, that is, the speech recognition content. First, CTC (Connectionist Temporal Classification) is a time classification method specially designed to process sequence data, especially suitable for tasks such as speech recognition where the input and output lengths are inconsistent. In speech recognition, due to differences in pronunciation speed, pauses and other factors, the length of the input audio does not match the length of the output text. CTC introduces a blank label to align sequences of unequal lengths, so that the model can handle this situation of different lengths. Secondly, Greedy Search is a fast and effective decoding strategy. Its core idea is to select the most likely output, that is, the label with the highest probability, at each step. Although this method is simple, it can quickly give relatively reasonable results in many cases. Especially in scenarios where resources are limited or fast response is required, GreedySearch provides a practical solution. However, since it only selects the local optimal solution, it may ignore some globally better alignment methods, so it may not be as accurate as more complex algorithms such as Beam Search. Finally, for a specific task - extracting the speech content of a specific speaker in a conference record, using Greedy Search for CTC decoding can not only achieve fast processing, but also meet the needs of practical applications to a certain extent. By applying CTC Greedy Search to the fused feature matrix, the speech content of a specific person can be effectively separated from the complex conference recording. This shows the ability of the CTC model to handle multiple speakers and the efficiency of Greedy Search in practical applications.

[0072] Step S17: judging whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix.

[0073] Specifically, judging whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix comprises the following steps:

[0074] Input the vector into a multilayer perceptron and a softmax function to obtain a first probability that the speaker is still included and a second probability that the speaker is no longer included;

[0075] When the first probability is greater than the second probability, determining that the audio data still contains other speakers;

[0076] When the first probability is not greater than the second probability, it is determined that the audio data no longer contains other speakers.

[0077] In one embodiment, the last vector of the fused feature matrix is ​​taken, and a probability distribution of C and E is obtained by MLP and softmax, where C represents continue and E represents stop. If the probability of E is higher, the input audio contains only one person speaking, and the entire process ends. If the probability of C is higher, there is more than one person speaking in the input audio, and the subsequent steps continue.

[0078] Using the vector corresponding to the characters of the first speaker's recognition content in the fusion feature matrix, a multi-layer perceptron and a softmax function are used to determine whether the audio data contains other speakers. This method can effectively identify and distinguish the voices of different speakers from audio data. The specific steps are as follows:

[0079] Step S171, determine the input vector: First, it is necessary to determine the vector corresponding to the first speaker's recognition content character in the fusion feature matrix. This vector contains information about the first speaker's voice features and is the basis for the next step of judgment.

[0080] Step S172, configure MLP and softmax layer: set a multi-layer perceptron and a softmax function, which will be used to process the selected vector and output the probability distribution. MLP is used to learn nonlinear relationships, and softmax is used to output the probability of each category.

[0081] Step S173, input vector to MLP: input the previously determined vector to MLP. MLP processes the input vector through its multi-layer structure, learns and extracts features.

[0082] Step S174, applying the softmax function: The result after the MLP processing is further passed to the softmax function. The softmax function converts the output of the MLP into a probability distribution, ensuring that the output value is between 0 and 1, and the sum of all output values ​​is 1.

[0083] Step S175, calculate probability: obtain two probabilities through the softmax function, the first probability indicates the possibility that the audio still contains other speakers (continue, C), and the second probability indicates the possibility that the audio no longer contains other speakers (stop, E).

[0084] Step S176, compare probabilities: compare the two probabilities. If the probability of C is greater than the probability of E, it is determined that the audio still contains other speakers; conversely, if the probability of E is greater than or equal to the probability of C, it is determined that the audio no longer contains other speakers.

[0085] Finally, take action based on the results: Based on the results of the above judgment, you can choose the corresponding subsequent actions. If it is determined that there are still other speakers in the audio, you can continue to iterate and perform the subsequent steps of speaker separation and identification; if it is determined that there is only one person speaking in the audio, then the whole process can end here.

[0086] Step S18: If yes, obtain an updated input feature matrix based on the first speaker recognition content and the input feature matrix, obtain a second speaker recognition content based on the updated input feature matrix, and update the input feature matrix again until the audio data no longer contains other speakers to obtain the speech content of all people in the audio data.

[0087] Specifically, acquiring an updated input feature matrix based on the first speaker recognition content and the input feature matrix includes:

[0088] The first speaker recognition content, the first speaker recognition content character feature, and the second speaker recognition content character feature are sequentially added to the end of the input feature matrix to obtain an updated input feature matrix.

[0089] In one embodiment, the first person's speech content is appended to the input feature matrix of step S14, followed by a <p1>The special character of (indicates that the first person's speech has ended), so a new input feature matrix is ​​obtained, and the steps S15-S17 are returned to execute to obtain the second person's speech content and the probability distribution of C / E. If the probability of C is still high, then set <p2>The special characters correspond to the speech of the second person, and the input is added again, and repeated until the probability of E is high, all voice recognition is completed; then the recognition content obtained each time is the speech content of a certain person, thus completing the recognition of N voice contents.

[0090] By iteratively appending the speech content and special characters to the input feature matrix, the speech content of each speaker in the audio can be gradually identified and separated. The speech content of the first person is appended to the end of the initial input feature matrix, and a special character is added after it to indicate that the speech content of the first person has ended. In this way, a new input feature matrix is ​​constructed. The updated input feature matrix is ​​used to perform steps S15-S17, where the operations include obtaining the speech content of the second person through the CTC GreedySearch decoding method, and obtaining a probability distribution (C / E) indicating whether there are other speakers.

[0091] Furthermore, according to the obtained C / E probability distribution, if the probability of C is greater than the probability of E, it indicates that there are other speakers in the audio. At this time, it is necessary to set the next special character (such as) to correspond to the speech content of the second person currently recognized, and append it to the input feature matrix, and then repeat the model inference and judgment process. When the probability of E becomes larger, it indicates that the speech content of all speakers has been recognized, and the iterative process can be ended at this time. The content recognized in each iteration corresponds to the speech content of a specific speaker. After the generation is completed, each recognized speech content is associated with a specific special character, so that the specific speech content of each speaker can be clearly distinguished.

[0092] In one embodiment, please refer to Figure 2 , get a piece of audio, define two special characters <audio> 、 <p1> , <audio>Indicates that the following information is audio. <p1>Indicates that the following information is the identification content of the first speaker; the input audio data is processed using the wav2vec model to obtain the corresponding audio feature matrix; <audio>and <p1>After tokenizer and MLP, its embedding dimension is the same as the audio feature matrix embedding dimension. The special character features and audio feature vectors are transformed into <audio>, audio, <audio> 、 <p1>The input feature matrix is ​​obtained by splicing them in order; the input feature matrix is ​​input into LLM for deep information fusion, and LLM gives the fused feature matrix; the fused feature matrix is ​​decoded by using ctcgreedy search greedy search to obtain <p1>The speech recognition content is the speech content of the first person; at the same time, the last vector of the fusion feature matrix is ​​taken, and a probability distribution of C and E is obtained by MLP and softmax. C represents continue and E represents stop. If the probability of E is large, the input audio contains only one person speaking, and the whole process ends. If the probability of C is large, there is more than one person speaking in the input audio, and the subsequent steps are continued; the speech content of the first person is appended to the aforementioned input feature matrix, followed by a <p1>The special character of (indicates that the first person's speech has ended), so as to obtain a new input feature matrix, repeat the iterative execution of the content after the feature fusion step, you can get the second person's speech content, and get the probability distribution of C / E. If the probability of C is still large, then set <p2>The special characters correspond to the speech of the second person, and the input is added again, and repeated until the probability of E is high, all voice recognition is completed; then the recognition content obtained each time is the speech content of a certain person, thus completing the recognition of N voice contents.

[0093] The protection scope of the multi-speaker speech recognition method described in the embodiment of the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0094] An embodiment of the present invention further provides a multi-speaker speech recognition system, which can implement the multi-speaker speech recognition method described in the present invention. However, the implementation device of the multi-speaker speech recognition system described in the present invention includes but is not limited to the structure of the multi-speaker speech recognition system listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.

[0095] like Figure 3 As shown, in one embodiment, the multi-speaker speech recognition system of the present invention includes a first acquisition module 31, a first extraction module 32, a second extraction module 33, a feature construction module 34, a feature fusion module 35, a second acquisition module 36 and a speech judgment module 37.

[0096] The first acquisition module 31 is used to acquire audio data and set audio characters and first speaker recognition content characters.

[0097] The first extraction module 32 is connected to the first acquisition module 31 and is used to extract audio features of the audio data.

[0098] The second extraction module 33 is connected to the first extraction module 32 and is used to extract the audio character features and the first speaker recognition content character features of the audio character and the first speaker recognition content character respectively.

[0099] The feature construction module 34 is connected to the second extraction module 33 and is used to construct an input feature matrix based on the audio features, the audio character features and the first speaker recognition content character features.

[0100] The feature fusion module 35 is connected to the feature construction module 34 and is used to input the input feature matrix into the large language model to obtain a fused feature matrix.

[0101] The second acquisition module 36 is connected to the feature fusion module 35, and decodes the fusion feature matrix to obtain the first speaker recognition content.

[0102] The speech judgment module 37 is connected to the second acquisition module 36, and judges whether the audio data still contains other speakers according to the vector corresponding to the characters of the first speaker recognition content in the fusion feature matrix; if so, an updated input feature matrix is ​​obtained based on the first speaker recognition content and the input feature matrix, and the second speaker recognition content is obtained based on the updated input feature matrix, and the input feature matrix is ​​updated again until the audio data no longer contains other speakers to obtain the speech content of all people in the audio data.

[0103] In the several embodiments provided by the present invention, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or units 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 interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0104] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. For example, the functional modules / units in the various embodiments of the present invention may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0105] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0106] The embodiment of the present invention also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0107] An embodiment of the present invention further provides an electronic device, which includes a processor and a memory.

[0108] The memory is used to store computer programs.

[0109] The memory includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.

[0110] The processor is connected to the memory and is used to execute the computer program stored in the memory so that the electronic device executes the multi-speaker speech recognition method.

[0111] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0112] like Figure 4 As shown, the electronic device of the present invention is in the form of a general computing device. The components of the electronic device may include but are not limited to: one or more processors or processing units 41, a memory 42, and a bus 43 connecting different system components (including the memory 42 and the processing unit 41).

[0113] Bus 43 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0114] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.

[0115] The memory 42 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 421 and / or cache memory 422. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 423 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 43 via one or more data medium interfaces. Memory 42 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0116] A program / utility 424 having a set (at least one) of program modules 4241 may be stored, for example, in the memory 42, such program modules 4241 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 4241 generally perform the functions and / or methods of the embodiments described herein.

[0117] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, displays, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via input / output (I / O) interface 44. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 45. Figure 4 As shown, the network adapter 45 communicates with other modules of the electronic device via the bus 43. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0118] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention. < / audio> < / audio> < / audio> < / audio> < / p1> < / audio> < / audio> < / audio> < / audio> < / audio> < / audio> < / audio> < / p1> < / audio>

Claims

1. A multi-speaker speech recognition method, characterized in that: The method comprises the following steps: Acquire audio data, and set audio characters and first speaker recognition content characters; Extracting audio features of the audio data; extracting audio character features and first speaker recognition content character features of the audio character and the first speaker recognition content character respectively; constructing an input feature matrix based on the audio features, the audio character features, and the first speaker recognition content character features; Inputting the input feature matrix into a large language model to obtain a fused feature matrix; Decoding the fused feature matrix to obtain first speaker recognition content; Determining whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix; If so, an updated input feature matrix is ​​obtained based on the first speaker recognition content and the input feature matrix, and a second speaker recognition content is obtained based on the updated input feature matrix, and the input feature matrix is ​​updated again until the audio data no longer contains other speakers to obtain the speech content of all people in the audio data.

2. The multi-speaker speech recognition method according to claim 1, characterized in that: The audio features of the audio data are extracted based on the wav2vec model.

3. The multi-speaker speech recognition method according to claim 1, characterized in that: Extracting the audio character features and the first speaker recognition content character features of the audio character and the first speaker recognition content character respectively comprises the following steps: Extracting audio character features of the audio characters based on a word segmenter and a multi-layer perceptron; A first speaker recognition content character feature of the first speaker recognition content character is extracted based on a word segmenter and a multi-layer perceptron.

4. The multi-speaker speech recognition method according to claim 1, characterized in that: Constructing an input feature matrix based on the audio feature, the audio character feature and the first speaker recognition content character feature comprises: The audio features, the audio character features and the first speaker recognition content character features are sequentially concatenated to obtain the input feature matrix.

5. The multi-speaker speech recognition method according to claim 1, characterized in that: The fused feature matrix is ​​decoded based on the CTC greedy search algorithm.

6. The multi-speaker speech recognition method according to claim 1, characterized in that: Judging whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix comprises the following steps: Input the vector into a multilayer perceptron and a softmax function to obtain a first probability that the speaker is still included and a second probability that the speaker is no longer included; When the first probability is greater than the second probability, determining that the audio data still contains other speakers; When the first probability is not greater than the second probability, it is determined that the audio data no longer contains other speakers.

7. The multi-speaker speech recognition method according to claim 1, characterized in that: Acquiring an updated input feature matrix based on the first speaker recognition content and the input feature matrix includes: The first speaker recognition content, the first speaker recognition content character feature, and the second speaker recognition content character feature are sequentially added to the end of the input feature matrix to obtain an updated input feature matrix.

8. A multi-speaker speech recognition system, characterized in that: The system includes a first acquisition module, a first extraction module, a second extraction module, a feature construction module, a feature fusion module, a second acquisition module and a speech judgment module; The first acquisition module is used to acquire audio data and set audio characters and first speaker recognition content characters; The first extraction module is used to extract audio features of the audio data; The second extraction module is used to extract the audio character features and the first speaker recognition content character features of the audio character and the first speaker recognition content character respectively; The feature construction module is used to construct an input feature matrix based on the audio features, the audio character features and the first speaker recognition content character features; The feature fusion module is used to input the input feature matrix into a large language model to obtain a fused feature matrix; The second acquisition module decodes the fusion feature matrix to obtain first speaker recognition content; The speech judgment module is used to judge whether the audio data still contains other speakers according to the vector corresponding to the first speaker recognition content character in the fusion feature matrix; If so, an updated input feature matrix is ​​obtained based on the first speaker recognition content and the input feature matrix, and a second speaker recognition content is obtained based on the updated input feature matrix, and the input feature matrix is ​​updated again until the audio data no longer contains other speakers to obtain the speech content of all people in the audio data.

9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory, so that the electronic device executes the multi-speaker speech recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by an electronic device, the multi-speaker speech recognition method according to any one of claims 1 to 7 is implemented.