Speech emotion recognition method

By performing audio frame processing and feature extraction on speech, combined with spectrogram and Mel spectrum coefficients, the problem of poor accuracy of single-modal speech recognition is solved, the accuracy of speech emotion recognition is improved, and it is suitable for high time-sensitive scenarios. .

CN118866014APending Publication Date: 2024-10-29CHINA MOBILE INTERNET CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411055062.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Among existing speech emotion recognition technologies, the accuracy of single-modal speech recognition is poor. Especially in scenarios with high timeliness, such as customer service and customer dialogue scenarios, the real-time emotion recognition effect is not good.

Method used

By performing audio frame processing on the target speech, semantic features and acoustic features are extracted, and combined with spectrograms and Mel spectrum coefficients, speech emotion recognition features are constructed to improve the accuracy of emotion recognition.

Benefits of technology

By introducing semantic features and acoustic features, the emotional information in speech can be more comprehensively recognized, the accuracy of speech emotion recognition can be improved, and it is suitable for highly time-sensitive scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118866014A_ABST
    Figure CN118866014A_ABST
Patent Text Reader

Abstract

The invention discloses a speech emotion recognition method, and belongs to the technical field of speech emotion recognition. The method comprises the following steps: performing audio framing processing on an obtained target voice to obtain at least one audio frame of the target voice; extracting semantic features and acoustic features of the target speech, and extracting a speech spectrogram and a Mel spectrum coefficient of at least one audio frame; determining speech emotion recognition features according to the semantic features, the acoustic features, the spectrogram of the at least one audio frame and the Mel spectrum coefficient; and determining an emotion recognition result of the target voice according to the voice emotion recognition features. Therefore, the semantic features are introduced in the emotion recognition process of the target speech, and the speech emotion recognition features are determined according to the semantic features, the acoustic features, the speech spectrogram of the at least one audio frame and the Mel spectrum coefficient, so that the emotion information in the target speech can be recognized more comprehensively, and the accuracy of speech emotion recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of speech emotion recognition, and in particular, to a speech emotion recognition method. Background Art

[0002] At present, speech emotion recognition technology can be used to judge the speaker's emotional state. Speech emotion recognition technology usually includes single-modal speech emotion recognition technology and dual-modal speech emotion recognition technology.

[0003] Bimodal speech emotion recognition technology uses data from both speech and text modes to perform multimodal emotion recognition to determine the speaker's emotional state. However, this method is not applicable in scenarios with high timeliness. For example, in a conversation between customer service and a customer, real-time emotion recognition of the customer's emotions is performed. If speech-to-text is used to convert audio into text, the real-time performance of emotion recognition will be very poor, and the accuracy of the speech-to-text result will have a greater impact on the result of emotion recognition. In contrast, unimodal speech recognition technology can directly determine the speaker's emotional state by identifying speech emotion features, but its recognition accuracy is poor. Summary of the invention

[0004] The embodiment of the present application provides a method for speech emotion recognition to at least solve the problem of poor recognition accuracy of related single-modal speech recognition technologies.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for speech emotion recognition, comprising: performing audio frame processing on the acquired target speech to obtain at least one audio frame of the target speech; extracting semantic features and acoustic features of the target speech, and extracting a spectrogram and Mel-spectrogram coefficients of the at least one audio frame; determining speech emotion recognition features based on the semantic features, acoustic features, spectrogram and Mel-spectrogram coefficients of the at least one audio frame; and determining an emotion recognition result of the target speech based on the speech emotion recognition features.

[0007] In the second aspect, an embodiment of the present application provides a speech emotion recognition device, comprising: an audio framing module, used to perform audio framing processing on the acquired target speech to obtain at least one audio frame of the target speech; a feature extraction module, used to extract semantic features and acoustic features of the target speech, and extract a spectrogram and Mel spectrum coefficients of the at least one audio frame; a feature determination module, used to determine speech emotion recognition features based on the semantic features, acoustic features, spectrogram and Mel spectrum coefficients of the at least one audio frame; an emotion recognition module, used to determine the emotion recognition result of the target speech based on the speech emotion recognition features.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect above are implemented.

[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the steps of the method described in the first aspect above.

[0011] In an embodiment of the present application, the acquired target speech is subjected to audio frame processing to obtain at least one audio frame of the target speech; the semantic features and acoustic features of the target speech are extracted, and the spectrogram and Mel-spectrogram coefficients of at least one audio frame are extracted; the speech emotion recognition features are determined based on the semantic features, acoustic features, the spectrogram and Mel-spectrogram coefficients of at least one audio frame; and the emotion recognition result of the target speech is determined based on the speech emotion recognition features. In this way, by introducing semantic features in the emotion recognition process of the target speech, and determining the speech emotion recognition features based on the semantic features, acoustic features, the spectrogram and Mel-spectrogram coefficients of at least one audio frame, the emotional information in the target speech can be more comprehensively identified, and the accuracy of speech emotion recognition can be improved.

[0012] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0014] Figure 1 A flow chart of a method for emotion recognition in a single speech mode is shown;

[0015] Figure 2 A schematic diagram of the flow of the speech emotion recognition method provided in an embodiment of the present application is shown;

[0016] Figure 3 A network architecture diagram of the speech emotion recognition method provided by an embodiment of the present application is shown;

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

[0018] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0019] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0020] Speech emotion recognition technology is one of the research hotspots in the field of speech information processing and human-computer interaction. It determines the speaker's emotional state by analyzing and identifying the emotional information in the speech signal, so that the machine has the same emotional perception and processing capabilities as humans. Speech unimodal emotion recognition mainly includes: feature extraction and classifier construction.

[0021] In the feature extraction process, commonly used speech emotion features include energy, pitch, Mel-frequency cepstral coefficients (MFCC), etc. Since the development of speech emotion recognition, feature extraction is still immature. The most popular feature sets are the feature sets selected by the organizers of INTERSPEECH 2009 Emotion Challenge and INTERSPEECH 2013 Paralinguistics Challenge, and the feature sets in the speech signal processing tool openSMILE.

[0022] The process of building a classifier is a part of machine learning. Commonly used classifiers include classic machine learning methods such as Gaussian mixture model (GMM), hidden Markov model (HMM), support vector machine (SVM), etc. Thanks to the development of neural networks, methods such as long short-term memory model (LSTM) and attention mechanism have replaced classic methods and become mainstream.

[0023] like Figure 1 As shown in the figure, the speech signal is first converted into a variety of readable physical features (e.g., pitch, energy, etc.) by the speech processing system. Each speech signal has its own unique features. Some of these features will be extracted to obtain F1, ..., Fn, which will be input into the pre-trained classifier for discrimination and output the result of the emotional state. However, these features are usually selected based on experience, and are not highly adaptable to specific tasks, resulting in poor accuracy in speech emotion recognition.

[0024] Although multimodal emotion recognition using both speech and text data is better than speech emotion recognition using only speech data, many scenarios (e.g., customer service and client conversations) require high real-time performance for emotion recognition. Converting audio to text will result in poor real-time performance for emotion recognition. In addition, text data is not easy to obtain, and the accuracy of speech-to-text conversion will have a significant impact on the results of emotion recognition.

[0025] Based on the problems in the above-mentioned speech emotion recognition process, an embodiment of the present application provides a speech emotion recognition method, which introduces semantic features into the emotion recognition process of the target speech, and determines the speech emotion recognition features based on the semantic features, acoustic features, the spectrogram and Mel-spectrogram coefficients of at least one audio frame. This method can more comprehensively identify the emotional information in the target speech and improve the accuracy of speech emotion recognition.

[0026] Figure 2 A flow chart of the speech emotion recognition method provided in an embodiment of the present application is shown. The execution subject of the method may be a terminal device or a server, wherein the terminal device may be a device such as a personal computer, or a mobile terminal device such as a mobile phone or a tablet computer, and the terminal device may be a terminal device used by a user. The server may be an independent server, or a server cluster composed of multiple servers, and the server may be a background server of a certain business, or a background server of a certain platform or application (for example, intelligent customer service, call center, health monitoring system, psychological counseling platform, etc.), etc., for identifying the user's emotional state through the user's voice to adjust the interaction and service quality. In the embodiment of the present application, the execution subject is taken as an example to illustrate. For the case of the terminal device, it can be processed according to the following relevant content, which will not be repeated here. As shown in the figure, the method 200 may include the following steps:

[0027] S201: Perform audio frame processing on the acquired target speech to obtain at least one audio frame of the target speech.

[0028] In a specific implementation, a target speech to be recognized is obtained, and audio framing processing is performed on the target speech to be recognized to obtain at least one audio frame of the target speech. For example, a window of a fixed length (usually 20-30 milliseconds) is used to cut out from a continuous speech signal, wherein there may be overlapping parts between windows to ensure the continuity of information at the boundary, and at least one audio frame is obtained.

[0029] In this way, by performing audio frame processing on the target speech, the target speech can be effectively analyzed and processed.

[0030] S202: Extracting semantic features and acoustic features of the target speech, and extracting a spectrogram and Mel-spectrogram coefficients of the at least one audio frame.

[0031] In a specific implementation, semantic features for expressing semantic content and acoustic features for expressing acoustic characteristics are extracted from the target speech, and a spectrogram and Mel Frequency Cepstral Coefficients (MFCC) of at least one audio frame are extracted. The semantic features may include vocabulary and grammatical information of the speech, and the acoustic features may include prosodic features, spectrum-based features, sound quality features, etc. Specifically, the acoustic features may be as shown in the following table:

[0032]

[0033]

[0034] S203: Determine speech emotion recognition features according to the semantic features, acoustic features, the spectrogram and Mel-spectrogram coefficients of the at least one audio frame.

[0035] In a specific implementation, semantic features, acoustic features, and the spectrogram and Mel-spectrogram coefficients of at least one audio frame are combined to construct speech emotion recognition features for characterizing speech emotions. The speech emotion features include emotion-related tone changes, speech rate changes, vocabulary, grammatical information, etc.

[0036] S204: Determine an emotion recognition result of the target speech according to the speech emotion recognition feature.

[0037] In a specific implementation, the emotion recognition result of the target speech is determined by analyzing the obtained speech emotion recognition features, such as happiness, anger, sadness, anxiety, etc.

[0038] In this way, by introducing semantic features into the emotion recognition process of the target speech and determining the speech emotion recognition features based on the semantic features, acoustic features, the spectrogram and Mel spectrum coefficients of at least one audio frame, the emotional information in the target speech can be more comprehensively identified and the accuracy of speech emotion recognition can be improved.

[0039] In a possible implementation, in the above S202, extracting the semantic features and acoustic features of the target speech includes:

[0040] The target speech is input into a first pre-training model, and the semantic features of the target speech are obtained through the first pre-training model; the target speech is input into a second pre-training model, and the acoustic features of the target speech are obtained through the second pre-training model.

[0041] In the present application embodiment, Figure 3 As shown, the first pre-trained model Pretrained model-1 can be used to obtain the semantic features semantics of the target speech, and the second pre-trained model Pretrained model-2 can be used to obtain the acoustic features acoustics of the target speech. Pretrained model-1 and Pretrained model-2 can be speech pre-training models wav2vec and data2vec, respectively (wav2vec and data2vec are two large-scale speech pre-training models trained by self-supervised methods), or they can be obtained by pre-training with a large amount of unlabeled speech data using a self-supervised learning method.

[0042] In a possible implementation, in S202, determining the speech emotion recognition feature according to the semantic feature, the acoustic feature, the spectrogram and the Mel spectrum coefficient of the at least one audio frame includes:

[0043] Step 2021: Encode the spectrogram of the at least one audio frame to obtain the first frequency domain speech feature of the target speech; Step 2022: Encode the Mel spectrum coefficients of the at least one audio frame to obtain the second frequency domain speech feature of the target speech; Step 2023: Determine the speech emotion recognition feature based on the first frequency domain speech feature, the second frequency domain speech feature, the semantic feature and the acoustic feature.

[0044] In an embodiment of the present application, an AlexNet encoder can be used to encode the spectrogram of at least one audio frame to obtain the first frequency domain speech feature feats3 of the target speech; LSTM can be used to encode the Mel spectrum coefficients of at least one audio frame to obtain the second frequency domain speech feature feats4 of the target speech; and then based on the first frequency domain speech feature feats3, the second frequency domain speech feature feats4, the semantic feature semantics and the acoustic feature acoustics, the speech emotion recognition feature is determined. For example, the first frequency domain speech feature feats3, the second frequency domain speech feature feats4, the semantic feature semantics and the acoustic feature acoustics can be concatenated to obtain the speech emotion recognition feature, or the first frequency domain speech feature feats3, the second frequency domain speech feature feats4, the semantic feature semantics and the acoustic feature acoustics can be feature fused according to preset rules to obtain the speech emotion recognition feature.

[0045] Here, the features extracted by Pretrained model-1 and Pretrained model-2 can be called deep speech features, and the features extracted by AlexNet encoder and LSTM encoder can be called frequency domain speech features.

[0046] In a possible implementation, in the above step 2023, determining the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the semantic feature and the acoustic feature includes:

[0047] Determine a weight matrix based on the correlation coefficient between each frame feature in the first frequency domain speech feature and the second frequency domain speech feature; determine a first deep speech feature and a second deep speech feature based on the weight matrix, semantic features and acoustic features; determine the speech emotion recognition feature based on the first frequency domain speech feature, the second frequency domain speech feature, the first deep speech feature and the second deep speech feature.

[0048] In the embodiment of the present application, the first frequency-domain speech feature feats3 and the second frequency-domain speech feature feats4 are both vector sets in frames. The weight matrix is ​​determined based on the correlation coefficient co-attention between each frame feature in feats3 and feats4. For example, co-attention can be the inner product of the corresponding frame vectors of feats3 and feats4. The vector inner product calculation formula is: A·B=a1×b1+a2×b2+…+an×bn. According to the weight matrix, semantics and acoustics, the first deep speech feature feats1 and the second deep speech feature feats2 are determined, wherein the correlation coefficient co-attention is used to characterize the correlation between corresponding frames in feats3 and feats4. The higher the co-attention score, the more important the frame is, and the greater the weight it should have in the final output feats1 and feats2. Therefore, feats1 and feats2 are determined according to the weight matrix, semantics and acoustics; and then the speech emotion recognition features are determined according to the first frequency domain speech feature feats3, the second frequency domain speech feature feats4, the first deep speech feature feats1 and the second deep speech feature feats2.

[0049] In a possible implementation, the weight matrix includes a first weight matrix and a second weight matrix; the weight matrix is ​​determined according to the correlation coefficient between each frame feature in the first frequency domain speech feature and the second frequency domain speech feature, including:

[0050] Determine the first weight matrix according to the correlation coefficient between each first frame feature in the first frequency domain speech feature and the second frame feature corresponding to the first frame feature in the second frequency domain speech feature; determine the second weight matrix according to the correlation coefficient between each second frame feature in the second frequency domain speech feature and the first frame feature corresponding to the second frame feature in the first frequency domain speech feature;

[0051] The determining, according to the weight matrix, the semantic features and the acoustic features, the first deep speech feature and the second deep speech feature comprises:

[0052] The first deep speech feature is determined according to the first weight matrix and the semantic feature, and the second deep speech feature is determined according to the second weight matrix and the acoustic feature.

[0053] In the embodiment of the present application, the first weight matrix S1 is determined according to the correlation coefficient between each first frame feature in the first frequency domain speech feature feats3 and the second frame feature corresponding to the first frame feature in the second frequency domain speech feature feats4; the second weight matrix S2 is determined according to the correlation coefficient between each second frame feature in the second frequency domain speech feature feats4 and the first frame feature corresponding to the second frame feature in the first frequency domain speech feature feats3. Here, the first weight matrix S1 and the second weight matrix S2 are respectively used to characterize the importance of speech frame features.

[0054] Then, according to the first weight matrix S1 and the semantic features, the first deep speech features feats1 are determined, and according to the second weight matrix S2 and the acoustic features, the second deep speech features feats2 are determined.

[0055] Exemplarily, feats3 and feats4 are both one-dimensional vectors, such as 1*192-dimensional vectors. As an example, feats3=[0,1,2,3,4,5,6...192], feats4=[192,191,190,...0].

[0056] Assuming that the number of frames of audio W is N, and the feature dimension of each frame is M, then semantics and acoustics, feats3, and feats4 are all [N,M] matrices, and s1 and s2 are [N,N] matrices. feats1 and feats2 are also [N,M] matrices. Taking the first frame feature of feats1 as an example, it is a [1,M] vector, which is obtained by multiplying the N scores in the first row of s1 by the corresponding frames of feats3 and summing them up. Its dimension is also [1,M]. Similarly, N frames are calculated in this way, so the dimensions of feats1 and feats2 are [N,M], and the subsequent concatenation is obtained by weighted summation according to the frames.

[0057] In a possible implementation, the step of determining the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature includes:

[0058] The first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature and the second depth speech feature are concatenated to obtain the speech emotion recognition feature.

[0059] Exemplarily, after concatenating feats1, feats2, feats3, and feats4, the final speech emotion recognition features to be recognized are obtained.

[0060] In a possible implementation, the step of determining the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature includes:

[0061] Obtain target weights corresponding to each speech feature, where the speech features include a first frequency domain speech feature, a second frequency domain speech feature, a first depth speech feature, and a second depth speech feature; and perform weighted summation of the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature according to the target weights corresponding to each speech feature to obtain the speech emotion recognition feature.

[0062] Exemplarily, feats1, feats 2, feats 3, and feats 4 are all 1*192 dimensional vectors. Assuming that their corresponding weights are 0.25, 0.25, 0.25, and 0.25 respectively, the speech emotion recognition feature feats_concat = 0.25*feats1+0.25*feats2+0.25*feats3+0.25*feats4, where the target weights corresponding to feats1, feats2, feats3, and feats4 are parameters that can be learned in the speech emotion classification process.

[0063] In a possible implementation, in the above S204, determining the emotion recognition result of the target speech according to the speech emotion recognition feature includes:

[0064] The speech emotion recognition feature is input into a pre-trained target classification model, and the probability value of the target speech belonging to each preset emotion tag is obtained through the target classification model; according to the probability value of the target speech belonging to each preset emotion tag and the preset threshold, the emotion recognition result of the target speech is determined.

[0065] In an embodiment of the present application, the speech emotion recognition feature can be input into a pre-trained target classification model, and the probability value of the target speech belonging to each preset emotion label (for example, happy, angry, sad, anxious, etc.) can be obtained through the target classification model; according to the probability value of the target speech belonging to each preset emotion label and the preset threshold, the emotion recognition result of the target speech is determined. For example, the emotion label with a probability value higher than the preset threshold can be used to determine the emotion recognition result of the target speech, or the emotion label with the largest probability value among the probability values ​​of the target speech belonging to each preset emotion label can be determined as the emotion recognition result of the target speech.

[0066] Among them, the training method of the target classification model includes:

[0067] Acquire a speech training sample set, wherein the speech training sample set includes a plurality of speech samples and a true emotion label corresponding to each speech sample;

[0068] Iteratively train the preset neural network model using the speech training sample set, and in each iterative training process, obtain the first frequency domain speech sample feature, the second frequency domain speech sample feature, the first depth speech sample feature, and the second depth speech sample feature corresponding to the speech sample; based on the initial weights corresponding to the respective frequency domain speech sample features, perform weighted summation on the first frequency domain speech sample feature, the second frequency domain speech sample feature, the first depth speech sample feature, and the second depth speech sample feature to obtain a speech emotion recognition sample feature;

[0069] Inputting the speech emotion recognition sample features into the neural network model for classification processing to obtain the predicted emotion label of the speech sample;

[0070] Determining a loss function value according to the predicted emotion label of the speech sample and the true emotion label of the speech sample;

[0071] Based on the loss function value, the initial weights corresponding to the various frequency-domain speech sample features and the model parameters of the neural network model are adjusted until the set convergence conditions are met, and the trained neural network model is used as the target classification model.

[0072] In an embodiment of the present application, a predetermined number of speech samples can be randomly selected from a speech training sample set, audio frame processing can be performed on the speech samples, and the spectrogram and MFCC of each frame can be extracted respectively; the original audio of the speech samples are respectively input into Pretrained model-1 and Pretrained model-2 to obtain semantic sample features semantics and acoustic sample features acoustics, and the spectrogram of the speech samples is input into the AlexNet encoder to obtain feats3, and the MFCC of the target speech is input into the LSTM encoder to obtain feats4. According to semantics, acoustics, feats3 and feats4, obtain the first frequency domain speech sample features, second frequency domain speech sample features, first depth speech sample features and second depth speech sample features corresponding to the speech sample; based on the initial weights corresponding to each speech sample feature (for example, 0.25, 0.25, 0.25, 0.25), weighted summation is performed on the first frequency domain speech sample features, the second frequency domain speech sample features, the first depth speech sample features and the second depth speech sample features to obtain the speech emotion recognition sample features; determine the loss function value according to the predicted emotion label of the speech sample and the true emotion label of the speech sample; adjust the initial weights corresponding to each speech sample feature and the model parameters of the neural network model based on the loss function value until the set convergence conditions are met, and use the trained neural network model as the target classification model.

[0073] Among them, the loss function can use the cross entropy loss function, which calculates the cross entropy between the predicted emotional label obtained by the neural network model and the true emotional label, and then back-propagates the gradient by minimizing the cross entropy loss function to update and optimize the parameters of the model. The formula of the cross entropy loss function is:

[0074]

[0075] in,

[0076] Among them, N is the number of samples, and the Loss value is the Loss of all speech samples. (i) The mean of is the category corresponding to the real sentiment label. If it is the kth category, the value is 1, otherwise it is 0. In this way, many items will be 0 times and will be blocked and not participate in the calculation. It is the corresponding category of the predicted sentiment label.

[0077] In other words, the cross entropy loss function only focuses on the probability value corresponding to the correct label. The larger the probability value, the more likely it is to guarantee the correct classification result.

[0078] In a possible implementation, after using the trained neural network model as the target classification model, the method further includes:

[0079] Acquire the adjusted initial weights corresponding to the various speech sample features; and determine the adjusted initial weights as the target weights corresponding to the various speech features of the target speech.

[0080] In the embodiment of the present application, the initial weights corresponding to the adjusted features of each speech sample are determined as the target weights corresponding to the speech features of the target speech, so as to improve the accuracy of the emotion recognition result of the target speech.

[0081] The embodiment of the present application provides a method for speech emotion recognition, which performs audio frame processing on the acquired target speech to obtain at least one audio frame of the target speech; extracts the semantic features and acoustic features of the target speech, and extracts the spectrogram and Mel-spectrogram coefficients of at least one audio frame; determines the speech emotion recognition features based on the semantic features, acoustic features, spectrogram and Mel-spectrogram coefficients of at least one audio frame; and determines the emotion recognition result of the target speech based on the speech emotion recognition features. In this way, by introducing semantic features in the emotion recognition process of the target speech, and determining the speech emotion recognition features based on the semantic features, acoustic features, spectrogram and Mel-spectrogram coefficients of at least one audio frame, the emotional information in the target speech can be more comprehensively identified, and the accuracy of speech emotion recognition can be improved.

[0082] In addition, the correlation coefficient is calculated by the spectrogram and the Mel spectrum coefficient to obtain the attention weight of each frame, and then the semantic features and acoustic features are weighted to obtain the deep speech features, and then the speech emotion recognition features are determined according to the first frequency domain speech features, the second frequency domain speech features, the first deep speech features and the second deep speech features. In this way, speech features that are more relevant to speech emotion recognition can be extracted, and the coefficient can be further improved to determine the speech emotion recognition features. This can more comprehensively identify the emotional information in the target speech, and further improve the accuracy of speech emotion recognition.

[0083] Figure 4 The structure diagram of the speech emotion recognition device provided in the embodiment of the present application is shown. The device can be used to perform Figure 2 or Figure 3 As shown in the figure, the speech emotion recognition device 400 includes:

[0084] The audio framing module 410 is used to perform audio framing processing on the acquired target speech to obtain at least one audio frame of the target speech;

[0085] A feature extraction module 420, configured to extract semantic features and acoustic features of the target speech, and extract a spectrogram and a Mel-spectrogram coefficient of the at least one audio frame;

[0086] A feature determination module 430, configured to determine a speech emotion recognition feature based on the semantic feature, the acoustic feature, the spectrogram and the Mel-spectrogram coefficient of the at least one audio frame;

[0087] The emotion recognition module 440 is used to determine the emotion recognition result of the target speech according to the speech emotion recognition feature.

[0088] In a possible implementation, the feature extraction module 420 includes:

[0089] A first feature acquisition unit, configured to input the target speech into a first pre-training model, and acquire semantic features of the target speech through the first pre-training model;

[0090] A second feature acquisition unit is used to input the target speech into a second pre-training model, and acquire the acoustic features of the target speech through the second pre-training model.

[0091] In a possible implementation, the feature determination module 430 includes:

[0092] A first encoding unit, configured to encode the spectrogram of the at least one audio frame to obtain a first frequency domain speech feature of the target speech;

[0093] A second encoding unit, configured to encode the Mel spectrum coefficients of the at least one audio frame to obtain a second frequency domain speech feature of the target speech;

[0094] The feature determination unit is used to determine the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the semantic feature and the acoustic feature.

[0095] In a possible implementation manner, the feature determination unit, when used to determine the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the semantic feature, and the acoustic feature, is specifically used to:

[0096] Determining a weight matrix according to a correlation coefficient between each frame feature in the first frequency domain speech feature and the second frequency domain speech feature;

[0097] Determining a first deep speech feature and a second deep speech feature according to the weight matrix, the semantic feature and the acoustic feature;

[0098] The speech emotion recognition feature is determined according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature and the second depth speech feature.

[0099] The weight matrix includes a first weight matrix and a second weight matrix; the feature determination unit, when used to determine the weight matrix according to the correlation coefficient between each frame feature in the first frequency domain speech feature and the second frequency domain speech feature, is specifically used to:

[0100] determining the first weight matrix according to a correlation coefficient between each first frame feature in the first frequency-domain speech feature and a second frame feature in the second frequency-domain speech feature corresponding to the first frame feature;

[0101] determining the second weight matrix according to a correlation coefficient between each of the second frame features in the second frequency-domain speech features and a first frame feature corresponding to the second frame feature in the first frequency-domain speech features;

[0102] The feature determination unit, when used to determine the first deep speech feature and the second deep speech feature according to the weight matrix, the semantic feature and the acoustic feature, is specifically used to:

[0103] The first deep speech feature is determined according to the first weight matrix and the semantic feature, and the second deep speech feature is determined according to the second weight matrix and the acoustic feature.

[0104] In a possible implementation manner, the feature determination unit, when used to determine the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature, is specifically used to:

[0105] The first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature and the second depth speech feature are concatenated to obtain the speech emotion recognition feature.

[0106] In a possible implementation manner, the feature determination unit, when used to determine the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature, is specifically used to:

[0107] Obtaining a target weight corresponding to each speech feature, the speech features including a first frequency domain speech feature, a second frequency domain speech feature, a first depth speech feature, and a second depth speech feature;

[0108] According to the target weights corresponding to the various speech features, the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature are weightedly summed to obtain the speech emotion recognition feature.

[0109] In a possible implementation, the emotion recognition module 440 includes:

[0110] A probability value acquisition unit, used for inputting the speech emotion recognition feature into a pre-trained target classification model, and obtaining the probability value of the target speech belonging to each preset emotion label through the target classification model;

[0111] The emotion recognition unit is used to determine the emotion recognition result of the target speech according to the probability value of the target speech belonging to each preset emotion tag and the preset threshold value.

[0112] The probability value acquisition unit is used to train the target classification model in the following way:

[0113] Acquire a speech training sample set, wherein the speech training sample set includes a plurality of speech samples and a true emotion label corresponding to each speech sample;

[0114] Iteratively train the preset neural network model using the speech training sample set, and in each iterative training process, obtain the first frequency domain speech sample feature, the second frequency domain speech sample feature, the first depth speech sample feature, and the second depth speech sample feature corresponding to the speech sample; based on the initial weights corresponding to the respective speech sample features, perform weighted summation on the first frequency domain speech sample feature, the second frequency domain speech sample feature, the first depth speech sample feature, and the second depth speech sample feature to obtain a speech emotion recognition sample feature;

[0115] Inputting the speech emotion recognition sample features into the neural network model for classification processing to obtain the predicted emotion label of the speech sample;

[0116] Determining a loss function value according to the predicted emotion label of the speech sample and the true emotion label of the speech sample;

[0117] Based on the loss function value, the initial weights corresponding to the features of each speech sample and the model parameters of the neural network model are adjusted until the set convergence conditions are met, and the trained neural network model is used as the target classification model.

[0118] In a possible implementation manner, the probability value obtaining unit is further used to:

[0119] Acquire the adjusted initial weights corresponding to the various speech sample features; and determine the adjusted initial weights as the target weights corresponding to the various speech features of the target speech.

[0120] The embodiment of the present application provides a speech emotion recognition device, including: an audio framing module, a feature extraction module, a feature determination module and an emotion recognition module; the audio framing module performs audio framing processing on the acquired target speech to obtain at least one audio frame of the target speech; the feature extraction module extracts the semantic features and acoustic features of the target speech, and extracts the spectrogram and Mel spectrum coefficients of the at least one audio frame; the feature determination module determines the speech emotion recognition features according to the semantic features, acoustic features, the spectrogram and Mel spectrum coefficients of the at least one audio frame; the emotion recognition module determines the emotion recognition result of the target speech according to the speech emotion recognition features. In this way, by introducing semantic features in the emotion recognition process of the target speech, and determining the speech emotion recognition features according to the semantic features, acoustic features, the spectrogram and Mel spectrum coefficients of at least one audio frame, the emotional information in the target speech can be more comprehensively recognized, and the accuracy of speech emotion recognition can be improved.

[0121] Figure 5 The hardware structure diagram of the electronic device provided by the embodiment of the present application is shown. Referring to the figure, at the hardware level, the electronic device 500 includes a processor 510, and optionally, includes an internal bus 520, a network interface 530, and a memory 540. Among them, the memory 540 may include a memory 541, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory 542 (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device 500 may also include hardware required for other services.

[0122] The processor 510, the network interface 530 and the memory may be connected to each other via an internal bus 520, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0123] The memory 540 stores programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions. The memory 540 may include a memory 541 and a non-volatile memory 542 , and provide instructions and data to the processor 510 .

[0124] The processor 510 reads the corresponding computer program from the non-volatile memory 542 into the memory and then runs it, forming a device for locating the target user at the logical level. The processor 510 executes the program stored in the memory and specifically performs: Figure 2 or Figure 3 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0125] The above application Figure 2 or Figure 3 The method disclosed in the illustrated embodiment can be applied to the processor 510 or implemented by the processor 510. The processor 510 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 510. The above processor 510 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0126] The computer device can also execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.

[0127] Of course, in addition to software implementation, the electronic device 500 of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0128] The embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes Figure 2 or Figure 3 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0129] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0130] Furthermore, an embodiment of the present application also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the following process is implemented: Figure 2 or Figure 3 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0131] The embodiments of the present application can be applied to various electronic device collaboration or interconnection scenarios, including: collaboration and interconnection between mobile phones and laptops / tablet computers; collaboration and interconnection between mobile terminals and smart TVs / displays; collaboration and interconnection between mobile phones or tablet computers and in-car entertainment systems; collaboration and interconnection between mobile terminals and smart conference systems, etc., so as to meet the needs of users in various scenarios such as smart homes, smart offices, and smart travel.

[0132] In short, the above is only a preferred embodiment of the present application and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0133] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0134] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0135] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0136] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A speech emotion recognition method, characterized in that: include: Performing audio frame processing on the acquired target speech to obtain at least one audio frame of the target speech; Extracting semantic features and acoustic features of the target speech, and extracting a spectrogram and a Mel-spectrogram coefficient of the at least one audio frame; Determine speech emotion recognition features according to the semantic features, the acoustic features, the spectrogram and the Mel-spectrogram coefficients of the at least one audio frame; An emotion recognition result of the target speech is determined according to the speech emotion recognition feature.

2. The method according to claim 1, characterized in that The extracting of semantic features and acoustic features of the target speech comprises: Inputting the target speech into a first pre-training model, and acquiring semantic features of the target speech through the first pre-training model; The target speech is input into a second pre-trained model, and the acoustic features of the target speech are acquired through the second pre-trained model.

3. The method according to claim 1, characterized in that: Determining speech emotion recognition features according to the semantic features, acoustic features, the spectrogram and Mel-spectrogram coefficients of the at least one audio frame includes: Encoding the spectrogram of the at least one audio frame to obtain a first frequency domain speech feature of the target speech; Encoding the Mel-spectrogram coefficients of the at least one audio frame to obtain a second frequency-domain speech feature of the target speech; The speech emotion recognition feature is determined according to the first frequency domain speech feature, the second frequency domain speech feature, the semantic feature and the acoustic feature.

4. The method according to claim 3, characterized in that The step of determining the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the semantic feature and the acoustic feature comprises: Determining a weight matrix according to a correlation coefficient between each frame feature in the first frequency domain speech feature and the second frequency domain speech feature; Determining a first deep speech feature and a second deep speech feature according to the weight matrix, the semantic feature and the acoustic feature; The speech emotion recognition feature is determined according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature and the second depth speech feature.

5. The method according to claim 4, characterized in that The weight matrix includes a first weight matrix and a second weight matrix; the weight matrix is ​​determined according to the correlation coefficient between each frame feature in the first frequency domain speech feature and the second frequency domain speech feature, including: determining the first weight matrix according to a correlation coefficient between each first frame feature in the first frequency-domain speech feature and a second frame feature in the second frequency-domain speech feature corresponding to the first frame feature; determining the second weight matrix according to a correlation coefficient between each of the second frame features in the second frequency-domain speech features and a first frame feature corresponding to the second frame feature in the first frequency-domain speech features; The determining, according to the weight matrix, the semantic features and the acoustic features, the first deep speech feature and the second deep speech feature comprises: The first deep speech feature is determined according to the first weight matrix and the semantic feature, and the second deep speech feature is determined according to the second weight matrix and the acoustic feature.

6. The method according to claim 4, characterized in that The step of determining the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature includes: The first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature and the second depth speech feature are concatenated to obtain the speech emotion recognition feature.

7. The method according to claim 4, characterized in that The step of determining the speech emotion recognition feature according to the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature includes: Obtaining a target weight corresponding to each speech feature, the speech features including a first frequency domain speech feature, a second frequency domain speech feature, a first depth speech feature, and a second depth speech feature; According to the target weights corresponding to the various speech features, the first frequency domain speech feature, the second frequency domain speech feature, the first depth speech feature, and the second depth speech feature are weightedly summed to obtain the speech emotion recognition feature.

8. The method according to claim 1, characterized in that The step of determining the emotion recognition result of the target speech according to the speech emotion recognition feature includes: Inputting the speech emotion recognition feature into a pre-trained target classification model, and obtaining the probability value of the target speech belonging to each preset emotion label through the target classification model; The emotion recognition result of the target speech is determined according to the probability value and the preset threshold value that the target speech belongs to each preset emotion tag.

9. The method according to claim 8, characterized in that The training method of the target classification model comprises: Acquire a speech training sample set, wherein the speech training sample set includes a plurality of speech samples and a true emotion label corresponding to each speech sample; Iteratively train the preset neural network model using the speech training sample set, and in each iterative training process, obtain the first frequency domain speech sample feature, the second frequency domain speech sample feature, the first depth speech sample feature, and the second depth speech sample feature corresponding to the speech sample; based on the initial weights corresponding to the respective speech sample features, perform weighted summation on the first frequency domain speech sample feature, the second frequency domain speech sample feature, the first depth speech sample feature, and the second depth speech sample feature to obtain a speech emotion recognition sample feature; Inputting the speech emotion recognition sample features into the neural network model for classification processing to obtain the predicted emotion label of the speech sample; Determining a loss function value according to the predicted emotion label of the speech sample and the true emotion label of the speech sample; Based on the loss function value, the initial weights corresponding to the features of each speech sample and the model parameters of the neural network model are adjusted until the set convergence conditions are met, and the trained neural network model is used as the target classification model.

10. The method according to claim 9, characterized in that After the trained neural network model is used as the target classification model, the method further includes: Obtaining the initial weights corresponding to the adjusted features of each speech sample; The adjusted initial weights are determined as target weights corresponding to the various speech features of the target speech.

Citation Information

Cited By

  • Accompanying robot voice recognition method and system

    CN119920237A

  • Companion robot speech recognition method and system

    CN119920237B