Voiceprint feature recognition method and device, electronic equipment and computer readable storage medium
By extracting key voice features in voice files and generating weight values, regenerating voice files, extracting voiceprint features and identifying them, the problem of low accuracy of existing voiceprint recognition technology in noisy environments and multi-person speaking is solved, and the problem of low accuracy of existing voiceprint recognition technology is improved. Identification accuracy and system stability.
Patent Information
- Application Number
- CN202411295937.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-06
AI Technical Summary
The existing voiceprint recognition technology has low accuracy in noisy environments and multiple people speaking, and sound changes affect the stability of the system, resulting in a decrease in recognition accuracy.
By extracting key voice features in voice files, calculating their importance and generating weight values, regenerating voice files, and then extracting voiceprint features and inputting them into the pre-trained voiceprint recognition model to calculate the similarity to candidate users to identify the target user.
It improves the accuracy of voiceprint feature recognition, reduces noise interference, enhances the significance of user voice features, and ensures that the extracted voiceprint features better represent the user's identity.
Smart Images

Figure CN119091888A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to a voiceprint feature recognition method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the continuous development of science and technology, biometric technology has been widely used in the fields of communications, security, financial services and smart homes. As a biometric identification method, voiceprint recognition technology identifies the identity of the speaker by analyzing the characteristics of the person's voice. It has the advantages of non-invasiveness, convenience and suitability for remote identification. However, although voiceprint recognition technology has shown its unique value, in a noisy environment, background noise will interfere with the extraction of voiceprint features and affect the accuracy of recognition. Attackers may deceive the system by imitating the target voice, posing a security threat. In an environment where multiple people are talking at the same time, it becomes more difficult to distinguish the voices of different speakers. Voice changes due to emotions, health conditions or age changes, affecting the stability of the system.
[0003] There are many problems with the accuracy of existing recognition schemes that use voiceprints as the basis for biometrics, which affects the application of voiceprint-based biometrics. Therefore, a voiceprint recognition scheme with higher accuracy is needed. Summary of the invention
[0004] The embodiments of the present application provide a voiceprint feature recognition method and device, an electronic device, and a computer-readable storage medium to solve the defect of low voiceprint recognition accuracy in the prior art.
[0005] In order to achieve the above technical objectives, the present application embodiment proposes a voiceprint feature recognition method, including:
[0006] Obtaining a first voice file;
[0007] Extracting at least one key speech feature based on the first speech file;
[0008] Calculating, for each key speech feature, a key value of the key speech feature in the first speech file, wherein the key value represents the importance of the key speech feature in the first speech file;
[0009] Using the key value corresponding to each key voice feature as the weight value of the key voice feature, and generating a second voice file based on the first voice file;
[0010] Extracting at least one voiceprint feature from the second voice file;
[0011] Inputting the at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list;
[0012] The candidate user with the highest similarity is determined as the target user corresponding to the first voice file.
[0013] Another embodiment of the present application provides a voiceprint feature recognition device, including:
[0014] An acquisition module, used to acquire a first voice file;
[0015] A first extraction module, configured to extract at least one key speech feature based on the first speech file;
[0016] A first calculation module, configured to calculate, for each key speech feature, a key value of the key speech feature in the first speech file, wherein the key value represents the importance of the key speech feature in the first speech file;
[0017] A generating module, configured to generate a second voice file based on the first voice file, using the key value corresponding to each key voice feature as a weight value of the key voice feature;
[0018] A second extraction module, configured to extract at least one voiceprint feature from the second voice file;
[0019] a second calculation module, configured to input the at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate a similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list;
[0020] The determining module is used to determine the candidate user with the highest similarity as the target user corresponding to the first voice file. The embodiment of the present application also provides an electronic device, including:
[0021] Memory, used to store programs;
[0022] The processor is used to run the program stored in the memory to execute the voiceprint feature recognition method according to the embodiment of the present application.
[0023] The embodiment of the present application further provides a computer-readable storage medium on which a computer program executable by a processor is stored, wherein the program, when executed by the processor, implements the voiceprint feature recognition method provided in the embodiment of the present application.
[0024] According to the voiceprint feature recognition method and device, electronic device and computer-readable storage medium of the embodiments of the present application, at least one key voice feature is extracted based on the acquired first voice file, the key value of the key voice feature in the first voice file is calculated for each key voice feature, the key value corresponding to each key voice feature is used as the weight value of the key voice feature, and a second voice file is generated based on the first voice file. Finally, at least one voiceprint feature can be extracted from the second voice file; and at least one voiceprint feature is input into the pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and the standard voiceprint feature of each candidate user in the preset candidate user list; thereby, the candidate user with the highest similarity can be determined as the target corresponding to the first voice file. Therefore, by using the voiceprint recognition solution provided in the embodiment of the present application, it is possible to first extract the key speech features in the sound file, and use the key speech features to regenerate the voice file based on its key value, and then extract the voiceprint features based on the voice file, and use the extracted voiceprint features to perform voiceprint feature recognition, so as to ensure that the voice features that play a key role in the user's voice features in the voice file based on which the voiceprint features are extracted can be enhanced, so that the voiceprint features finally extracted can fully reflect the key features in the voice features, so that the voiceprint features finally used for user identification can reflect the user's voice features to a greater extent, eliminate the noise in the original voice file and the interference of other non-user voice sounds to a greater extent, and improve the accuracy of voiceprint feature recognition.
[0025] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0027] Figure 1 A flowchart of an embodiment of the voiceprint feature recognition method provided by this application;
[0028] Figure 2 A schematic diagram of the structure of an embodiment of a voiceprint feature recognition device provided by the present application;
[0029] Figure 3 A schematic diagram of the structure of an electronic device embodiment provided in this application. DETAILED DESCRIPTION
[0030] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0031] Embodiment 1
[0032] With the continuous advancement of science and technology, biometric technology has been widely used in the fields of communication, security, finance and smart home. In particular, fingerprint recognition has been widely used, which allows users to use fingerprints that are unique to each person as biometric features to identify their identities. However, since human hands need to be used a lot in various scenarios in life, fingerprints of fingers can easily be damaged during use due to user injuries or the use of substances such as glue, thereby affecting the recognition accuracy of users using fingerprints as biometric features.
[0033] In addition, the prior art also proposes to use facial features as the biometric features of each user to identify the user's identity. However, since facial features depend on the acquired facial image, the light in the user's environment when the facial image is taken has a great impact on the clarity of the acquired facial image, especially when the user is in a room with poor lighting or facing away from the light source, the facial features in the facial image acquired by the recognition device will be seriously missing, resulting in reduced recognition accuracy or even recognition errors.
[0034] To this end, the prior art has proposed a solution to use voiceprint features in human speech to identify the identity of the user. Voiceprint recognition technology can identify the speaker's identity by analyzing his voice features, and has the advantages of non-invasiveness, convenience and suitability for remote identification. In particular, as audio data, the collection process of voiceprint features will not be affected by external light, and because it is the sound emitted by human speech, it is usually not affected by human daily activities. However, as sound data, when collected in a noisy environment, background noise may interfere with the extraction of voiceprint features in the collected sound data, thereby affecting the recognition accuracy. In addition, in the context of multiple people speaking, it becomes more difficult to distinguish the voices of different speakers. In addition, voice changes may be affected by emotions, health conditions or age, which in turn affects the stability of the system. However, it is noted that voiceprint recognition technology, as an important method in the field of biometrics, urgently needs to solve its accuracy and security problems. By introducing signal processing technology with advanced functions, multimodal biometrics technology and adaptive learning algorithms, it can effectively improve its performance in practical applications and consolidate its extensive application foundation in the fields of communications, security, financial services and smart homes.
[0035] To this end, an embodiment of the present application proposes a voiceprint feature recognition solution, which extracts key features from the collected sound data and processes the audio data to improve the significance of the voiceprint features in the audio data, thereby improving the accuracy of recognition.
[0036] like Figure 1 As shown in Figure 1 It is a flow chart of an embodiment of the voiceprint feature recognition method provided by the present application. The voiceprint feature recognition method according to the embodiment of the present application includes the following steps.
[0037] S101: Obtain a first voice file.
[0038] In step S101, the user's voice can be collected by, for example, a microphone. In the embodiment of the present application, a single microphone can be used to collect the user's voice, or a microphone array composed of multiple microphones can be used to collect the user's voice from different directions to increase the strength of the collected voice. In the embodiment of the present application, the voice file obtained in step S101 can be a voice file collected by the user speaking to an audio collection device such as a microphone, and can also be the voice data of the user in the environment collected by the microphone within a preset time period. In particular, in this case, the collected audio data needs to be processed to remove the influence of noise. For example, after obtaining the audio data, the obtained audio data can be divided into multiple data frames. Specifically, first, the audio data obtained in step S101 can be divided into multiple small segments with a predetermined length with a predetermined length, so that each small segment can be better processed. Usually, the length of each frame can be 10 to 30 milliseconds. In the embodiment of the present application, the length of the frame divided into small segments can be determined according to the scene of voiceprint recognition. For example, in step S101, the environment around the user can be collected by a camera, and the environment in which the current user is located can be judged by identifying the collected environmental image, and the length of the divided frame can be set according to the environment determined in this way. After being divided into multiple frames, in an embodiment of the present application, each frame can be windowed to reduce the spectrum leakage caused by truncation, and the length of each frame can be reduced to reduce the computational load. Fast Fourier transform (FFT) can then be used to calculate the spectrum of each frame signal. In addition, in an embodiment of the present application, after being divided into multiple frames, overlapping processing can also be performed to two frames to ensure that there is a certain overlap between adjacent frames, thereby avoiding sudden changes between frames, affecting feature extraction.
[0039] Then, in an embodiment of the present application, the audio energy can be calculated for each audio frame, and the audio frames whose audio energy is lower than the preset energy threshold are regarded as silence or noise frames. This is because human voice audio usually contains a higher high-frequency energy part, but if it is background noise or a distant human voice, the high-frequency part will decay sharply, so that it will appear as having lower audio energy in the acquired audio frame. Therefore, such audio data frames whose audio energy is lower than the preset energy threshold can be determined as noise frames, and then the other audio data frames remaining after removing these noise frames are integrated to generate a voice file for subsequent voiceprint recognition processing. In particular, in an embodiment of the present application, a trained neural network model can also be used to perform noise reduction processing on the audio frames after such division to generate a voice file for subsequent voiceprint recognition.
[0040] S102: Extract at least one key voice feature based on the first voice file.
[0041] In step S102, key speech features can be extracted for the first voice file obtained in step S101 or generated as described above. In the embodiment of the present application, although the environmental noise or the voice of other people in the distance in the acquired audio data has been removed in step S101, the voice of the user in the first voice file generated in this way will still be unclear due to various factors on the scene, and such unclearness will especially make the features extracted by the subsequent voiceprint features unable to fully characterize the voice features of the user. To this end, in the embodiment of the present application, the first voice file obtained in step S101 can be separated into a high-frequency voice part and a low-frequency voice part in step S102, and such high-frequency and low-frequency division can be implemented using a preset voice separation algorithm, or the first voice file obtained in step S101 can be input into a pre-trained neural network model to separate high-frequency and low-frequency voices. Then, the energy of the separated high-frequency voice part can be increased by a preset amplitude to further emphasize the human voice features in the collected voice data. Afterwards, the increased high-frequency voice part can be divided into a plurality of high-frequency audio frames with a preset length. In an embodiment of the present application, the preset length can also be set according to the environment in a manner similar to step S101. For example, a preset table lookup method can be adopted, or the environmental image captured by the camera can be used to use, for example, a neural network model to determine the preset length used to divide the audio frame.
[0042] After the high-frequency audio frames are divided, the spectrum of each audio frame can be further determined, and according to the spectrum value of each audio frame, a Mel filter is used, for example, for processing to obtain at least one candidate speech feature. For example, the spectrum of each audio frame can be mapped to a Mel frequency scale by a Mel filter bank, and then the output result is logarithmically processed and processed using DCT (discrete cosine transform) to obtain the speech feature of the audio frame as a candidate speech feature. After the candidate speech features of each audio frame are obtained in this way, the non-Gaussian correlation between the candidate speech features can be further calculated. For example, two candidate speech features can be standardized respectively, so that they have zero mean and unit variance, and then the two standardized candidate speech features can be modeled using, for example, a Gaussian mixture model (GMN) to generate the probability density function (PDF) of the two candidate speech features respectively, and then the KL divergence (Kullback-Leibler divergence) can be calculated based on the probability density function of the two candidate speech features as the non-Gaussian correlation between the two candidate speech features. In the embodiment of the present application, the difference between two candidate speech features can be determined based on the non-Gaussian correlation calculated in this way, and for example, two candidate speech features with high non-Gaussian correlation can be determined as key speech features.
[0043] S103: Calculate, for each key speech feature, a key value of the key speech feature in the first speech file.
[0044] In step S103, for each key speech feature obtained in step S102, its key value in the first voice file obtained in step S101 can be further calculated. In an embodiment of the present application, the key value can characterize the importance of the key speech feature in the first voice file. For example, the key value can be calculated based on the frequency characteristics of the key speech feature, such as the position or proportion of the fundamental frequency or formant in the first voice file, or it can also be calculated based on the amplitude characteristics of the key speech feature, such as the proportion of energy in the first voice file, so that when the key speech feature is located at the beginning or end of the first voice file, its criticality may not be high, but if it is located in the middle, it may be high, or when the energy of the key speech feature is high in the first voice file, it may be the user's words spoken loudly, and it may contain more user's voice features.
[0045] S104: Using the key value corresponding to each key voice feature as the weight value of the key voice feature, a second voice file is generated based on the first voice file.
[0046] In step S104, the key value calculated in step S103 can be used as the weight value of each key speech feature to regenerate the voice file. For example, each key speech feature extracted in step S102 can be superimposed with the audio frame of the corresponding time of the first voice file according to its time information, and the key value calculated in step S103 can also be used as the superposition weight during the superposition process, so that the speech features in the second voice file regenerated after the superposition process can be strengthened to varying degrees. In particular, such strengthening process is carried out in consideration of the importance of each key speech feature in the entire voice file. Therefore, the speech part representing the user's speech features in the regenerated voice file can be strengthened accordingly.
[0047] S105: extract at least one voiceprint feature from the second voice file.
[0048] S106: Input at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list.
[0049] In step S105, voiceprint feature extraction may be performed on the second voice file generated in step S104. For example, the features may be first serialized to form a data format suitable for model processing in step S106, and then a time series of audio data frames of the voice file may be extracted, and then feature extraction may be performed according to the time series to obtain at least one voiceprint feature.
[0050] Afterwards, in an embodiment of the present application, the voiceprint features extracted in step S105 may be input into a pre-trained first voiceprint recognition model to calculate the similarity between the voiceprint features and the standard voiceprint features of the candidate users preset in the model.
[0051] For example, in an embodiment of the present application, a first feature vector can be generated based on the voiceprint feature extracted in step S105, and then the angle between the first feature vector and the feature vector corresponding to the standard voiceprint feature of the candidate user is calculated, and the cosine value of the angle is used as the similarity between the voiceprint feature and the standard voiceprint feature of the candidate user.
[0052] In addition, in the embodiment of the present application, the peaks or troughs in the voiceprint features can also be extracted based on the voiceprint features extracted in step S105, and the feature parts corresponding to the peaks or troughs are used as voiceprint components, and then at least one standard component contained in the standard voiceprint features is determined based on the standard voiceprint features of the candidate user, and the difference between each voiceprint component and each standard component determined as above is calculated, and finally the similarity between the voiceprint features and the standard voiceprint features of the candidate user can be determined based on the calculated differences. Specifically, for example, in the embodiment of the present application, the calculated differences can be compared with the preset similarity threshold one by one, so that the differences greater than the preset similarity threshold are used as candidate differences, and the square sum of the candidate differences is calculated and the square root of the square sum is used as the similarity between the voiceprint features and the standard voiceprint features of the candidate user.
[0053] S107: Determine the candidate user with the highest similarity as the target user corresponding to the first voice file.
[0054] In step S107, the similarities may be sorted according to the similarity calculation result in step S106, and the user corresponding to the standard voiceprint feature corresponding to the highest similarity in the similarity sorting may be determined as the target user corresponding to the first voice file obtained in step S101.
[0055] In addition, in the embodiment of the present application, the first voiceprint recognition model used in step S106 may be pre-trained to improve the processing accuracy of the voiceprint recognition model. For example, multiple registered users and their corresponding registered voiceprint data may be obtained first, and the unregistered voiceprint data of multiple unregistered users may be obtained. In the embodiment of the present application, the registered voiceprint data of multiple registered users may be the candidate users in the multiple candidate user lists as described above and their standard voiceprint data. These standard voiceprint data may be the voiceprint data of users collected based on standard procedures, or may be the voiceprint data with the highest success rate after multiple identifications using the first voiceprint recognition model. Unregistered users may be users and their voiceprint data obtained through the Internet or other means, and these voiceprint data may not be confirmed to correspond to candidate users, or these voiceprint data cannot be identified as corresponding to candidate users.
[0056] Then, the first voiceprint recognition model can be used to calculate the similarity between each voiceprint data and the registered voiceprint data in the voiceprint data set composed of registered voiceprint data and unregistered voiceprint data. When the number of similarities greater than a predetermined threshold is greater than a predetermined number threshold, it is determined that the training of the first voiceprint recognition model is successful.
[0057] Therefore, according to the voiceprint feature recognition method of the embodiment of the present application, by extracting at least one key voice feature based on the acquired first voice file, calculating the key value of the key voice feature in the first voice file for each key voice feature, using the key value corresponding to each key voice feature as the weight value of the key voice feature, and generating a second voice file based on the first voice file, at last, at least one voiceprint feature can be extracted for the second voice file; and at least one voiceprint feature is input into the pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and the standard voiceprint feature of each candidate user in the preset candidate user list; thereby, the candidate user with the highest similarity can be determined as the target user corresponding to the first voice file, and therefore, using The voiceprint recognition solution provided in the embodiment of the present application can first extract the key speech features in the sound file, and use the key speech features to regenerate the voice file based on its key value, and then extract the voiceprint features based on the voice file, and use the extracted voiceprint features to perform voiceprint feature recognition, so as to ensure that the speech features that play a key role in the user's voice features in the voice file based on which the voiceprint features are extracted can be enhanced, so that the voiceprint features finally extracted can fully reflect the key features in the voice features, so that the voiceprint features finally used for user identification can reflect the user's voice features to a greater extent, eliminate the noise in the original voice file and the interference of other non-user voice sounds to a greater extent, and improve the accuracy of voiceprint feature recognition.
[0058] Embodiment 2
[0059] Figure 2 This is a schematic diagram of the structure of an embodiment of the voiceprint feature recognition device provided by this application. Figure 2 As shown in , the voiceprint feature recognition device provided in the embodiment of the present application may include: an acquisition module 21, a first extraction module 22, a first calculation module 23, a generation module 24, a second extraction module 25, a second calculation module 26 and a determination module 27.
[0060] The acquisition module 21 can be used to acquire a first voice file.
[0061] The acquisition module 21 may be, for example, a microphone or a module therein, and may be used to collect the user's voice. In the embodiment of the present application, a single microphone may be used as the acquisition module 21 to collect the user's voice, or a microphone array composed of multiple microphones may be used as the acquisition module 21 to collect the user's voice from different directions to increase the strength of the collected voice. In the embodiment of the present application, the voice file acquired by the acquisition module 21 may be a voice file collected by the user speaking to an audio acquisition device such as a microphone, and may also be the voice data of the user in the environment collected by the microphone within a preset time period. In particular, in this case, the collected audio data needs to be processed to remove the influence of noise. For example, after acquiring the audio data, the acquired audio data may be first divided into multiple data frames. Specifically, first, the audio data acquired by the acquisition module 21 may be divided into multiple small segments with a predetermined length with a predetermined length, so that each small segment can be better processed. Typically, the length of each frame may be 10 to 30 milliseconds. In the embodiment of the present application, the length of the frame divided into small segments may be determined according to the scenario of voiceprint recognition.
[0062] For example, the environment around the user can be collected by an additionally arranged camera, and the environment in which the current user is located can be judged by identifying the collected environmental image, and the length of the divided frame can be set according to the environment determined in this way. After being divided into multiple frames, in an embodiment of the present application, each frame can be windowed to reduce the spectrum leakage caused by truncation, and the length of each frame can be reduced to reduce the computational load. Fast Fourier transform (FFT) can then be used to calculate the spectrum of each frame signal. In addition, in an embodiment of the present application, after being divided into multiple frames, overlapping processing can also be performed to two frames to ensure that there is a certain overlap between adjacent frames, thereby avoiding sudden changes between frames, affecting feature extraction.
[0063] Then, in an embodiment of the present application, the audio energy can be calculated for each audio frame, and the audio frames whose audio energy is lower than the preset energy threshold are regarded as silence or noise frames. This is because human voice audio usually contains a higher high-frequency energy part, but if it is background noise or a distant human voice, the high-frequency part will decay sharply, so that it will appear as having lower audio energy in the acquired audio frame. Therefore, such audio data frames whose audio energy is lower than the preset energy threshold can be determined as noise frames, and then the other audio data frames remaining after removing these noise frames are integrated to generate a voice file for subsequent voiceprint recognition processing. In particular, in an embodiment of the present application, a trained neural network model can also be used to perform noise reduction processing on the audio frames after such division to generate a voice file for subsequent voiceprint recognition.
[0064] The first extraction module 22 may be configured to extract at least one key speech feature based on the first speech file.
[0065] The first extraction module 22 can extract key speech features for the first voice file acquired by the acquisition module 21 or generated as described above. In the embodiment of the present application, although the acquisition module 21 has removed the environmental noise or the voice of other people in the distance in the acquired audio data, the voice of the user in the first voice file generated in this way will still be unclear due to various factors on the scene, and such unclearness will especially make the features extracted by the subsequent voiceprint features unable to fully characterize the voice features of the user. To this end, in the embodiment of the present application, the first extraction module 22 can first separate the first voice file acquired by the acquisition module 21 into a high-frequency voice part and a low-frequency voice part. Such high-frequency and low-frequency division can be implemented using a preset voice separation algorithm, or the first voice file acquired by the acquisition module 21 can be input into a pre-trained neural network model to separate high-frequency and low-frequency voices. Then, the energy of the separated high-frequency voice part can be increased by a preset amplitude to further emphasize the human voice features in the collected voice data. Afterwards, the increased high-frequency voice part can be divided into a plurality of high-frequency audio frames with a preset length. In an embodiment of the present application, the preset length can also be set accordingly according to the environment in a similar manner. For example, a preset table lookup method can be adopted, or the environmental image captured by the camera can be used to use, for example, a neural network model to determine the preset length used to divide the audio frame.
[0066] After the high-frequency audio frames are divided, the spectrum of each audio frame can be further determined, and according to the spectrum value of each audio frame, a Mel filter is used, for example, for processing to obtain at least one candidate speech feature. For example, the spectrum of each audio frame can be mapped to a Mel frequency scale by a Mel filter bank, and then the output result is logarithmically processed and processed using DCT (discrete cosine transform) to obtain the speech feature of the audio frame as a candidate speech feature. After the candidate speech features of each audio frame are obtained in this way, the non-Gaussian correlation between the candidate speech features can be further calculated. For example, two candidate speech features can be standardized respectively, so that they have zero mean and unit variance, and then the two standardized candidate speech features can be modeled using, for example, a Gaussian mixture model (GMN) to generate the probability density function (PDF) of the two candidate speech features respectively, and then the KL divergence (Kullback-Leibler divergence) can be calculated based on the probability density function of the two candidate speech features as the non-Gaussian correlation between the two candidate speech features. In the embodiment of the present application, the difference between two candidate speech features can be determined based on the non-Gaussian correlation calculated in this way, and for example, two candidate speech features with high non-Gaussian correlation can be determined as key speech features.
[0067] The first calculation module 23 may be configured to calculate, for each key speech feature, a key value of the key speech feature in the first speech file.
[0068] The first calculation module 23 can further calculate the key value of each key speech feature obtained by the first extraction module 22 in the first speech file obtained by the acquisition module 21. In the embodiment of the present application, the key value can characterize the importance of the key speech feature in the first speech file. For example, the key value can be calculated based on the frequency characteristics of the key speech feature, such as the position or proportion of the fundamental frequency or the formant in the first speech file, or the key value can be calculated based on the amplitude characteristics of the key speech feature, such as the proportion of energy in the first speech file, so that when the key speech feature is located at the beginning or end of the first speech file, its criticality may not be high, but if it is located in the middle, it may be high, or when the energy of the key speech feature is high in the first speech file, it may be the user's words spoken loudly, and may contain more user's speech features.
[0069] The generating module 24 may be configured to generate a second voice file based on the first voice file, using the key value corresponding to each key voice feature as the weight value of the key voice feature.
[0070] The generation module 24 can use the key value calculated by the first calculation module 23 as the weight value of each key speech feature to regenerate the voice file. For example, each key speech feature extracted by the first extraction module 22 can be superimposed with the audio frame of the corresponding time of the first voice file according to its time information, and the key value calculated by the first calculation module 23 can also be used as the superposition weight during the superposition process, so that the speech features in the second voice file regenerated after the superposition process can be strengthened to different degrees. In particular, such strengthening process is carried out by considering the importance of each key speech feature in the entire voice file. Therefore, the speech part of the regenerated voice file that represents the user's voice features can be strengthened accordingly.
[0071] The second extraction module 25 may be configured to extract at least one voiceprint feature from the second voice file.
[0072] The second calculation module 26 can be used to input at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list.
[0073] The second extraction module 25 can perform voiceprint feature extraction on the second voice file generated by the generation module 24. For example, the features can be first serialized to form a data format suitable for model processing used in the second calculation module 26, and then the time series of the audio data frames of the voice file is extracted, and then feature extraction is performed according to the time series to obtain at least one voiceprint feature.
[0074] Afterwards, in an embodiment of the present application, the voiceprint features extracted by the second extraction module 25 may be input into a pre-trained first voiceprint recognition model to calculate the similarity between the voiceprint features and the standard voiceprint features of the candidate users preset in the model.
[0075] For example, in an embodiment of the present application, a first feature vector can be generated based on the voiceprint features extracted by the second extraction module 25, and then the angle between the first feature vector and the feature vector corresponding to the standard voiceprint features of the candidate user is calculated, and the cosine value of the angle is used as the similarity between the voiceprint features and the standard voiceprint features of the candidate user.
[0076] In addition, in the embodiment of the present application, the peaks or troughs in the voiceprint features can also be extracted based on the voiceprint features extracted by the second extraction module 25, and the feature parts corresponding to the peaks or troughs are used as voiceprint components, and then at least one standard component contained in the standard voiceprint features is determined based on the standard voiceprint features of the candidate user, and the difference between each voiceprint component and each standard component determined as above is calculated, and finally the similarity between the voiceprint features and the standard voiceprint features of the candidate user can be determined based on the calculated differences. Specifically, for example, in the embodiment of the present application, the calculated differences can be compared with the preset similarity threshold one by one, so that the differences greater than the preset similarity threshold are used as candidate differences, and the square sum of the candidate differences is calculated and the square root of the square sum is used as the similarity between the voiceprint features and the standard voiceprint features of the candidate user.
[0077] The determination module 27 may be configured to determine the candidate user with the highest similarity as the target user corresponding to the first voice file.
[0078] The determination module 27 can sort the similarities according to the similarity calculation result of the second calculation module 26, and determine the user corresponding to the standard voiceprint feature corresponding to the highest similarity in the similarity sorting as the target user corresponding to the first voice file obtained by the acquisition module 21.
[0079] In addition, in the embodiment of the present application, the first voiceprint recognition model used by the second calculation module 26 can also be pre-trained to improve the processing accuracy of the voiceprint recognition model. For example, multiple registered users and their corresponding registered voiceprint data can be obtained first, and the unregistered voiceprint data of multiple unregistered users can be obtained. In the embodiment of the present application, the registered voiceprint data of multiple registered users can be candidate users and their standard voiceprint data in the multiple candidate user lists as described above. These standard voiceprint data can be the voiceprint data of users collected based on standard processes, or can be the voiceprint data with the highest success rate after multiple identifications using the first voiceprint recognition model. Unregistered users can be users and their voiceprint data obtained through the Internet or other means. These voiceprint data may not be confirmed to correspond to candidate users, or these voiceprint data cannot be identified as corresponding to candidate users.
[0080] Then, the first voiceprint recognition model can be used to calculate the similarity between each voiceprint data and the registered voiceprint data in the voiceprint data set composed of registered voiceprint data and unregistered voiceprint data. When the number of similarities greater than a predetermined threshold is greater than a predetermined number threshold, it is determined that the training of the first voiceprint recognition model is successful.
[0081] Therefore, according to the voiceprint feature recognition device of the embodiment of the present application, by extracting at least one key voice feature based on the acquired first voice file, calculating the key value of the key voice feature in the first voice file for each key voice feature, using the key value corresponding to each key voice feature as the weight value of the key voice feature, and generating a second voice file based on the first voice file, at last, at least one voiceprint feature can be extracted for the second voice file; and at least one voiceprint feature is input into the pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and the standard voiceprint feature of each candidate user in the preset candidate user list; thereby, the candidate user with the highest similarity can be determined as the target user corresponding to the first voice file, and therefore, using The voiceprint recognition solution provided in the embodiment of the present application can first extract the key speech features in the sound file, and use the key speech features to regenerate the voice file based on its key value, and then extract the voiceprint features based on the voice file, and use the extracted voiceprint features to perform voiceprint feature recognition, so as to ensure that the speech features that play a key role in the user's voice features in the voice file based on which the voiceprint features are extracted can be enhanced, so that the voiceprint features finally extracted can fully reflect the key features in the voice features, so that the voiceprint features finally used for user identification can reflect the user's voice features to a greater extent, eliminate the noise in the original voice file and the interference of other non-user voice sounds to a greater extent, and improve the accuracy of voiceprint feature recognition.
[0082] Embodiment 3
[0083] The internal functions and structure of the testing device are described above. The device can be implemented as an electronic device. Figure 3 This is a schematic diagram of the structure of an electronic device embodiment provided by this application. Figure 3 As shown, the electronic device includes a memory 31 and a processor 32 .
[0084] The memory 31 is used to store programs. In addition to the above programs, the memory 31 can also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0085] The memory 31 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0086] The processor 32 is not limited to a central processing unit (CPU), but may also be a processing chip such as a graphics processing unit (GPU), a field programmable gate array (FPGA), an embedded neural network processor (NPU) or an artificial intelligence (AI) chip. The processor 32 is coupled to the memory 31 to execute the program stored in the memory 31. When the program is running, the voiceprint feature recognition method of the first embodiment is executed.
[0087] Further, if Figure 3 As shown, the electronic device may also include: a communication component 33, a power component 34, an audio component 35, a display 36 and other components. Figure 3 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 3 Components shown.
[0088] The communication component 33 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 33 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 33 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0089] The power supply component 34 provides power to various components of the electronic device. The power supply component 34 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0090] The audio component 35 is configured to output and / or input audio signals. For example, the audio component 35 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 31 or sent via the communication component 33. In some embodiments, the audio component 35 also includes a speaker for outputting audio signals.
[0091] The display 36 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may detect not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation.
[0092] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A voiceprint feature recognition method, characterized in that: include: Obtaining a first voice file; Extracting at least one key speech feature based on the first speech file; Calculating, for each key speech feature, a key value of the key speech feature in the first speech file, wherein the key value represents the importance of the key speech feature in the first speech file; Using the key value corresponding to each key voice feature as the weight value of the key voice feature, and generating a second voice file based on the first voice file; Extracting at least one voiceprint feature from the second voice file; Inputting the at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list; The candidate user with the highest similarity is determined as the target user corresponding to the first voice file.
2. The voiceprint feature recognition method according to claim 1, characterized in that: The step of inputting the at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list comprises: generating a first feature vector based on the voiceprint feature; Calculating the angle between the first feature vector and the feature vector corresponding to the standard voiceprint feature of the candidate user; The cosine value of the angle is used as the similarity between the voiceprint feature and the standard voiceprint feature of the candidate user.
3. The voiceprint feature recognition method according to claim 1, characterized in that: The step of inputting the at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate the similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list comprises: Determining at least one voiceprint component included in the voiceprint feature based on the voiceprint feature, wherein the voiceprint component represents a peak or a trough in the voiceprint feature; Determining at least one standard component included in the standard voiceprint feature based on the standard voiceprint feature of the candidate user; Calculate the difference between each voiceprint component and each standard component; The similarity between the voiceprint feature and the standard voiceprint feature of the candidate user is determined based on the calculated differences.
4. The voiceprint feature recognition method according to claim 3, characterized in that: The determining the similarity between the voiceprint feature and the standard voiceprint feature of the candidate user based on the calculated differences comprises: Comparing the difference values with a preset similarity threshold one by one, so as to take the difference values greater than the preset similarity threshold as candidate difference values; The sum of squares of the candidate differences is calculated and the square root of the sum of squares is used as the similarity between the voiceprint feature and the standard voiceprint feature of the candidate user.
5. The voiceprint feature recognition method according to claim 1, characterized in that: The extracting at least one key speech feature based on the first speech file comprises: Separating the first voice file into a high-frequency voice part and a low-frequency voice part; Emphasizing the energy of the high-frequency speech part by a preset amplitude; Dividing the high-frequency speech portion into a plurality of high-frequency audio frames having a preset length; Processing the frequency spectrum of the audio frame using a Mel filter to obtain at least one candidate speech feature; Calculate the non-Gaussian correlation between each candidate speech feature; Two candidate speech features whose non-Gaussian correlation is greater than a preset correlation threshold are determined as key speech features.
6. The voiceprint feature recognition method according to claim 5, characterized in that: The obtaining of the first voice file comprises: Get audio data; Dividing the audio data into a plurality of data frames; Calculate the audio energy of each data frame; Determine a data frame whose audio energy is lower than a preset energy threshold as a noise frame; The noise frame is removed from the audio data to generate the first voice file.
7. The voiceprint feature recognition method according to claim 1, characterized in that: The method further comprises: Obtain multiple registered users and their corresponding registered voiceprint data; Obtain unregistered voiceprint data of multiple unregistered users; Using the first voiceprint recognition model, for a voiceprint data set consisting of the registered voiceprint data and the unregistered voiceprint data, calculate the similarity between each voiceprint data and the registered voiceprint data; When the number of similarities greater than the predetermined threshold is greater than the predetermined threshold, it is determined that the training of the first voiceprint recognition model is successful.
8. A voiceprint feature recognition device, characterized in that: include: An acquisition module, used for acquiring a first voice file; A first extraction module, configured to extract at least one key speech feature based on the first speech file; A first calculation module, configured to calculate, for each key speech feature, a key value of the key speech feature in the first speech file, wherein the key value represents the importance of the key speech feature in the first speech file; A generating module, configured to generate a second voice file based on the first voice file, using the key value corresponding to each key voice feature as a weight value of the key voice feature; A second extraction module, configured to extract at least one voiceprint feature from the second voice file; a second calculation module, configured to input the at least one voiceprint feature into a pre-trained first voiceprint recognition model to calculate a similarity between each voiceprint feature and a standard voiceprint feature of each candidate user in a preset candidate user list; The determination module is used to determine the candidate user with the highest similarity as the target user corresponding to the first voice file.
9. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to run the program stored in the memory to execute the voiceprint feature recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program executable by a processor stored thereon, characterized in that: When the program is executed by a processor, the voiceprint feature recognition method as described in any one of claims 1 to 7 is implemented.
