Speaker recognition method, apparatus, medium, and device
By acquiring similar speech from a pre-set speech database and calculating the feature vector loss value, compensating speech is generated and spliced together to form long speech, solving the problem of low accuracy in short speech recognition and achieving high-accuracy speaker recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2023-05-11
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the speaker recognition accuracy of short speech is low, and it is difficult to effectively utilize the features in short speech for accurate recognition.
By acquiring similar speech with high similarity to the target speech from a pre-set speech database, calculating the feature vector loss value and performing backpropagation calculation, compensating speech is generated. The target speech and the compensating speech are then concatenated to form a long speech, which is then recognized using a speaker recognition model.
It improves the speaker recognition accuracy of short speech, enhances the training efficiency and model accuracy of the feature acquisition model, and improves the accuracy of short speech recognition.
Smart Images

Figure CN116524934B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a speaker recognition method, apparatus, medium and device. Background Technology
[0002] In modern society, with the development of information technology, there is an increasingly widespread need for personal identification and the protection of private data. Using human biometrics for identification is a convenient and reliable option, such as fingerprints, iris scans, and voice recognition. Voice recognition, in particular, has gained widespread application due to its ease of use.
[0003] Voice recognition, also known as speaker recognition, identifies a person's identity by processing and analyzing their voice, since each person's voiceprint information is unique. In real-world scenarios, there are often short speech segments, such as those less than 2 seconds long. Due to the limited length of these segments, fewer features can be extracted, making it difficult to guarantee accuracy when using these extracted features for voice recognition. Summary of the Invention
[0004] In view of this, the present invention provides a speaker recognition method, apparatus, medium and device, the main purpose of which is to solve the problem of low speaker recognition accuracy for short speech.
[0005] According to one aspect of this application, a speaker recognition method is provided, the method comprising:
[0006] Obtain similar speech to the target speech in the preset speech database;
[0007] Based on a preset feature acquisition model, the first feature vector of the similar speech and the second feature vector of the target speech are obtained respectively, and the loss value between the first feature vector and the second feature vector is calculated.
[0008] Based on the loss value and the similar speech, the feature acquisition model is backpropagated to obtain the compensated speech corresponding to the target speech;
[0009] The target speech and the compensated speech are concatenated to obtain combined speech. The combined speech is then identified using a speaker recognition model to determine the speaker corresponding to the target speech.
[0010] Optionally, before obtaining similar speech to the target speech in a preset speech database, the process includes:
[0011] Clustering of speech samples yields multiple sample sets;
[0012] Extract the speech corresponding to the center point of each sample set to generate the preset speech database;
[0013] Accordingly, obtaining similar speech to the target speech in the preset speech database includes:
[0014] The speech with the highest similarity to the target speech is obtained from the preset speech database and is used as the similar speech.
[0015] Optionally, the step of obtaining the first feature vector of the similar speech and the second feature vector of the target speech based on a preset feature acquisition model includes:
[0016] Mel-cepstral coefficients are extracted from the similar speech and the target speech respectively to obtain similar speech containing Mel-cepstral coefficient features and target speech containing Mel-cepstral coefficient features;
[0017] The similar speech containing Mel-Cepstral Coefficient features is input into the feature acquisition model to obtain the first feature vector of the similar speech;
[0018] The target speech containing Mel-Cepstral Coefficient features is input into the feature acquisition model to obtain the second feature vector of the target speech.
[0019] Optionally, calculating the loss value between the first feature vector and the second feature vector includes:
[0020] Calculate the Euclidean distance between the first feature vector and the second feature vector;
[0021] Using the feature to obtain the activation function of the model, calculate the first speaker probability distribution of the similar speech and the second speaker probability distribution of the target speech, and calculate the KL divergence between the first speaker probability distribution and the second speaker probability distribution;
[0022] Based on the Euclidean distance and the KL divergence, the loss value between the first feature vector and the second feature vector is determined.
[0023] Optionally, the step of performing backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech includes:
[0024] Based on the loss value and the similar speech, the feature acquisition model is backpropagated to obtain the intermediate compensated speech corresponding to the similar speech.
[0025] Calculate the compensation loss value between the target speech and the intermediate compensated speech, and perform backpropagation calculation on the feature acquisition model based on the compensation loss value and the intermediate compensated speech to obtain the new intermediate compensated speech corresponding to the similar speech. When the compensation loss value between the target speech and the new intermediate compensated speech is less than a preset threshold, the latest intermediate compensated speech is used as the compensated speech corresponding to the similar speech.
[0026] Optionally, the step of performing backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech includes:
[0027] If the loss value is greater than or equal to a preset threshold, then the backpropagation calculation is performed on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech.
[0028] If the loss value is less than a preset threshold, then the similar speech is used as the compensation speech corresponding to the target speech.
[0029] Optionally, concatenating the target speech and the compensated speech includes:
[0030] The target speech and the compensation speech are merged in the order of target speech first and compensation speech second.
[0031] According to another aspect of this application, a speaker recognition device is provided, comprising:
[0032] The similar speech acquisition module retrieves similar speech to the target speech to be recognized from a preset speech database;
[0033] The loss value acquisition module, based on a preset feature acquisition model, acquires the first feature vector of the similar speech and the second feature vector of the target speech, and calculates the loss value between the first feature vector and the second feature vector.
[0034] The compensated speech acquisition module performs backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech;
[0035] The speaker recognition module concatenates the target speech and the compensated speech to obtain combined speech, and identifies the speaker corresponding to the target speech by using a speaker recognition model.
[0036] Optionally, before obtaining similar speech to the target speech in a preset speech database, the process includes:
[0037] Clustering of speech samples yields multiple sample sets;
[0038] Extract the speech corresponding to the center point of each sample set to generate the preset speech database;
[0039] Accordingly, obtaining similar speech to the target speech in the preset speech database includes:
[0040] The speech with the highest similarity to the target speech is obtained from the preset speech database and is used as the similar speech.
[0041] Optionally, the step of obtaining the first feature vector of the similar speech and the second feature vector of the target speech based on a preset feature acquisition model includes:
[0042] Mel-cepstral coefficients are extracted from the similar speech and the target speech respectively to obtain similar speech containing Mel-cepstral coefficient features and target speech containing Mel-cepstral coefficient features;
[0043] The similar speech containing Mel-Cepstral Coefficient features is input into the feature acquisition model to obtain the first feature vector of the similar speech;
[0044] The target speech containing Mel-Cepstral Coefficient features is input into the feature acquisition model to obtain the second feature vector of the target speech.
[0045] Optionally, calculating the loss value between the first feature vector and the second feature vector includes:
[0046] Calculate the Euclidean distance between the first feature vector and the second feature vector;
[0047] Using the feature to obtain the activation function of the model, calculate the first speaker probability distribution of the similar speech and the second speaker probability distribution of the target speech, and calculate the KL divergence between the first speaker probability distribution and the second speaker probability distribution;
[0048] Based on the Euclidean distance and the KL divergence, the loss value between the first feature vector and the second feature vector is determined.
[0049] Optionally, the step of performing backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech includes:
[0050] Based on the loss value and the similar speech, the feature acquisition model is backpropagated to obtain the intermediate compensated speech corresponding to the similar speech.
[0051] Calculate the compensation loss value between the target speech and the intermediate compensated speech, and perform backpropagation calculation on the feature acquisition model based on the compensation loss value and the intermediate compensated speech to obtain the new intermediate compensated speech corresponding to the similar speech. When the compensation loss value between the target speech and the new intermediate compensated speech is less than a preset threshold, the latest intermediate compensated speech is used as the compensated speech corresponding to the similar speech.
[0052] Optionally, the step of performing backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech includes:
[0053] If the loss value is greater than or equal to a preset threshold, then the backpropagation calculation is performed on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech.
[0054] If the loss value is less than a preset threshold, then the similar speech is used as the compensation speech corresponding to the target speech.
[0055] Optionally, concatenating the target speech and the compensated speech includes:
[0056] The target speech and the compensation speech are merged in the order of target speech first and compensation speech second.
[0057] According to another aspect of this application, a storage medium is provided that stores at least one executable instruction, which causes a processor to perform the operation corresponding to the speaker recognition method described above.
[0058] According to another aspect of this application, a computer device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0059] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the speaker recognition method described above.
[0060] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages:
[0061] This application provides a speaker recognition method, apparatus, device, and medium. It retrieves similar speech from a preset speech database that corresponds to the target speech to be recognized, calculates the loss value between the first feature vector of the similar speech and the second feature vector of the target speech, performs backpropagation on the feature model based on the loss value to calculate the compensation speech corresponding to the target speech, concatenates the target speech and the compensation speech to convert the short speech into a long speech, and recognizes the concatenated long speech. Since the features of the compensation speech are the same as those of the short speech, the long speech concatenated from the short speech and the compensation speech has high accuracy, resulting in high speaker recognition accuracy for the long speech and improving the accuracy of speaker recognition for short speech.
[0062] This application provides a speaker recognition method, apparatus, device, and medium. Compared with existing methods that use random noise as input data for feature acquisition models, this application provides a speaker recognition method that has a higher similarity to the target speech, which can greatly improve the training efficiency and model accuracy of the feature acquisition model.
[0063] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0064] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0065] Figure 1 A flowchart of a speaker recognition method provided in an embodiment of this application is shown;
[0066] Figure 2 A flowchart of another speaker recognition method provided in an embodiment of this application is shown;
[0067] Figure 3 A flowchart of another speaker recognition method provided in an embodiment of this application is shown;
[0068] Figure 4 A flowchart of yet another speaker recognition method provided in an embodiment of this application is shown;
[0069] Figure 5 This diagram illustrates a block diagram of a speaker recognition device provided in an embodiment of this application.
[0070] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown.
[0071] in,
[0072] Figure 5 In the middle: 502 - Similar speech acquisition module; 504 - Loss value acquisition module; 506 - Compensated speech acquisition module; 508 - Speaker recognition module;
[0073] Figure 6 In Chinese: 602 - Processor; 604 - Communication interface; 606 - Memory; 608 - Communication bus; 610 - Program. Detailed Implementation
[0074] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present invention can be combined with each other.
[0075] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the specific embodiments, structures, features, and effects according to the present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "an embodiment" or "an embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0076] To address the low accuracy of speaker recognition in short speech samples, this application provides a speaker recognition method, such as... Figure 1 As shown, the method includes:
[0077] 102: Obtain similar speech to the target speech in the preset speech database;
[0078] Let me first explain why directly recognizing short speech using a speaker recognition model results in low accuracy due to the brevity and limited voiceprint features. Therefore, converting short speech into longer speech with the same multiple voiceprint features and then using that longer speech for recognition significantly improves accuracy. Thus, understanding how to effectively convert short speech into longer speech with the same multiple voiceprint features is extremely important.
[0079] In this embodiment, by obtaining speech with high similarity to the voiceprint features of the target speech from a preset speech database as similar speech, and updating the similar speech, a compensated speech with the same voiceprint features as the target speech is obtained.
[0080] The pre-set voice database includes voices generated during financial service transactions, thus the speaker recognition method is applicable to financial service scenarios. For example, in a banking system service scenario, when a customer goes to the counter to conduct business, the speaker recognition method can identify the customer's identity information based on voice, thus performing identity verification. The speaker recognition method of this application is particularly suitable for customer groups where fingerprint or facial information collection is inconvenient or fingerprint and facial feature recognition is not sensitive.
[0081] For example, when a customer calls to handle or schedule a transaction involving a large sum of money, the system uses voice recognition to identify the caller's identity and determine whether the customer is authorized to schedule or handle the transaction involving a large sum of money.
[0082] It should be noted that the solution presented in this application is applicable not only to short speech recognition but also to long speech recognition, and can further improve the accuracy of long speech recognition. Since the accuracy of short speech recognition is low, this application mainly describes scenarios applicable to short speech recognition.
[0083] In another embodiment of the invention, for further definition and explanation, before obtaining similar speech corresponding to the target speech to be identified from a preset speech database, the following steps are included:
[0084] Clustering of speech samples yields multiple sample sets;
[0085] Extract the speech corresponding to the center point of each sample set to generate a preset speech database.
[0086] In this embodiment, multiple speech samples are collected to generate a large speech database. The k-means clustering method is used to divide the speech samples in the large speech database into n groups, generating multiple sample sets. As a preferred implementation, the speech corresponding to the center point of each sample set is extracted to generate a preset speech database. As another preferred implementation, any speech sample from each sample set is extracted to generate the preset speech database.
[0087] In another embodiment of the invention, for further definition and explanation, obtaining similar speech to the target speech to be identified from a preset speech database includes:
[0088] The speech with the highest similarity to the target speech is obtained from the preset speech database and used as the similar speech.
[0089] Among them, similar voices include voices generated in financial service-related operations, so the method for determining similar voices includes financial service application scenarios.
[0090] In this embodiment, after the preset speech database is generated, the similarity between the target speech and each speech in the preset speech database is calculated, and the speech with the maximum similarity is selected as the similar speech. This enables the selection of the closest similar speech to the target speech from the preset speech database, and the similar speech is used as the input data of the feature acquisition model.
[0091] This application provides a speaker recognition method. Compared with the existing methods that use random noise as input data for feature acquisition models, similar speech has a higher similarity to target speech, which can greatly improve the training efficiency and model accuracy of feature acquisition models.
[0092] 104: Based on a preset feature acquisition model, obtain the first feature vector of the similar speech and the second feature vector of the target speech respectively, and calculate the loss value between the first feature vector and the second feature vector;
[0093] In this embodiment of the invention, the feature acquisition model is a pre-trained model, which can be any model capable of extracting voiceprint features, such as a neural network model or a deep learning model. Similar speech is preprocessed, and the preprocessed similar speech is used as input data to the feature acquisition model. The output data of the feature acquisition model is used as the first feature vector of the similar speech. Similarly, the target speech is preprocessed, and the preprocessed target speech is used as input data to the feature acquisition model. The output data of the feature acquisition model is used as the second feature vector of the target speech. Based on the first and second feature vectors, a loss value is calculated between the first and second feature vectors, respectively.
[0094] In another embodiment of the invention, for further definition and explanation, such as Figure 2 As shown, based on a preset feature acquisition model, the first feature vector of similar speech and the second feature vector of the target speech are obtained respectively, including:
[0095] 202: Mel-Cepstral coefficients are extracted from similar speech and target speech respectively to obtain similar speech containing Mel-Cepstral coefficient features and target speech containing Mel-Cepstral coefficient features;
[0096] 204: Input similar speech containing Mel-Cepstral coefficient features into the feature acquisition model to obtain the first feature vector of the similar speech;
[0097] 206: Input the target speech containing Mel-Cepstral coefficient features into the feature acquisition model to obtain the second feature vector of the target speech.
[0098] In this embodiment, initialization processing is required before inputting the input data to the feature model. Mel-Cepstral Coefficients (MCCs) of similar speech and the target speech are extracted respectively. The similar speech containing MCC features is fed into the pre-trained feature acquisition model for feature extraction. The extracted features, which is the output of the feature acquisition model, are denoted as the first feature vector e1. The target speech containing MCC features is fed into the pre-trained feature acquisition model for feature extraction. The extracted features, which is the output of the feature acquisition model, are denoted as the second feature vector e0.
[0099] In speech recognition and speaker identification, the most commonly used speech feature is the Mel-scale Frequency Cepstral Coefficient (MFCC). MFCCs are cepstral parameters extracted from the Mel-scale frequency domain, which can distribute sounds of different frequencies across different frequency ranges, thus better describing the characteristics of the sound.
[0100] As a preferred embodiment of this example, the steps for extracting Mel-Cepstral coefficients include: pre-emphasizing the speech, dividing the pre-emphasized speech into frames, multiplying the speech signal of each frame by a Hamming window, performing a Fast Fourier Transform on the windowed speech signal, filtering the Fourier Transform signal with a triangular bandpass filter, calculating the logarithmic energy output of each filter, and substituting the logarithmic energy into a Discrete Cosine Transform to obtain the L-order exponential Mel-Cepstral coefficients.
[0101] The methods for obtaining the first and second feature vectors include financial service application scenarios.
[0102] In another embodiment of the invention, for further definition and explanation, such as Figure 3 As shown, the loss value between the first feature vector and the second feature vector is calculated, including:
[0103] 302: Calculate the Euclidean distance between the first eigenvector and the second eigenvector;
[0104] 304: Using the activation function of the feature acquisition model, calculate the first speaker probability distribution of similar speech and the second speaker probability distribution of the target speech, and calculate the KL divergence between the first speaker probability distribution and the second speaker probability distribution;
[0105] 306: Determine the loss value between the first and second eigenvectors based on Euclidean distance and KL divergence.
[0106] In this embodiment, the Euclidean distance between the first feature vector and the second feature vector is calculated using the Euclidean distance formula. The activation function (softmax function) of the feature acquisition model is used to calculate the first speaker probability distribution of similar speech (the probability distribution of speakers belonging to each speech in a preset speech database) and the second speaker probability distribution of the target speech (the probability distribution of speakers belonging to each speech in the preset speech database). The KL divergence between the first and second speaker probability distributions is then calculated, and the sum of the Euclidean distance and the KL divergence is used as the loss value between the first and second feature vectors.
[0107] In a preferred embodiment of this invention, the similarity between the first speaker probability distribution and the second speaker probability distribution is calculated, and the sum of the Euclidean distance and the similarity is used as the loss value between the first feature vector and the second feature vector.
[0108] The methods for obtaining the loss value include financial service application scenarios.
[0109] 106: Based on the loss value and the similar speech, backpropagation calculation is performed on the feature acquisition model to obtain the compensated speech corresponding to the target speech;
[0110] In another embodiment of the invention, for further definition and explanation, such as Figure 4 As shown, based on the loss value and similar speech, backpropagation is performed on the feature acquisition model to obtain the compensated speech corresponding to the target speech, including:
[0111] 402: Based on the loss value and similar speech, backpropagation calculation is performed on the feature acquisition model to obtain the intermediate compensated speech corresponding to the similar speech;
[0112] 404: Calculate the compensation loss value between the target speech and the intermediate compensated speech;
[0113] 406: Based on the compensation loss value and intermediate compensation speech, backpropagation calculation is performed on the feature acquisition model to obtain new intermediate compensation speech corresponding to similar speech. The latest intermediate compensation speech is used as the compensation speech corresponding to the similar speech when the compensation loss value between the target speech and the new intermediate compensation speech is less than a preset threshold.
[0114] Specifically, backpropagation is performed on the feature acquisition model, updating two types of data: the network's weight parameters and the input data. Both aim to reduce loss, but the results differ. The final updated input signal is the desired compensation signal.
[0115] In this embodiment, the second update method is selected. This method continuously adjusts the input data to obtain data with the same voiceprint features as the target speech. Based on the loss value, the input information of the feature acquisition model is continuously adjusted using a backpropagation algorithm. Specifically, the input data of the preset feature acquisition model is updated using the backpropagation algorithm. The updated input data is used as the intermediate compensation speech corresponding to the similar speech. Based on the intermediate compensation speech and the target speech, the compensation loss value between the intermediate compensation speech and the target speech is obtained. Based on the compensation loss value, the feature acquisition model is backpropagated again to obtain new intermediate compensation speech corresponding to the similar speech. A new compensation loss value between the intermediate compensation speech and the target speech is obtained again. If the compensation loss value between the new intermediate compensation speech and the target speech is less than a preset threshold, the backpropagation ends, and the intermediate compensation speech at this point is used as the final compensation speech. If the compensation loss value between the new intermediate compensation speech and the target speech is greater than or equal to the preset threshold, the feature acquisition model continues to undergo backpropagation to obtain new intermediate compensation speech until the compensation loss value between the new intermediate compensation speech and the target speech is less than the preset threshold. The backpropagation then ends, and the intermediate compensation speech at this point is used as the final compensation speech.
[0116] In another embodiment of the invention, for further definition and explanation, backpropagation calculation is performed on the feature acquisition model based on the loss value and similar speech to obtain the compensated speech corresponding to the target speech, including:
[0117] If the loss value is greater than or equal to the preset threshold, then backpropagation calculation is performed on the feature acquisition model based on the loss value and similar speech to obtain the compensated speech corresponding to the target speech.
[0118] If the loss value is less than the preset threshold, the similar speech will be used as the compensation speech corresponding to the target speech.
[0119] In this embodiment, if the loss value is less than a preset threshold, it indicates that the similar speech has the same voiceprint features as the target speech. Therefore, the similar speech is directly used as the compensation speech corresponding to the target speech. If the loss value is greater than or equal to the preset threshold, it indicates that the similar speech does not have the voiceprint features of the target speech. Based on the loss value, backpropagation calculation is performed on the feature acquisition model to obtain the compensation speech of the target speech.
[0120] The methods for obtaining compensated voice include financial service application scenarios.
[0121] 108: The target speech and the compensated speech are concatenated to obtain the combined speech. The combined speech is then identified using a speaker recognition model to determine the speaker corresponding to the target speech.
[0122] In another embodiment of the invention, for further definition and explanation, the target speech and the compensation speech are spliced together, including:
[0123] The target speech and the compensation speech are merged in the order of target speech first and compensation speech second.
[0124] Specifically, there are many methods for concatenating target speech and compensated speech. For example, one can merge the target speech first and similar speech last, or merge similar speech first and target speech last, or merge the same or similar feature vectors from the similar speech based on the feature vectors in the target speech to obtain the concatenated speech. Performing speaker recognition on the concatenated long speech solves the problem of speaker recognition accuracy discrepancy when sample data is not publicly available and the sample size is small.
[0125] In a preferred embodiment of this invention, a speech merging application service, speech synthesis software, or speech synthesis assistant is used to merge short speech and compensated speech.
[0126] This application provides a speaker recognition method. Compared with the prior art, it obtains similar speech corresponding to the target speech from a preset speech database, calculates the loss value between the first feature vector of the similar speech and the second feature vector of the target speech, performs backpropagation on the feature model based on the loss value to obtain the compensated speech corresponding to the target speech, concatenates the target speech and the compensated speech, and recognizes the concatenated long speech, realizing the conversion of short speech into long speech. Since the features of the compensated speech are the same as those of the short speech, the long speech concatenated from the short speech and the compensated speech has high accuracy, and the speaker recognition accuracy of the long speech is high, which improves the accuracy of speaker recognition for short speech and saves time for speaker recognition of short speech.
[0127] Furthermore, as a response to the above Figure 1 The present invention provides a speaker recognition device, as shown in the implementation of the method. Figure 5 As shown, the device includes:
[0128] The similar speech acquisition module 502 acquires similar speech to the target speech to be recognized from a preset speech database;
[0129] The loss value acquisition module 504, based on a preset feature acquisition model, acquires the first feature vector of similar speech and the second feature vector of the target speech respectively, and calculates the loss value between the first feature vector and the second feature vector.
[0130] The compensated speech acquisition module 506 performs backpropagation calculation on the feature acquisition model based on the loss value and similar speech to obtain the compensated speech corresponding to the target speech;
[0131] The speaker recognition module 508 concatenates the target speech and the compensated speech to obtain combined speech, and uses the speaker recognition model to identify the speaker corresponding to the target speech.
[0132] This application provides a speaker recognition device. Compared with the prior art, it obtains similar speech corresponding to the target speech from a preset speech database, calculates the loss value between the first feature vector of the similar speech and the second feature vector of the target speech, performs backpropagation on the feature model based on the loss value to calculate the compensation speech corresponding to the target speech, concatenates the target speech and the compensation speech, recognizes the concatenated long speech, and converts short speech into long speech. Since the features of the compensation speech are the same as those of the short speech, the long speech concatenated from the short speech and the compensation speech has high accuracy, and the speaker recognition accuracy of the long speech is high. This improves the accuracy of speaker recognition for short speech and saves time for speaker recognition of short speech.
[0133] In one embodiment, before obtaining similar speech to the target speech to be identified from a preset speech database, the process includes:
[0134] Clustering of speech samples yields multiple sample sets;
[0135] Extract the speech corresponding to the center point of each sample set to generate a preset speech database;
[0136] Accordingly, similar speech to the target speech to be recognized is obtained from a preset speech database, including:
[0137] The speech with the highest similarity to the target speech is obtained from the preset speech database and used as the similar speech.
[0138] In one embodiment, based on a preset feature acquisition model, a first feature vector of similar speech and a second feature vector of the target speech are obtained, including:
[0139] Mel-cepstral coefficients were extracted from both the similar speech and the target speech to obtain similar speech containing Mel-cepstral coefficient features and target speech containing Mel-cepstral coefficient features.
[0140] The similar speech containing Mel-Cepstral coefficient features is input into the feature acquisition model to obtain the first feature vector of the similar speech;
[0141] The target speech containing Mel-Cepstral coefficient features is input into the feature acquisition model to obtain the second feature vector of the target speech.
[0142] In one embodiment, calculating the loss value between the first feature vector and the second feature vector includes:
[0143] Calculate the Euclidean distance between the first eigenvector and the second eigenvector;
[0144] Using the activation function of the feature acquisition model, calculate the first speaker probability distribution of similar speech and the second speaker probability distribution of the target speech, and calculate the KL divergence between the first speaker probability distribution and the second speaker probability distribution;
[0145] The loss value between the first eigenvector and the second eigenvector is determined based on Euclidean distance and KL divergence.
[0146] In one embodiment, backpropagation is performed on the feature acquisition model based on the loss value and similar speech to obtain the compensated speech corresponding to the target speech, including:
[0147] Based on the loss value and similar speech, backpropagation calculation is performed on the feature acquisition model to obtain the intermediate compensated speech corresponding to the similar speech.
[0148] The compensation loss value between the target speech and the intermediate compensated speech is calculated. Based on the compensation loss value and the intermediate compensated speech, the feature acquisition model is backpropagated to obtain the new intermediate compensated speech corresponding to the similar speech. The latest intermediate compensated speech is taken as the compensated speech corresponding to the similar speech when the compensation loss value between the target speech and the new intermediate compensated speech is less than a preset threshold.
[0149] In one embodiment, backpropagation is performed on the feature acquisition model based on the loss value and similar speech to obtain the compensated speech corresponding to the target speech, including:
[0150] If the loss value is greater than or equal to the preset threshold, then backpropagation calculation is performed on the feature acquisition model based on the loss value and similar speech to obtain the compensated speech corresponding to the target speech.
[0151] If the loss value is less than the preset threshold, the similar speech will be used as the compensation speech corresponding to the target speech.
[0152] In one embodiment, concatenating the target speech and the compensation speech includes:
[0153] The target speech and the compensation speech are merged in the order of target speech first and compensation speech second.
[0154] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, the computer-executable instruction being able to execute the speaker recognition method in any of the above method embodiments.
[0155] Figure 6The diagram illustrates a structural schematic of a computer device according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.
[0156] like Figure 6 As shown, the computer device may include: a processor 602, a communications interface 604, a memory 606, and a communications bus 608.
[0157] The processor 602, communication interface 604, and memory 606 communicate with each other via communication bus 608.
[0158] Communication interface 604 is used to communicate with other network elements such as clients or other servers.
[0159] The processor 602 is used to execute program 610, which can specifically execute the relevant steps in the above-described speaker recognition method embodiment.
[0160] Specifically, program 610 may include program code that includes computer operation instructions.
[0161] Processor 602 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0162] Memory 606 is used to store program 610. Memory 606 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0163] Specifically, program 610 can be used to cause processor 602 to perform the following operations:
[0164] Obtain similar speech to the target speech in the preset speech database;
[0165] Based on the preset feature acquisition model, the first feature vector of similar speech and the second feature vector of the target speech are obtained respectively, and the loss value between the first feature vector and the second feature vector is calculated.
[0166] Based on the loss value and similar speech, backpropagation is performed on the feature acquisition model to obtain the compensated speech corresponding to the target speech;
[0167] The target speech and the compensated speech are concatenated to obtain combined speech. The combined speech is then identified using a speaker recognition model to determine the speaker corresponding to the target speech.
[0168] It will be apparent to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. In one embodiment, they can be implemented using device-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.
[0169] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.
Claims
1. A speaker recognition method, characterized in that, include: Obtain similar speech to the target speech in the preset speech database; Based on a preset feature acquisition model, the first feature vector of the similar speech and the second feature vector of the target speech are obtained respectively, and the loss value between the first feature vector and the second feature vector is calculated. Based on the loss value and the similar speech, the feature acquisition model is backpropagated to obtain the compensated speech corresponding to the target speech; The target speech and the compensated speech are concatenated to obtain combined speech. The combined speech is then identified using a speaker recognition model to determine the speaker corresponding to the target speech. The step of performing backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech includes: Based on the loss value and the similar speech, the feature acquisition model is backpropagated to obtain the intermediate compensated speech corresponding to the similar speech. Calculate the compensation loss value between the target speech and the intermediate compensated speech, and perform backpropagation calculation on the feature acquisition model based on the compensation loss value and the intermediate compensated speech to obtain the new intermediate compensated speech corresponding to the similar speech. When the compensation loss value between the target speech and the new intermediate compensated speech is less than a preset threshold, the latest intermediate compensated speech is used as the compensated speech corresponding to the similar speech.
2. The speaker recognition method as described in claim 1, characterized in that, Before obtaining similar speech to the target speech in the preset speech database, the process includes: Clustering of speech samples yields multiple sample sets; Extract the speech corresponding to the center point of each sample set to generate the preset speech database; Accordingly, obtaining similar speech to the target speech in the preset speech database includes: The speech with the highest similarity to the target speech is obtained from the preset speech database and is used as the similar speech.
3. The speaker recognition method as described in claim 1, characterized in that, The method based on a preset feature acquisition model acquires a first feature vector of the similar speech and a second feature vector of the target speech, including: Mel-cepstral coefficients are extracted from the similar speech and the target speech respectively to obtain similar speech containing Mel-cepstral coefficient features and target speech containing Mel-cepstral coefficient features; The similar speech containing Mel-Cepstral Coefficient features is input into the feature acquisition model to obtain the first feature vector of the similar speech; The target speech containing Mel-Cepstral Coefficient features is input into the feature acquisition model to obtain the second feature vector of the target speech.
4. The speaker recognition method as described in claim 1, characterized in that, The calculation of the loss value between the first feature vector and the second feature vector includes: Calculate the Euclidean distance between the first feature vector and the second feature vector; The activation function of the model is obtained using the features, the first speaker probability distribution of the similar speech and the second speaker probability distribution of the target speech are calculated, and the KL divergence between the first speaker probability distribution and the second speaker probability distribution is calculated. Based on the Euclidean distance and the KL divergence, the loss value between the first feature vector and the second feature vector is determined.
5. The speaker recognition method as described in claim 1, characterized in that, The step of performing backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech includes: If the loss value is greater than or equal to a preset threshold, then the backpropagation calculation is performed on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech. If the loss value is less than a preset threshold, then the similar speech is used as the compensation speech corresponding to the target speech.
6. The speaker recognition method as described in claim 1, characterized in that, The step of concatenating the target speech and the compensated speech includes: The target speech and the compensation speech are merged in the order of target speech first and compensation speech second.
7. A speaker recognition device, characterized in that, include: The similar speech acquisition module retrieves similar speech to the target speech to be recognized from a preset speech database; The loss value acquisition module, based on a preset feature acquisition model, acquires the first feature vector of the similar speech and the second feature vector of the target speech, and calculates the loss value between the first feature vector and the second feature vector. The compensated speech acquisition module performs backpropagation calculation on the feature acquisition model based on the loss value and the similar speech to obtain the compensated speech corresponding to the target speech; The speaker recognition module concatenates the target speech and the compensated speech to obtain combined speech, and identifies the speaker corresponding to the target speech by using a speaker recognition model; The compensated voice acquisition module is also used for: Based on the loss value and the similar speech, the feature acquisition model is backpropagated to obtain the intermediate compensated speech corresponding to the similar speech. Calculate the compensation loss value between the target speech and the intermediate compensated speech, and perform backpropagation calculation on the feature acquisition model based on the compensation loss value and the intermediate compensated speech to obtain the new intermediate compensated speech corresponding to the similar speech. When the compensation loss value between the target speech and the new intermediate compensated speech is less than a preset threshold, the latest intermediate compensated speech is used as the compensated speech corresponding to the similar speech.
8. A storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the speaker recognition method as described in any one of claims 1-6.
9. A computer device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the speaker recognition method as described in any one of claims 1-6.