Voiceprint comparison method and device based on emotion detection and electronic equipment
Through emotion detection technology, the emotional characteristics of the voice signal are extracted and compared with the voiceprint model, which solves the problem that traditional voiceprint recognition methods are susceptible to emotions, and improves the robustness and accuracy of the voiceprint recognition system.
Patent Information
- Application Number
- CN202411342203.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional voiceprint recognition methods are susceptible to personal emotions, resulting in changes in sound characteristics, affecting the accuracy and reliability of voiceprint comparison.
By obtaining the voice signal to be compared, determining its emotional category, extracting emotional characteristics, and comparing it with the characteristic similarity between the target voiceprint model, the voiceprint comparison results are determined based on the similarity threshold, and the robustness is improved.
More accurately capture the individual's voice changes in different emotional states, reduce the deviation of sound characteristics caused by emotional fluctuations, and improve the accuracy and reliability of the voiceprint recognition system.
Smart Images

Figure CN119229901A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of audio processing, and in particular to a voiceprint comparison method, device and electronic device based on emotion detection. Background Art
[0002] Currently, cybercrime, especially telecommunications fraud, is growing at an alarming rate, posing a serious threat to social security. Against this background, voiceprint recognition technology is increasingly being used in the public security industry due to its unique advantages. Voiceprint recognition, as a biometric technology, identifies a speaker's identity by analyzing their voice characteristics.
[0003] However, traditional voiceprint recognition methods are often based only on the physical characteristics of the speaker's voice, such as frequency, loudness, and resonance. This has certain limitations in practical applications, such as being easily affected by personal emotions. Emotional fluctuations may cause changes in the pitch, volume, and rhythm of the voice, which may deviate from the speaker's normal voiceprint characteristics, thus affecting the accuracy of voiceprint comparison and the reliability of the results. With the continuous development of technology and the increasing complexity of application scenarios, it is crucial to improve the accuracy and reliability of voiceprint recognition. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a voiceprint comparison method, device and electronic device based on emotion detection, which can more accurately capture the voice changes of an individual under different emotional states, improve the robustness of the voiceprint recognition system, and reduce the deviation of voice features caused by emotional fluctuations.
[0005] The present disclosure provides a voiceprint comparison method based on emotion detection, including:
[0006] Acquire a voice signal to be compared;
[0007] Determining the emotion category corresponding to the speech signal to be compared;
[0008] Extracting emotional features corresponding to the emotional categories;
[0009] Determine the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determine the voiceprint comparison result according to the feature similarity and a preset similarity threshold.
[0010] In an optional implementation manner, determining the emotion category corresponding to the speech signal to be compared specifically includes:
[0011] Performing noise reduction processing on the speech signal to be compared;
[0012] Extracting acoustic features from the speech signal to be compared after noise reduction;
[0013] Inputting the acoustic features into a pre-trained emotion classification model to determine the probability distribution of the speech signal to be compared belonging to each emotion category;
[0014] The emotion category with the highest probability is selected as the emotion category corresponding to the speech signal to be compared.
[0015] In an optional implementation, extracting the emotion feature corresponding to the emotion category specifically includes:
[0016] Dividing the speech signal to be compared into a plurality of speech segments, and screening valid speech segments containing valid speech information from the speech segments;
[0017] Extracting basic emotion features and prosodic features corresponding to the emotion category from the valid speech segment;
[0018] The basic emotion features at least include Mel frequency cepstral coefficients, and the prosodic features at least include pitch, speech speed and intonation;
[0019] The basic emotion feature and the rhythm feature are fused to generate a fused feature, and the fused feature is determined as the emotion feature.
[0020] In an optional implementation, a voiceprint model corresponding to each emotion category is constructed based on the following steps:
[0021] Obtain a sample speech data set, and label a corresponding emotion category for each sample speech data in the sample speech data set;
[0022] Dividing the sample speech data set into speech subsets corresponding to each of the emotion categories;
[0023] Extracting sample emotion features corresponding to sample speech in each of the speech subsets, and inputting the sample emotion features into a preset voiceprint construction model for training;
[0024] After the voiceprint construction model training is completed, a voiceprint model corresponding to each emotion category is generated.
[0025] In an optional implementation, determining the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determining the voiceprint comparison result according to the feature similarity and a preset similarity threshold specifically includes:
[0026] Determining a vector cosine similarity between the emotion feature and the target voiceprint model;
[0027] Determining the vector cosine similarity as the feature similarity;
[0028] If the feature similarity is greater than the preset similarity threshold, it is determined that the voice signal to be compared and the target voiceprint come from the same speaker;
[0029] If the feature similarity is less than the preset similarity threshold, it is determined that the speech to be compared and the target voiceprint come from different speakers.
[0030] The present disclosure also provides a voiceprint comparison device based on emotion detection, including:
[0031] A voice acquisition module, used to acquire the voice signal to be compared;
[0032] A category classification module, used to determine the emotion category corresponding to the speech signal to be compared;
[0033] A feature extraction module, used to extract emotional features corresponding to the emotional category;
[0034] The voiceprint comparison module is used to determine the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determine the voiceprint comparison result according to the feature similarity and a preset similarity threshold.
[0035] In an optional implementation manner, the category classification module is specifically used to:
[0036] Performing noise reduction processing on the speech signal to be compared;
[0037] Extracting acoustic features from the speech signal to be compared after noise reduction;
[0038] Inputting the acoustic features into a pre-trained emotion classification model to determine the probability distribution of the speech signal to be compared belonging to each emotion category;
[0039] The emotion category with the highest probability is selected as the emotion category corresponding to the speech signal to be compared.
[0040] An embodiment of the present disclosure also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the above-mentioned voiceprint comparison method based on emotion detection, or steps in any possible implementation of the above-mentioned voiceprint comparison method based on emotion detection is performed.
[0041] The embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the above-mentioned voiceprint comparison method based on emotion detection, or the steps in any possible implementation of the above-mentioned voiceprint comparison method based on emotion detection.
[0042] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned voiceprint comparison method based on emotion detection, or the steps in any possible implementation of the above-mentioned voiceprint comparison method based on emotion detection.
[0043] The embodiment of the present disclosure provides a voiceprint comparison method, device and electronic device based on emotion detection, which obtains a voice signal to be compared; determines the emotion category corresponding to the voice signal to be compared; extracts the emotion feature corresponding to the emotion category; determines the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determines the voiceprint comparison result according to the feature similarity and a preset similarity threshold. It can more accurately capture the voice changes of an individual in different emotional states, improve the robustness of the voiceprint recognition system, and reduce the deviation of the voice features caused by emotional fluctuations.
[0044] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0046] Figure 1 A flow chart of a voiceprint comparison method based on emotion detection provided by an embodiment of the present disclosure is shown;
[0047] Figure 2 A flow chart showing a method for determining an emotion category provided by an embodiment of the present disclosure;
[0048] Figure 3 A schematic diagram of a voiceprint comparison device based on emotion detection provided by an embodiment of the present disclosure is shown;
[0049] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0051] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0052] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0053] Research has found that traditional voiceprint recognition methods are often based only on the physical characteristics of the speaker's voice, such as frequency, loudness, and resonance. This has certain limitations in practical applications, such as being easily affected by personal emotions. Emotional fluctuations may cause changes in the pitch, volume, and rhythm of the voice, which may deviate from the speaker's normal voiceprint characteristics, thus affecting the accuracy of voiceprint comparison and the reliability of the results. With the continuous development of technology and the increasing complexity of application scenarios, it is crucial to improve the accuracy and reliability of voiceprint recognition.
[0054] Based on the above research, the present disclosure provides a voiceprint comparison method, device and electronic device based on emotion detection, which can more accurately capture the voice changes of individuals in different emotional states, improve the robustness of the voiceprint recognition system, and reduce the deviation of voice features caused by emotional fluctuations.
[0055] To facilitate understanding of the present embodiment, a voiceprint comparison method based on emotion detection disclosed in the present embodiment is first introduced in detail. The execution subject of the voiceprint comparison method based on emotion detection provided in the present embodiment is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the voiceprint comparison method based on emotion detection can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0056] See also Figure 1 As shown, it is a flow chart of a voiceprint comparison method based on emotion detection provided by an embodiment of the present disclosure, the method comprises steps S101 to S104, wherein:
[0057] S101: Acquire a voice signal to be compared.
[0058] In a specific implementation, firstly, a voice signal to be compared that needs to be compared with voiceprint and a target voice signal to be compared with the voice signal to be compared are obtained.
[0059] S102: Determine the emotion category corresponding to the voice signal to be compared.
[0060] For details, see Figure 2 FIG. 1 is a flowchart of a method for determining an emotion category provided by an embodiment of the present disclosure, the method comprising steps S1021 to S1024, wherein:
[0061] S1021: Perform noise reduction processing on the speech signal to be compared.
[0062] S1022: Extracting acoustic features from the speech signal to be compared after noise reduction.
[0063] S1023: Input the acoustic features into a pre-trained emotion classification model to determine the probability distribution of the speech signal to be compared belonging to each emotion category.
[0064] S1024: Filter the emotion category with the highest probability as the emotion category corresponding to the voice signal to be compared.
[0065] In a specific implementation, first, the input speech signal is subjected to noise reduction processing to remove background noise and environmental interference, thereby improving the clarity and quality of the speech signal. The noise reduction process may include bandpass filtering, Wiener filtering, adaptive filtering, etc. Afterwards, endpoint detection (Voice Activity Detection, VAD) is performed to determine the effective part of the speech signal and filter out silent segments or meaningless noise segments.
[0066] Here, acoustic features are extracted from the preprocessed speech signal. Acoustic features may include fundamental frequency, spectral entropy, time domain and frequency domain features, etc. The fundamental frequency reflects the pitch of the speaker and is an important indicator of the emotional state. Emotions such as happiness or anger are usually accompanied by a higher fundamental frequency, while emotions such as sadness or calmness have a lower fundamental frequency. Spectral entropy reflects the complexity of the speech signal spectrum and can distinguish different emotional states.
[0067] The extracted acoustic features are combined into a feature vector as the input of the trained emotion classification model. The emotion classification model outputs the probability distribution of each emotion category through feedforward calculation and activation function. According to the output probability distribution, the emotion category with the highest probability is selected as the emotion classification result of the speech signal.
[0068] Among them, emotion categories may include happiness, sadness, anger, etc.
[0069] As a possible implementation method, in order to improve the stability of classification, the emotion classification results of multiple speech segments may be smoothed to eliminate noise or mutation phenomena and ensure the consistency and coherence of the emotion classification results.
[0070] S103: Extracting emotional features corresponding to the emotional category.
[0071] Specifically, the emotion features can be extracted based on the following steps 1 to 4:
[0072] Step 1: Divide the speech signal to be compared into a plurality of speech segments, and screen the speech segments for valid speech segments containing valid speech information.
[0073] Step 2: extracting basic emotion features and prosodic features corresponding to the emotion category from the valid speech segment.
[0074] Step 3: The basic emotion features include at least Mel-frequency cepstral coefficients, and the prosodic features include at least pitch, speaking speed, and intonation.
[0075] Step 4: Fusing the basic emotion feature and the rhythm feature to generate a fusion feature, and determining the fusion feature as the emotion feature.
[0076] In the specific implementation, before the emotional features are formally extracted, the speech signal needs to be segmented. The speech signal is usually divided into multiple small segments, each of which can be between 20 and 40 milliseconds in length, to ensure that the speech signal can be regarded as a stable signal in each frame. Then, voice activity detection technology is used to identify the segments containing valid speech information in the speech signal, and to filter out silent segments and background noise to ensure the accuracy of feature extraction.
[0077] Here, basic emotional features are first extracted. The basic emotional features may include Mel-frequency cepstral coefficient features. Mel-frequency cepstral coefficients simulate the auditory perception mechanism of the human ear and can capture the frequency information in the speech signal. This information is closely related to the emotional state of the speaker.
[0078] When obtaining the Mel-frequency cepstrum coefficients, a short-time Fourier transform is performed on each frame of the speech signal to generate a spectrogram. The spectrogram is filtered through a set of Mel filters, which simulate the sensitivity of the human ear to different frequencies and emphasize the response to the speech frequency components in the speech signal. The energy spectrum output by the Mel filter is logarithmic to reduce the dynamic range of the amplitude and be closer to the human ear's perception of sound intensity. A discrete cosine transform is performed on the logarithmic energy spectrum to obtain the Mel-frequency cepstrum coefficients.
[0079] After that, the prosodic features are extracted. Prosodic features can include pitch, speaking rate, and intonation. Pitch is a direct reflection of the fundamental frequency and reflects the speaker's emotional excitement. The change pattern of pitch, such as rising or falling, also conveys rich emotional information. The autocorrelation method or harmonic-product spectrum method can be used to extract the pitch contour of the speech and analyze its dynamic changes. Speaking rate is a quantitative indicator of speaking speed. Different emotions are usually accompanied by different speaking rates. For example, the speaking rate increases when angry and slows down when sad. The speaking rate can be estimated by counting the number of syllables per second or the effective speech duration of the speech signal. Intonation reflects the melody changes of speech. Different emotions will lead to different change patterns of intonation. The ups and downs of intonation can convey emotions such as happiness, surprise, or sadness. The intonation pattern in speech can be analyzed by combining the changing trends of pitch and fundamental frequency.
[0080] As a possible implementation method, higher-level emotion-related features can be constructed based on basic emotion features and prosodic features. These high-order features can be automatically learned and extracted through machine learning models (such as LSTM or CNN) to capture more complex emotional information in speech.
[0081] Here, after extracting a large number of emotional features, feature selection algorithms (such as principal component analysis (PCA) and linear discriminant analysis (LDA)) are used to screen features, retain the features that contribute most to emotion classification, remove redundant and noisy features, and compress the high-dimensional feature vectors to lower dimensions through dimensionality reduction methods to reduce computational complexity while retaining the main emotional information.
[0082] Furthermore, in order to improve the robustness of emotion classification, the basic emotion features and rhythmic features can be fused to form a comprehensive feature vector. This multi-feature fusion method can capture richer emotional information in speech signals and enhance the accuracy of emotion classification.
[0083] S104: Determine the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determine a voiceprint comparison result according to the feature similarity and a preset similarity threshold.
[0084] In the specific implementation, according to the result of emotion recognition, the voice signal to be compared is matched with the model of the corresponding emotion category in the established emotional voiceprint model, and the final judgment of the voiceprint comparison is output according to the matching result. If the two voiceprints are judged to be from the same speaker, the match is successful, otherwise the match is failed.
[0085] Specifically, the voiceprint model corresponding to each emotion category can be constructed based on the following steps 1 to 4:
[0086] Step 1: Obtain a sample speech data set, and label each sample speech data in the sample speech data set with a corresponding emotion category.
[0087] Step 2: Divide the sample speech data set into speech subsets corresponding to each of the emotion categories.
[0088] Step 3: extracting sample emotion features corresponding to the sample speech in each of the speech subsets, and inputting the sample emotion features into a preset voiceprint construction model for training.
[0089] Step 4: After the voiceprint construction model training is completed, generate a voiceprint model corresponding to each emotion category.
[0090] In the specific implementation, first, the sample voice data needs to be grouped according to the results of emotion classification. Each emotion category (such as happiness, sadness, anger, etc.) corresponds to an independent data set. The voice signals in these data sets will be used to train the corresponding emotional voiceprint model.
[0091] Here, in order to improve the generalization ability of the model, the speech data can be enhanced, for example, by adding noise, changing the pitch or speaking speed, and performing time domain stretching to simulate the variation in various actual application scenarios.
[0092] Among them, the emotional voiceprint model can select Gaussian mixture model, deep neural network, i-vector and x-vector model, etc. After the model selection is completed, the emotion-specific features are input into the selected model for training. The training process undergoes multiple rounds of iterations. In each round of iteration, the model parameters are continuously adjusted through the optimization algorithm to minimize the prediction error or maximize the likelihood function.
[0093] Furthermore, the vector cosine similarity between the emotion feature and the target voiceprint model is determined; the vector cosine similarity is determined as the feature similarity; if the feature similarity is greater than the preset similarity threshold, it is determined that the speech signal to be compared and the target voiceprint are from the same speaker; if the feature similarity is less than the preset similarity threshold, it is determined that the speech to be compared and the target voiceprint are from different speakers.
[0094] Here, when performing emotional voiceprint comparison, a specific similarity index is selected to measure the similarity between two feature vectors. Similarity calculation methods include cosine similarity, Euclidean distance, Mahalanobis distance, etc.
[0095] Among them, cosine similarity measures similarity by calculating the cosine value of the angle between two vectors. The value range is between -1 and 1. The closer the value is to 1, the higher the similarity. Euclidean distance calculates the geometric distance between two vectors in multidimensional space. The smaller the distance, the higher the similarity. It is suitable for data with relatively uniform feature dimensions. Mahalanobis distance takes into account the correlation between each feature and is suitable for multidimensional data with covariance structure.
[0096] Specifically, based on the selected similarity index, the similarity between the feature vector of the speech signal to be compared and the feature vector in the emotional voiceprint model is calculated. The higher the similarity value (or the smaller the distance), the closer the voiceprint to be compared is to the emotional voiceprint model.
[0097] Here, in order to determine whether two voiceprints come from the same speaker, a similarity threshold or a distance threshold is set. If the calculated similarity is higher than the preset threshold, the two voiceprints are considered to be from the same speaker; if the similarity is lower than the threshold, the two voiceprints are considered to be from different speakers.
[0098] As a possible implementation method, a weighted voting method can be used for the comparison results of multiple emotion categories. According to the similarity or distance calculation results under each emotion category, different emotion categories are assigned weights, and then weighted voting decisions are made. The weight setting can be based on the accuracy of the model or the reliability of the data under different emotion categories.
[0099] As another possible implementation, a decision tree model is used, and the comparison result of each emotion category is used as an input feature. The final voiceprint comparison result is determined through the judgment process of the decision tree.
[0100] As another possible implementation, the Bayesian network uses probabilistic reasoning, takes the comparison results under different emotion categories as evidence, calculates the posterior probability that the two voiceprints come from the same speaker, and makes a comprehensive judgment.
[0101] The embodiment of the present disclosure provides a voiceprint comparison method based on emotion detection, which obtains a voice signal to be compared; determines the emotion category corresponding to the voice signal to be compared; extracts the emotion feature corresponding to the emotion category; determines the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determines the voiceprint comparison result according to the feature similarity and a preset similarity threshold. It can more accurately capture the voice changes of an individual in different emotional states, improve the robustness of the voiceprint recognition system, and reduce the deviation of the voice features caused by emotional fluctuations.
[0102] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0103] Based on the same inventive concept, the embodiments of the present disclosure also provide a voiceprint comparison device based on emotion detection corresponding to the voiceprint comparison method based on emotion detection. Since the principle of solving the problem by the device in the embodiments of the present disclosure is similar to the above-mentioned voiceprint comparison method based on emotion detection in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0104] See also Figure 3 , Figure 3 Schematic diagram of a voiceprint comparison device based on emotion detection provided by an embodiment of the present disclosure. Figure 3 As shown in , the voiceprint comparison device 300 based on emotion detection provided by the embodiment of the present disclosure includes:
[0105] The voice acquisition module 310 is used to acquire the voice signal to be compared.
[0106] The category classification module 320 is used to determine the emotion category corresponding to the speech signal to be compared.
[0107] The feature extraction module 330 is used to extract the emotion feature corresponding to the emotion category.
[0108] The voiceprint comparison module 340 is used to determine the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determine the voiceprint comparison result according to the feature similarity and a preset similarity threshold.
[0109] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0110] The embodiment of the present disclosure provides a voiceprint comparison device based on emotion detection, which obtains a voice signal to be compared; determines the emotion category corresponding to the voice signal to be compared; extracts the emotion feature corresponding to the emotion category; determines the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determines the voiceprint comparison result according to the feature similarity and a preset similarity threshold. It can more accurately capture the voice changes of an individual in different emotional states, improve the robustness of the voiceprint recognition system, and reduce the deviation of the voice features caused by emotional fluctuations.
[0111] Corresponds to Figure 1 The voiceprint comparison method based on emotion detection in the present disclosure also provides an electronic device 400, such as Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present disclosure, including:
[0112] Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including memory 421 and external memory 422; memory 421 here is also called internal memory, which is used to temporarily store operation data in processor 41 and data exchanged with external memory 422 such as hard disk. Processor 41 exchanges data with external memory 422 through memory 421. When the electronic device 400 is running, the processor 41 communicates with the memory 42 through bus 43, so that the processor 41 executes Figure 1 The steps of the voiceprint comparison method based on emotion detection.
[0113] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the voiceprint comparison method based on emotion detection described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0114] The present disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the steps of the voiceprint comparison method based on emotion detection described in the above method embodiment can be executed. For details, please refer to the above method embodiment, which will not be repeated here.
[0115] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0116] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0117] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0118] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0119] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0120] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A voiceprint comparison method based on emotion detection, characterized in that: include: Acquire a voice signal to be compared; Determining the emotion category corresponding to the speech signal to be compared; Extracting emotional features corresponding to the emotional category; Determine the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determine the voiceprint comparison result according to the feature similarity and a preset similarity threshold.
2. The method according to claim 1, characterized in that Determining the emotion category corresponding to the speech signal to be compared specifically includes: Performing noise reduction processing on the speech signal to be compared; Extracting acoustic features from the speech signal to be compared after noise reduction; Inputting the acoustic features into a pre-trained emotion classification model to determine the probability distribution of the speech signal to be compared belonging to each emotion category; The emotion category with the highest probability is selected as the emotion category corresponding to the speech signal to be compared.
3. The method according to claim 1, characterized in that Extracting emotional features corresponding to the emotional category, specifically including: Dividing the speech signal to be compared into a plurality of speech segments, and screening valid speech segments containing valid speech information from the speech segments; Extracting basic emotion features and prosodic features corresponding to the emotion category from the valid speech segment; The basic emotion features at least include Mel frequency cepstral coefficients, and the prosodic features at least include pitch, speech speed and intonation; The basic emotion feature and the rhythm feature are fused to generate a fused feature, and the fused feature is determined as the emotion feature.
4. The method according to claim 1, characterized in that: The voiceprint model corresponding to each emotion category is constructed based on the following steps: Obtain a sample speech data set, and label a corresponding emotion category for each sample speech data in the sample speech data set; Dividing the sample speech data set into speech subsets corresponding to each of the emotion categories; Extracting sample emotion features corresponding to sample speech in each of the speech subsets, and inputting the sample emotion features into a preset voiceprint construction model for training; After the voiceprint construction model training is completed, a voiceprint model corresponding to each emotion category is generated.
5. The method according to claim 1, characterized in that Determining the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determining the voiceprint comparison result according to the feature similarity and a preset similarity threshold, specifically includes: Determining a vector cosine similarity between the emotion feature and the target voiceprint model; Determining the vector cosine similarity as the feature similarity; If the feature similarity is greater than the preset similarity threshold, it is determined that the voice signal to be compared and the target voiceprint come from the same speaker; If the feature similarity is less than the preset similarity threshold, it is determined that the speech to be compared and the target voiceprint come from different speakers.
6. A voiceprint comparison device based on emotion detection, characterized in that: include: A voice acquisition module, used to acquire the voice signal to be compared; A category classification module, used to determine the emotion category corresponding to the speech signal to be compared; A feature extraction module, used to extract emotional features corresponding to the emotional category; The voiceprint comparison module is used to determine the feature similarity between the emotion feature and the target voiceprint model corresponding to the emotion category, and determine the voiceprint comparison result according to the feature similarity and a preset similarity threshold.
7. The device according to claim 6, characterized in that The category classification module is specifically used for: Performing noise reduction processing on the speech signal to be compared; Extracting acoustic features from the speech signal to be compared after noise reduction; Inputting the acoustic features into a pre-trained emotion classification model to determine the probability distribution of the speech signal to be compared belonging to each emotion category; The emotion category with the highest probability is selected as the emotion category corresponding to the speech signal to be compared.
8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate via the bus. When the machine-readable instructions are executed by the processor, the steps of the voiceprint comparison method based on emotion detection as described in any one of claims 1 to 5 are performed.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the voiceprint comparison method based on emotion detection as claimed in any one of claims 1 to 5 are executed.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the steps of the voiceprint comparison method based on emotion detection according to any one of claims 1 to 5 are implemented.