Music Emotion Recognition and its Model Training Methods, Devices, Equipment and Media
By performing data augmentation and feature extraction on the audio dataset and combining it with loss prediction of the recognition model, an efficient music emotion recognition model is trained, which solves the problem of low accuracy in music emotion recognition in existing technologies and achieves higher recognition accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2026-04-03
AI Technical Summary
Current technologies for music emotion recognition have low accuracy and efficiency, and manual annotation is time-consuming, labor-intensive, and not accurate enough.
By acquiring an audio dataset, data augmentation algorithms are applied to process the raw audio data, audio spectrograms are extracted, and a pre-defined recognition model is used for emotion recognition. The loss is predicted by combining the classification output and regression output, and the music emotion recognition model is trained.
It improves the accuracy and robustness of music emotion recognition, enhances recognition efficiency, and strengthens the ability to recognize audio data with weak emotional values.
Smart Images

Figure CN116564353B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model building technology, and in particular to a music emotion recognition method, apparatus, device and medium for training its model. Background Technology
[0002] Music has always been a way to express and convey emotions. The expression of emotion is an essential characteristic of music. Therefore, the identification of musical emotions is of great significance in music retrieval, music synthesis, and music therapy techniques.
[0003] In existing technologies, music classification methods typically use neural networks to train existing data to obtain classification models for music classification. These trained models are somewhat effective in music style classification, but almost ineffective in emotion classification. Furthermore, manually identifying and labeling emotions through listening tests relies heavily on subjective feelings. This process is influenced by many external factors, and manual labeling is time-consuming, labor-intensive, and lacks precision, resulting in low accuracy and efficiency in music emotion recognition. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for music emotion recognition and its model training, in order to solve the problems of low accuracy and efficiency in music emotion recognition in the prior art.
[0005] A method for training a music emotion recognition model includes:
[0006] Obtain an audio dataset, which includes at least one original audio data, a sentiment value corresponding to the original audio data, and a classification result corresponding to the original audio data;
[0007] A preset data augmentation algorithm performs data augmentation on the original audio data based on the classification results to obtain target audio data;
[0008] Feature extraction is performed on all the target audio data to obtain an audio spectrogram corresponding to each target audio data;
[0009] Emotion recognition is performed on all the audio spectrograms using a preset recognition model to obtain classification output results corresponding to each of the target audio data, as well as regression output results corresponding to each of the target audio data;
[0010] Based on the classification result, the sentiment value, the classification output result, and the regression output result corresponding to the same target audio data, loss prediction is performed to obtain the predicted loss value of the preset recognition model;
[0011] When the predicted loss value reaches the convergence condition, the preset recognition model is recorded as a music emotion recognition model.
[0012] A music emotion recognition method includes:
[0013] Acquire audio data to be identified, perform emotion recognition on the audio data to be identified using a music emotion recognition model, and obtain the emotion recognition coordinates corresponding to the audio data to be identified; the music emotion recognition model is trained using the music emotion recognition model training method.
[0014] Obtain a target emotion coordinate system; the target emotion coordinate system includes at least one emotion region; one emotion region includes multiple target emotions; one target emotion corresponds to a coordinate range;
[0015] Match the emotion recognition coordinates with all of the coordinate ranges;
[0016] The target emotion corresponding to the coordinate range to which the emotion recognition coordinates belong is determined as the music emotion recognition result corresponding to the audio data to be recognized.
[0017] A music emotion recognition model training device, comprising:
[0018] The data acquisition module is used to acquire an audio dataset, which includes at least one original audio data, a sentiment value corresponding to the original audio data, and a classification result corresponding to the original audio data.
[0019] The data augmentation module is used to perform data augmentation on the original audio data based on the classification results using a preset data augmentation algorithm to obtain target audio data;
[0020] The feature extraction module is used to extract features from all the target audio data to obtain an audio spectrogram corresponding to each of the target audio data.
[0021] The emotion recognition module is used to perform emotion recognition on all the audio spectrograms through a preset recognition model, and to obtain the classification output result corresponding to each of the target audio data, as well as the regression output result corresponding to each of the target audio data;
[0022] The loss prediction module is used to predict the loss based on the classification result, the sentiment value, the classification output result and the regression output result corresponding to the same target audio data, and to obtain the predicted loss value of the preset recognition model.
[0023] The model convergence module is used to record the preset recognition model as a music emotion recognition model when the predicted loss value reaches the convergence condition.
[0024] A music emotion recognition device, comprising:
[0025] The first acquisition module is used to acquire audio data to be identified, and to perform emotion recognition on the audio data to be identified using a music emotion recognition model to obtain the emotion recognition coordinates corresponding to the audio data to be identified; the music emotion recognition model is trained by the music emotion recognition model training method.
[0026] The second acquisition module is used to acquire a target emotion coordinate system; the target emotion coordinate system includes at least one emotion region; one emotion region includes multiple target emotions; one target emotion corresponds to a coordinate range.
[0027] A matching module is used to match the emotion recognition coordinates with all of the coordinate ranges;
[0028] The determination module is used to determine the target emotion corresponding to the coordinate range to which the emotion recognition coordinates belong as the music emotion recognition result corresponding to the audio data to be recognized.
[0029] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described music emotion recognition model training method; or the processor executes the computer program to implement the above-described music emotion recognition method.
[0030] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described music emotion recognition model training method; or the computer program, when executed by a processor, implements the above-described music emotion recognition method.
[0031] This invention provides a method, apparatus, device, and medium for training a music emotion recognition model. The method identifies the original audio data in the second and fourth quadrants based on the classification results corresponding to the original audio data. Data augmentation algorithms are used to enhance the original audio data in the second and fourth quadrants, thus identifying the target audio data and enhancing the original audio data with weaker emotion values. This improves the accuracy of subsequent feature extraction and emotion recognition. Furthermore, the preset recognition model can learn the enhanced emotions in the target audio data during the emotion recognition process. Therefore, the accuracy of the preset recognition model can be improved by additionally enhancing the emotions in the target audio data. The preset recognition model is integrated using classification and regression outputs, thereby improving the accuracy and robustness of the music emotion recognition model and increasing recognition efficiency. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a schematic diagram of the application environment of the music emotion recognition model training method in one embodiment of the present invention;
[0034] Figure 2 This is a flowchart of a music emotion recognition model training method in one embodiment of the present invention;
[0035] Figure 3 This is a flowchart of a music emotion recognition method according to an embodiment of the present invention;
[0036] Figure 4 This is a principle block diagram of a music emotion recognition model training device in another embodiment of the present invention;
[0037] Figure 5 This is a schematic block diagram of a music emotion recognition device according to an embodiment of the present invention;
[0038] Figure 6 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] The music emotion recognition model training method provided in this embodiment of the invention can be applied to, for example... Figure 1 The application environment is shown. Specifically, this music emotion recognition model training method is applied in a music emotion recognition model training device, which includes, as shown in the example, a music emotion recognition model training device. Figure 1The client and server shown communicate over a network to address the low accuracy of music emotion recognition in existing technologies. The server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The client, also known as the user terminal, refers to the program that provides categorization services to customers, corresponding to the server. The client can be installed on, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.
[0041] In one embodiment, such as Figure 2 As shown, a method for training a music emotion recognition model is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0042] S10: Obtain an audio dataset, which includes at least one original audio data, a sentiment value corresponding to the original audio data, and a classification result corresponding to the original audio data.
[0043] Understandably, raw audio data can be obtained by crawling from different databases, collecting from different websites, or sending it to a server via a client. The raw audio data can be various types of music. The raw audio data is correlated with sentiment values, which characterize the pleasantness and emotional intensity of the raw audio data. Classification results are also correlated with sentiment values, with each result representing the quadrant of the raw audio data corresponding to that sentiment value. Finally, an audio dataset is constructed based on all the acquired raw audio data.
[0044] S20: A preset data augmentation algorithm performs data augmentation on the original audio data based on the classification results to obtain target audio data.
[0045] Understandably, the target audio data is obtained by data augmentation of the original audio data in the second and fourth quadrant classification results.
[0046] Specifically, after obtaining the audio dataset, audio data extraction is performed based on the classification results corresponding to each original audio data point in the dataset. Specifically, the original audio data in the second and fourth quadrants of the classification results are extracted to obtain the extracted audio data. Then, a preset data augmentation algorithm is used to augment the extracted audio data. This involves first randomly sorting the original audio data in the dataset, then randomly selecting one original audio data point to augment the extracted audio data, obtaining the original label corresponding to the selected original audio data and the extracted label corresponding to the extracted audio data. Next, a linear transformation is performed on both audio data points. This is done according to the linear transformation formula X = λX0 + (1-λ)X1 (where X0 is the extracted audio data or the selected original audio data, and X1 is the extracted label or the original label). This yields the extracted transformed audio corresponding to the extracted audio data and the original transformed audio corresponding to the selected original audio data. Finally, the extracted transformed audio and the original transformed audio are fused according to the predicted ratio to obtain the target audio data.
[0047] S30, feature extraction is performed on all the target audio data to obtain an audio spectrogram corresponding to each of the target audio data.
[0048] Understandably, an audio spectrogram is a spectrogram of the target audio data.
[0049] Specifically, after obtaining the target audio data, it is processed by framing, that is, dividing the target audio data into multiple frame units by fixed time intervals (e.g., 30 milliseconds). When the number of frame units is less than the fixed time interval, zeros are used to pad the remaining space. To avoid excessive variation between adjacent frame units, an overlapping region is allowed between them. Since audio signals change rapidly, while Fourier transform is suitable for analyzing stationary signals, framing the audio signal reduces the intensity of sidelobes after the Fourier transform, improving the quality of the acquired spectrum. Multiplying each frame unit by a window function ensures continuity between the left and right ends of each frame unit, resulting in a continuous time window, which effectively reduces the intensity of sidelobes and spectral leakage after the Fourier transform. A Fourier transform is then performed on all windowed frame units, converting the audio signal into an energy distribution in the frequency domain for observation. Different energy distributions represent different audio characteristics, thus obtaining the spectrum corresponding to each frame unit, i.e., obtaining the audio spectrum distributed across different time windows on the time axis. In this way, the audio spectrogram corresponding to each target audio data can be obtained.
[0050] S40: Perform emotion recognition on all the audio spectrograms using a preset recognition model to obtain classification output results corresponding to each of the target audio data, and regression output results corresponding to each of the target audio data.
[0051] Understandably, the classification output is obtained by classifying the audio spectrogram corresponding to the target audio data through the classification module in the preset recognition model. The regression output is obtained by recognizing the audio spectrogram corresponding to the target audio data through the regression module in the preset recognition model.
[0052] Specifically, after obtaining all audio spectrograms, a preset recognition model is invoked. All audio spectrograms are input into the preset recognition model, which performs sentiment recognition on each spectrogram. This involves classifying and predicting the audio spectrograms using the classification module within the preset recognition model, specifically through a first preset number of convolutional layers and a second preset number of fully connected layers. This yields the classification output corresponding to each audio spectrogram, and consequently, the classification output corresponding to each target audio data. Similarly, the regression module within the preset recognition model performs sentiment prediction on the audio spectrograms, specifically through a third preset number of convolutional layers and a fourth preset number of fully connected layers. This yields the regression output corresponding to each audio spectrogram, and consequently, the regression output corresponding to each target audio data.
[0053] S50, based on the classification result, the sentiment value, the classification output result, and the regression output result corresponding to the same target audio data, loss prediction is performed to obtain the predicted loss value of the preset recognition model.
[0054] Understandably, the prediction loss is generated during the process of the preset recognition model predicting the target audio data.
[0055] Specifically, after obtaining the classification and regression output results, a first loss value is calculated for the classification result and classification output result corresponding to the same target audio data using a loss function. Simultaneously, a second loss value is calculated for the sentiment value and regression output result corresponding to the same target audio data using the same loss function. This process is repeated for all target audio data. Based on the preset loss function relationship and the first loss value of all target audio data, the second loss value of the preset recognition model is calculated, thus determining the predicted loss value of the preset recognition model.
[0056] S60, when the predicted loss value reaches the convergence condition, the preset recognition model is recorded as a music emotion recognition model.
[0057] Understandably, the convergence condition can be the condition that the predicted loss value is less than a set threshold, that is, when the predicted loss value is less than the set threshold, training stops; the convergence condition can also be the condition that the predicted loss value is very small and will not decrease further after 500 calculations, that is, when the predicted loss value is very small and will not decrease after 500 calculations, training stops, and the converged preset recognition model is recorded as the music emotion recognition model.
[0058] Specifically, after determining the predicted loss value of the preset recognition model, if the predicted loss value does not reach the preset convergence condition, the initial parameters of the preset recognition model are adjusted according to the predicted loss value, and all target audio data are re-input into the preset recognition model after adjusting the initial parameters. When the predicted loss value of the target audio data reaches the preset convergence condition, other original audio data in the audio dataset are selected, and the above steps S10 to S50 are executed to obtain the predicted loss value corresponding to the preset recognition model with adjusted initial parameters. If the predicted loss value does not reach the preset convergence condition, the initial parameters of the preset recognition model are adjusted again according to the predicted loss value, so that the predicted loss value of the preset recognition model with adjusted initial parameters reaches the preset convergence condition.
[0059] Thus, after training the preset recognition model with the original audio data and target audio data in all audio datasets, the output of the preset recognition model can continuously approach the accurate result, making the prediction accuracy higher and higher, until the prediction loss value of all address data to be recognized reaches the preset convergence condition, and the converged preset recognition model is recorded as the music emotion recognition model.
[0060] This invention provides a method for training a music emotion recognition model. The method identifies the original audio data in the second and fourth quadrants based on the classification results corresponding to the original audio data. Data augmentation algorithms are then used to enhance the original audio data in the second and fourth quadrants, thus identifying the target audio data and enhancing the original audio data with weaker emotion values. This improves the accuracy of subsequent feature extraction and emotion recognition. Furthermore, the preset recognition model can learn the enhanced emotions in the target audio data during the emotion recognition process. Therefore, the accuracy of the preset recognition model can be improved by additionally enhancing the emotions in the target audio data. By integrating the classification and regression outputs, the accuracy and robustness of the music emotion recognition model are improved, as well as the recognition efficiency.
[0061] In one embodiment, step S10 includes, that is, the classification result corresponding to the original audio data, including:
[0062] S101, obtain all sentiment values corresponding to each of the original audio data, cluster all the sentiment values, and obtain the clustering result.
[0063] Understandably, the clustering result is obtained by clustering all similar or identical sentiment values corresponding to each original audio data. The termination condition can be that no (or a minimum number) objects are reassigned to different clusters, no (or a minimum number) cluster centers change, or the sum of squared errors reaches a local minimum.
[0064] Specifically, all sentiment values corresponding to each original audio data are divided into K groups, and N sentiment values (N ≤ K) are randomly selected as initial cluster centers. Then, the distance between each sentiment value and each cluster center is calculated using Euclidean distance or cosine similarity. Each sentiment value is assigned to its nearest cluster center, and this cluster center and its assigned sentiment value represent a cluster. Each time a sentiment value is assigned, the cluster centers are recalculated based on the existing sentiment values in the cluster. This process is repeated until a certain termination condition is met, yielding the clustering result.
[0065] S102, establish coordinate axes based on the cluster centers in the clustering results to obtain the classification results corresponding to the original audio data.
[0066] Specifically, a two-dimensional coordinate axis is established based on the sentiment values of the cluster centers from multiple clustering results. That is, the coordinate axes are horizontal and vertical, with the cluster centers as the centers. Specifically, the V value (sentiment value) is used as the x-axis, and the A value (sentiment value) as the y-axis. This is used to divide all the original audio data into quadrants, thus obtaining the classification results corresponding to each original audio data point. Here, the A value represents the intensity of the music's emotion, and the V value represents the pleasantness of the music. The pleasantness of the music and the intensity of the emotion are highly correlated, resulting in the number of original audio data points in quadrants one and three being several times that in quadrants two and four. Therefore, data augmentation is required for the original audio data in quadrants two and four.
[0067] This invention employs a clustering algorithm to cluster sentiment values corresponding to each original audio data point, thereby grouping similar or identical original audio data together and obtaining the clustering results. By using the original audio data at the cluster center and employing the sentiment values corresponding to the original audio data as the horizontal and vertical axes, the original audio data is divided, thus determining the classification results.
[0068] In one embodiment, step S40, namely, performing emotion recognition on all the audio spectrograms using a preset recognition model to obtain a classification output result corresponding to each of the target audio data, includes:
[0069] S401, the first convolutional layer of the classification module in the preset recognition model is used to perform convolution processing on all the audio spectrograms to obtain the first convolutional feature vector corresponding to each audio spectrogram.
[0070] Understandably, the classification module includes a first preset number of convolutional layers and a second preset number of fully connected layers. The first convolutional feature vector is obtained by convolving the audio spectrogram with the first convolutional layer of the classification module.
[0071] Specifically, after all audio spectrograms, a preset recognition model is retrieved, and all audio spectrograms are input into the preset recognition model, that is, all audio spectrograms are input into the classification module and regression module of the preset recognition model respectively. The first convolutional layer of the classification module in the preset recognition model performs convolution processing on all audio spectrograms. That is, the first convolutional layer of the classification module performs convolution processing on the two-dimensional audio spectrograms with a convolution matrix of 3*3 kernel, 64 kernels, stride of 1, and padding of same. The first convolution result is obtained. The first convolution result is activated by the ReLU function, and the activated first convolution result is pooled by a pooling matrix of 3*3 kernel and stride of 2 to obtain the first pooling result. The second convolutional layer uses a 3x3 kernel with 128 kernels, a stride of 1, and same padding to convolve the first pooling result, resulting in the third convolution. The fourth convolution is then activated using the ReLU function, and the activated second convolution is processed by a pooling matrix with a 3x3 kernel and a stride of 2, resulting in the second pooling result. Then, the third convolutional layer uses a 3x3 kernel with 256 kernels, a stride of 1, and same padding to convolve the second pooling result, resulting in the third convolution. The third convolution is then activated using the ReLU function, and the activated third convolution is processed by a pooling matrix with a 3x3 kernel and a stride of 2, resulting in the third pooling result. After performing two convolutional processing steps on the third pooling result using a convolutional matrix with a kernel size of 3*3, a kernel number of 512, a stride of 1, and padding of "same", and then performing two pooling processing steps using a pooling matrix with a kernel size of 3*3 and a stride of 2, the first convolutional feature vector corresponding to each audio spectrogram can be obtained.
[0072] S402, the first fully connected layer of the classification module in the preset recognition model is used to predict all the first convolutional feature vectors to obtain the classification output results corresponding to each of the target audio data.
[0073] Understandably, the classification module in the preset recognition model includes three fully connected layers.
[0074] Specifically, during training, the first convolutional feature vector is first passed through the first fully connected layer. Then, the output vector of the first fully connected layer is used as the input vector of the second fully connected layer, and the output vector of the second fully connected layer is used as the input vector of the third fully connected layer. The output vector of the third fully connected layer is then used as the classification output. That is, the output unit of the third fully connected layer includes four classification outputs, corresponding to the four quadrants. During training in the third fully connected layer, this embodiment employs a dropout strategy. When the output vector of the second fully connected layer is passed to the third fully connected layer, the output vector of the third fully connected layer is randomly dropped according to a preset first dropout probability. It should be understood that dropping means "erasing" these output vectors from the network; that is, these "erased" output vectors do not participate in the current training. Then, the maxout activation function of the third fully connected layer is used to train the remaining output vectors to generate the output vector of the third fully connected layer. The first dropout probability is set according to actual needs. Using the dropout strategy in the third layer is illustrative and not a limitation.
[0075] In this embodiment of the invention, the audio spectrogram is convolved by the first convolutional layer of the classification module, thereby obtaining the first convolutional feature vector. The first fully connected layer then performs prediction processing on the first convolutional feature vector, thus obtaining the classification output. By using the dropout strategy, the joint adaptability between hidden layer nodes is effectively weakened, enhancing generalization ability and preventing overfitting of the preset recognition model during training, which is beneficial to improving the training effect of the preset recognition model.
[0076] In one embodiment, step S40, namely, performing emotion recognition on all the audio spectrograms using a preset recognition model to obtain regression output results corresponding to each of the target audio data, includes:
[0077] S403, the second convolutional layer of the regression module in the preset recognition model is used to perform convolution processing on all the audio spectrograms to obtain the second convolutional feature vector corresponding to each audio spectrogram.
[0078] Understandably, the regression module includes a third preset number of convolutional layers and a fourth preset number of fully connected layers. The third preset number is the same as the first preset number, and the fourth preset number is the same as the second preset number. The second convolutional feature vector is obtained by convolving the audio spectrogram with the second convolutional layer of the regression module.
[0079] Specifically, all audio spectrograms are input into the regression module of the preset recognition model. The regression module performs emotion recognition on all audio spectrograms to obtain the second convolutional feature vector corresponding to each target audio data. That is, the regression module can obtain the second convolutional feature vector corresponding to each target audio data through the same processing as step S401 above. The specific process will not be elaborated here.
[0080] S404, the second fully connected layer of the regression module in the preset recognition model is used to predict all the second convolutional feature vectors to obtain the regression output results corresponding to each of the target audio data.
[0081] Understandably, the difference between the regression module and the classification module lies in the dropout strategy, the number of hidden layer units, and other hyperparameters, as well as the output of the last layer.
[0082] Specifically, during training, the first convolutional feature vector is first passed through the first fully connected layer. Then, the output vector of the first fully connected layer is used as the input vector of the second fully connected layer, and the output vector of the second fully connected layer is used as the input vector of the third fully connected layer. The output vector of the third fully connected layer is then used as the classification output. That is, the output unit of the third fully connected layer includes two regression outputs, corresponding to the V value and the A value, respectively. During training in the second fully connected layer, this embodiment also employs a dropout strategy. When the output vector of the first fully connected layer is fed into the second fully connected layer, the output vector of the first fully connected layer is randomly discarded according to a preset second dropout probability. Then, the maxout activation function of the second fully connected layer is used to train the remaining output vectors to generate the output vector of the second fully connected layer. The second dropout probability is set according to actual needs. The use of the dropout strategy in the second layer is illustrative and not a limitation.
[0083] In this embodiment of the invention, the audio spectrogram is convolved using the second convolutional layer of the regression module, thereby obtaining the second convolutional feature vector. The second fully connected layer then performs prediction processing on the second convolutional feature vector, thus obtaining the regression output. By using the dropout strategy, the joint adaptability between hidden layer nodes is effectively weakened, enhancing generalization ability and preventing overfitting of the preset recognition model during training, which is beneficial for improving the training effect of the preset recognition model.
[0084] In one embodiment, step S50 includes, that is, performing loss prediction based on the classification result, the sentiment value, the classification output result, and the regression output result corresponding to the same target audio data to obtain the predicted loss value of the preset recognition model, including:
[0085] S501, a first prediction loss value is determined based on the classification result and the classification output result corresponding to the same target audio data.
[0086] Understandably, the first prediction loss is the difference between the classification output and the classification result.
[0087] Specifically, after obtaining the classification output and regression output, the classification results associated with the target audio data are arranged in the order of all target audio data. Then, the classification output results obtained through the preset recognition model and the classification results associated with the target audio data in the same sequence are used to calculate the loss using a loss function. That is, according to the order of all target audio data, the classification result corresponding to the first target audio data and the classification output result corresponding to the first target audio data are used to calculate the loss using a loss function to determine the first predicted loss value between the classification output result and the classification result corresponding to the first target audio data. Then, the classification result corresponding to the second target audio data is compared with the classification output result corresponding to the second target audio data, until all classification output results and classification results have been compared, and the first predicted loss value corresponding to each target audio data can be determined.
[0088] S502, determine a second prediction loss value based on the sentiment value corresponding to the same target audio data and the regression output result.
[0089] S503, obtain a preset data relationship formula, and determine the prediction loss value of the preset recognition model based on the preset data relationship formula, all the first prediction loss values and all the second prediction loss values.
[0090] Understandably, the first prediction loss is the difference between the regression output and the sentiment value.
[0091] Specifically, the sentiment values associated with the target audio data are arranged in the order of all target audio data. Then, the regression output obtained through the preset recognition model and the sentiment values associated with the target audio data in the same sequence are used to calculate the loss using a loss function. That is, according to the order of all target audio data, the sentiment value corresponding to the first target audio data and the regression output corresponding to the first target audio data are used to calculate the loss using a loss function to determine the second predicted loss value between the regression output and the sentiment value corresponding to the first target audio data. Then, the sentiment value corresponding to the second target audio data is compared with the regression output corresponding to the second target audio data, until all regression outputs and sentiment values have been compared, and the second predicted loss value corresponding to each target audio data is determined.
[0092] Furthermore, a preset data relationship is obtained (loss = λloss_classification + (1-λ)loss_regression, where λ is a decimal between 0 and 1, a hyperparameter, the purpose of which is to unify the two losses and prevent one loss from being too small to have an impact on the total loss). The first and second predicted loss values corresponding to the same target audio data are then filled into the preset data relationship to calculate the loss value for that target audio data. The loss values for all target audio data are calculated in this way, and then the predicted loss value of the preset recognition model is determined based on the loss values of all target audio data.
[0093] This invention calculates the loss between the classification results and the classification output results of the object limits, and the loss between the sentiment value and the regression output results, thereby obtaining the first and second predicted loss values. By calculating the first and second predicted loss values using a preset data relationship formula, the predicted loss value of the preset recognition model is determined, making the output results of the preset recognition model more accurate.
[0094] In one embodiment, such as Figure 3 As shown, a music emotion recognition method is provided, including the following steps:
[0095] S70, acquire the audio data to be identified, perform emotion recognition on the audio data to be identified using a music emotion recognition model, and obtain the emotion recognition coordinates corresponding to the audio data to be identified; the music emotion recognition model is trained using the music emotion recognition model training method.
[0096] Understandably, the audio data to be identified is music for which emotion recognition needs to be performed. The emotion recognition coordinates represent the regression and classification outputs of the music emotion recognition model for identifying the emotion in the audio data, namely the V value and A value, as well as the quadrant (classification result) corresponding to the audio data to be identified. The emotion recognition coordinates include an x-axis and a y-axis. The music emotion recognition model is trained using a music emotion recognition model training method.
[0097] Specifically, the audio data to be identified is obtained, and the audio data to be identified is input into the music emotion recognition model. The music emotion recognition model performs emotion recognition on the audio data to be identified, that is, it identifies the emotion in the audio data to be identified according to the music emotion recognition model, and obtains the emotion recognition coordinates corresponding to the audio data to be identified.
[0098] S80, Obtain the target emotion coordinate system; the target emotion coordinate system includes at least one emotion region; one emotion region includes multiple target emotions; one target emotion corresponds to a coordinate range.
[0099] S90, Match the emotion recognition coordinates with all of the coordinate ranges.
[0100] S100, the target emotion corresponding to the coordinate range to which the emotion recognition coordinate belongs is determined as the music emotion recognition result corresponding to the audio data to be recognized.
[0101] Understandably, the target emotion coordinate system is a coordinate axis used to represent different emotional positions. This target emotion coordinate system includes multiple emotion regions. Each emotion region includes multiple target emotions. Each target emotion corresponds to a coordinate range. The coordinate range represents the positional information of the target emotion within the target emotion coordinate system. That is, this coordinate range has an abscissa range and a ordinate range. Thus, the abscissa and ordinate ranges define the different positional information of each target emotion within the target emotion coordinate system. Target emotions are specific emotions categorized by intensity, such as anger, rage, happiness, or trust. The emotion recognition result is the result used to represent the emotion in the audio data to be recognized.
[0102] Specifically, after determining the emotion recognition coordinates of the audio data to be recognized, the target emotion coordinate system can be retrieved from the server. Then, based on the x-coordinate and y-coordinate of the emotion recognition coordinates, the corresponding region is queried from the target emotion coordinate system. That is, firstly, the x-coordinate of the emotion recognition coordinates is matched with the x-coordinate range of all target emotions, and the coordinate range that matches the x-coordinate of the emotion recognition coordinates is selected. Next, the y-coordinate range of the selected coordinate range that matches the x-coordinate is matched with the y-coordinate of the emotion recognition coordinates, thus selecting the coordinate range that matches both the x-coordinate and y-coordinate of the target emotion coordinates. Finally, the target emotion corresponding to this selected coordinate range is determined as the emotion recognition result of the audio data to be recognized.
[0103] This invention utilizes a music emotion recognition model to perform emotion recognition on the audio data to be identified, thereby determining the emotion recognition coordinates and facilitating accurate subsequent emotion judgment. By comparing the emotion recognition coordinates with the coordinate range in the target emotion coordinate system, and using the target emotion corresponding to the coordinate range as the emotion recognition result, accurate emotion recognition in the audio data to be identified is achieved.
[0104] In one embodiment, step S80, namely obtaining the target emotion coordinate system, includes:
[0105] S801, Obtain a preset emotion set, and cluster all the target emotions in the preset emotion set to obtain a first number of emotion cluster groups; one emotion cluster group includes multiple target emotions.
[0106] Understandably, a pre-defined emotion set is constructed by acquiring all target emotions. Emotion clusters are sets of emotions with the same meaning, such as "anger" including anger, resentment, and annoyance in the "anger" emotion cluster, and "joy" including ecstasy, happiness, and happiness in the "joy" emotion cluster.
[0107] Specifically, before obtaining the target emotion coordinate system, a preset emotion set is acquired, which includes multiple target emotions. All target emotions are clustered using the k-means clustering algorithm. k cluster centers are randomly selected from the preset emotion set. The distance between each target emotion and each cluster center is calculated using Euclidean distance or cosine similarity. Each target emotion is assigned to the nearest cluster center, and this cluster center and the assigned target emotion represent an emotion cluster group. Each time a target emotion is assigned, the cluster center is recalculated based on the existing target emotions in the emotion cluster group. This process is repeated until a certain termination condition is met. The termination condition could be that no (or a minimum number) target emotions are reassigned to different clusters, no (or a minimum number) cluster centers change, or the sum of squared errors reaches a local minimum. In this way, a first number of emotion cluster groups are obtained.
[0108] S802, the intensity of the target emotion in each of the emotion clusters is divided to obtain the emotion intensity value corresponding to the target emotion.
[0109] Understandably, the emotion intensity value represents the strength of the target emotion. Target emotions within the same emotion cluster may have different intensities. For example, the emotion cluster for "joy" may include target emotions such as ecstasy, happiness, or tranquility. Ecstasy has a greater emotion intensity value than happiness; that is, when expressing joy, ecstasy is more intense than happiness.
[0110] Specifically, after obtaining the emotion clusters, the intensity of the target emotions within each cluster is classified. This involves judging the intensity of the emotions expressed by the target emotions within each cluster and dividing each cluster into N intensity levels. The distance between the target emotion and each intensity level is calculated using Euclidean distance or cosine similarity. The distances between the target emotion and all intensity levels are compared, and the target emotion is assigned to the closest intensity level. This process is repeated for each target emotion within each cluster, and the intensity level to which the target emotion belongs is determined as its emotion intensity value. In this way, the emotion intensity value corresponding to each target emotion is obtained.
[0111] S803, obtain a preset emotional coordinate system, and divide the preset emotional coordinate system into regions to obtain a second number of coordinate regions; the second number is equal to the first number.
[0112] S804, set all the emotion clusters in the coordinate region to obtain the emotion region; one emotion cluster corresponds to one emotion region.
[0113] Understandably, the preset emotion coordinate system is a coordinate system used to represent emotions towards different targets. The emotion region is the coordinate region corresponding to the emotion cluster group in the preset emotion coordinate system.
[0114] Specifically, the preset emotional coordinate system is divided into regions, such as four major regions based on the positive and negative values of the horizontal and vertical coordinates. The preset emotional coordinate system can be further divided into regions based on emotional clusters, resulting in a second number of coordinate regions. This second number is equal to the first number. All the obtained emotional clusters are then placed within the coordinate regions according to preset rules, thus creating emotional regions; one emotional cluster corresponds to one emotional region. For example, when there are four emotional clusters, the joy cluster is placed in the region where both the horizontal and vertical coordinates are positive; the anger cluster is placed in the region where both the horizontal and vertical coordinates are negative; the sorrow cluster is placed in the region where the horizontal coordinate is negative and the vertical coordinate is positive; and the happiness cluster is placed in the region where the horizontal coordinate is negative and the vertical coordinate is positive.
[0115] S805, each of the emotional regions is divided into emotional sub-regions; each emotional sub-region corresponds to a coordinate range.
[0116] Understandably, the emotion sub-region is obtained by dividing the emotion region according to different target emotions.
[0117] Specifically, after obtaining the emotional regions, each emotional region is divided into different areas, such as dividing one emotional region into three areas, and these three areas are defined as emotional sub-regions. The range of the area corresponding to each emotional sub-region is defined as a coordinate range, that is, one emotional sub-region corresponds to one coordinate range. The coordinate range corresponding to an emotional region is greater than the coordinate range corresponding to one emotional sub-region, and equal to the sum of the coordinate ranges corresponding to multiple emotional sub-regions. This process of dividing all emotional regions is repeated to obtain the emotional sub-regions corresponding to all emotional regions.
[0118] S806, the target emotion is set in the emotion sub-region according to the emotion intensity value, and after all the target emotions are set in the emotion sub-region, the preset emotion coordinate system is recorded as the target emotion coordinate system.
[0119] Specifically, after obtaining the emotional regions, the target emotions are set in the emotional sub-regions according to the emotional intensity values. This can be done by setting the emotional intensity values from minimum to maximum, or by setting them from maximum to minimum. All target emotions are set sequentially, and after all target emotions are set in the emotional sub-regions, a preset emotional coordinate system is recorded as the target emotional coordinate system.
[0120] This invention achieves the acquisition of emotion clusters representing the same meaning by clustering target emotions. By dividing these emotion clusters by intensity, the intensity values of the emotions are obtained, thereby enabling accurate judgment of the emotions in the audio data to be identified. By dividing a preset emotion coordinate system into regions and setting the emotion clusters within these regions, the emotion regions and sub-regions are determined. The target emotion is then placed within an emotion sub-region based on its intensity value, thus establishing the target emotion coordinate system.
[0121] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0122] In one embodiment, a music emotion recognition model training device is provided, which corresponds one-to-one with the music emotion recognition model training method described in the above embodiments. For example... Figure 4 As shown, the music emotion recognition model training device includes a data acquisition module 11, a data augmentation module 12, a feature extraction module 13, an emotion recognition module 14, a loss prediction module 15, and a model convergence module 16. Detailed descriptions of each functional module are as follows:
[0123] Data acquisition module 11 is used to acquire an audio dataset, the audio dataset including at least one original audio data, a sentiment value corresponding to the original audio data, and a classification result corresponding to the original audio data;
[0124] Data augmentation module 12 is used to determine the audio data to be extracted based on the classification results, and to perform data augmentation on the extracted audio data using a preset data augmentation algorithm to obtain target audio data;
[0125] Feature extraction module 13 is used to extract features from all the target audio data to obtain an audio spectrum corresponding to each of the target audio data.
[0126] The emotion recognition module 14 is used to perform emotion recognition on all the audio spectrograms through a preset recognition model, and obtain the classification output result corresponding to each of the target audio data, and the regression output result corresponding to each of the target audio data;
[0127] The loss prediction module 15 is used to perform loss prediction based on the classification result, the sentiment value, the classification output result and the regression output result corresponding to the same target audio data, and to obtain the predicted loss value of the preset recognition model.
[0128] The model convergence module 16 is used to record the preset recognition model as a music emotion recognition model when the predicted loss value reaches the convergence condition.
[0129] In one embodiment, the data acquisition module 11 includes:
[0130] A data clustering unit is used to obtain all sentiment values corresponding to each of the original audio data, and to cluster all the sentiment values to obtain clustering results.
[0131] The data classification unit is used to establish coordinate axes based on the cluster centers in the clustering results to obtain the classification results corresponding to the original audio data.
[0132] An associated storage unit is used to associate and store each of the original audio data with its corresponding classification result and sentiment value in the audio dataset.
[0133] In one embodiment, the emotion recognition module 14 includes:
[0134] The classification convolutional unit is used to perform convolution processing on all the audio spectrograms through the first convolutional layer of the classification module in the preset recognition model to obtain the first convolutional feature vector corresponding to each audio spectrogram.
[0135] The classification prediction unit is used to perform prediction processing on all the first convolutional feature vectors through the first fully connected layer of the classification module in the preset recognition model to obtain the classification output result corresponding to each of the target audio data.
[0136] In one embodiment, the emotion recognition module 14 further includes:
[0137] The regression convolutional unit is used to perform convolution processing on all the audio spectrograms through the second convolutional layer of the regression module in the preset recognition model to obtain the second convolutional feature vector corresponding to each audio spectrogram.
[0138] The regression prediction unit is used to perform prediction processing on all the second convolutional feature vectors through the second fully connected layer of the regression module in the preset recognition model to obtain the regression output result corresponding to each of the target audio data.
[0139] In one embodiment, the loss prediction module 15 includes:
[0140] The first prediction loss unit is used to determine a first prediction loss value based on the classification result and the classification output result corresponding to the same target audio data;
[0141] The second prediction loss unit is used to determine a second prediction loss value based on the sentiment value corresponding to the same target audio data and the regression output result;
[0142] The prediction loss unit is used to obtain a preset data relationship and determine the prediction loss value of the preset recognition model based on the preset data relationship, all the first prediction loss values and all the second prediction loss values.
[0143] In one embodiment, a music emotion recognition device is provided, which corresponds one-to-one with the music emotion recognition method described in the above embodiments. For example... Figure 5 As shown, the music emotion recognition device includes a first acquisition module 17, a second acquisition module 18, a matching module 19, and a determination module 20. Detailed descriptions of each functional module are as follows:
[0144] The first acquisition module is used to acquire audio data to be identified, and to perform emotion recognition on the audio data to be identified using a music emotion recognition model to obtain the emotion recognition coordinates corresponding to the audio data to be identified; the music emotion recognition model is trained by the music emotion recognition model training method.
[0145] The second acquisition module is used to acquire a target emotion coordinate system; the target emotion coordinate system includes at least one emotion region; one emotion region includes multiple target emotions; one target emotion corresponds to a coordinate range.
[0146] A matching module is used to match the emotion recognition coordinates with all of the coordinate ranges;
[0147] The determination module is used to determine the target emotion corresponding to the coordinate range to which the emotion recognition coordinates belong as the music emotion recognition result corresponding to the audio data to be recognized.
[0148] In one embodiment, the second acquisition module includes:
[0149] A clustering unit is used to acquire a preset emotion set and cluster all the target emotions in the preset emotion set to obtain a first number of emotion cluster groups; one emotion cluster group includes multiple target emotions;
[0150] An intensity division unit is used to divide the target emotion in each of the emotion clusters into intensity values to obtain the emotion intensity value corresponding to the target emotion.
[0151] A region division unit is used to obtain a preset emotional coordinate system and divide the preset emotional coordinate system into regions to obtain a second number of coordinate regions; the second number is equal to the first number.
[0152] A region determination unit is used to set all the emotion clusters in the coordinate region to obtain an emotion region; one emotion cluster corresponds to one emotion region.
[0153] A sub-region division unit is used to divide each of the emotional regions into emotional sub-regions; each emotional sub-region corresponds to a coordinate range.
[0154] The recording unit is used to set the target emotion in the emotion sub-region according to the emotion intensity value, and after all the target emotions are set in the emotion sub-region, record the preset emotion coordinate system as the target emotion coordinate system.
[0155] Specific limitations regarding the music emotion recognition device can be found in the above section on the limitations of the music emotion recognition model training method, and will not be repeated here. Each module in the aforementioned music emotion recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0156] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data used in the music emotion recognition model training method described in the above embodiments. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a music emotion recognition model training method or a music emotion recognition method.
[0157] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described music emotion recognition model training method; or the processor executes the computer program to implement the above-described music emotion recognition method.
[0158] In one embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described music emotion recognition model training method; or the computer program, when executed by a processor, implements the above-described music emotion recognition method.
[0159] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0160] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0161] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for training a music emotion recognition model, characterized in that, include: Obtain an audio dataset, which includes at least one original audio data, a sentiment value corresponding to the original audio data, and a classification result corresponding to the original audio data; wherein, the classification result is used to characterize the quadrant in which the original audio data corresponding to the sentiment value is located; Based on the classification results, the extracted audio data is determined, and the extracted audio data is augmented using a preset data augmentation algorithm to obtain the target audio data. Feature extraction is performed on all the target audio data to obtain an audio spectrogram corresponding to each target audio data; Emotion recognition is performed on all the audio spectrograms using a preset recognition model to obtain classification output results corresponding to each of the target audio data, as well as regression output results corresponding to each of the target audio data; Based on the classification result, the sentiment value, the classification output result, and the regression output result corresponding to the same target audio data, loss prediction is performed to obtain the predicted loss value of the preset recognition model; When the predicted loss value reaches the convergence condition, the preset recognition model is recorded as a music emotion recognition model; The step of performing loss prediction based on the classification result, the sentiment value, the classification output result, and the regression output result corresponding to the same target audio data to obtain the predicted loss value of the preset recognition model includes: A first prediction loss value is determined based on the classification result and the classification output result corresponding to the same target audio data; A second prediction loss value is determined based on the sentiment value corresponding to the same target audio data and the regression output result; Obtain a preset data relationship formula, and determine the prediction loss value of the preset recognition model based on the preset data relationship formula, all the first prediction loss values, and all the second prediction loss values.
2. The music emotion recognition model training method as described in claim 1, characterized in that, Before obtaining the audio dataset, the following steps are included: Obtain all sentiment values corresponding to each of the original audio data, and cluster all the sentiment values to obtain the clustering results; Based on the cluster centers in the clustering results, coordinate axes are established to obtain the classification results corresponding to the original audio data; Each piece of raw audio data is associated with its corresponding classification result and sentiment value and stored in the audio dataset.
3. The music emotion recognition model training method as described in claim 1, characterized in that, The step of performing emotion recognition on all the audio spectrograms using a preset recognition model to obtain classification output results corresponding to each of the target audio data includes: The first convolutional layer of the classification module in the preset recognition model is used to perform convolution processing on all the audio spectrograms to obtain the first convolutional feature vector corresponding to each audio spectrogram. The first fully connected layer of the classification module in the preset recognition model is used to predict all the first convolutional feature vectors to obtain the classification output results corresponding to each of the target audio data.
4. The music emotion recognition model training method as described in claim 1, characterized in that, The step of performing emotion recognition on all the audio spectrograms using a preset recognition model to obtain regression output results corresponding to each of the target audio data includes: The second convolutional layer of the regression module in the preset recognition model is used to perform convolution processing on all the audio spectrograms to obtain the second convolutional feature vector corresponding to each audio spectrogram. The second fully connected layer of the regression module in the preset recognition model is used to predict all the second convolutional feature vectors to obtain the regression output results corresponding to each of the target audio data.
5. A method for music emotion recognition, characterized in that, include: The audio data to be identified is obtained, and the audio data to be identified is subjected to emotion recognition through a music emotion recognition model to obtain the emotion recognition coordinates corresponding to the audio data to be identified; the music emotion recognition model is trained by the music emotion recognition model training method described in claims 1 to 4. Obtain a target emotion coordinate system; the target emotion coordinate system includes at least one emotion region; one emotion region includes multiple target emotions; one target emotion corresponds to a coordinate range; Match the emotion recognition coordinates with all of the coordinate ranges; The target emotion corresponding to the coordinate range to which the emotion recognition coordinates belong is determined as the music emotion recognition result corresponding to the audio data to be recognized.
6. The music emotion recognition method as described in claim 5, characterized in that, The acquisition of the target emotion coordinate system includes: A preset sentiment set is obtained, and all the target sentiments in the preset sentiment set are clustered to obtain a first number of sentiment cluster groups; each sentiment cluster group includes multiple target sentiments. The intensity of the target emotion in each of the emotion clusters is divided to obtain the emotion intensity value corresponding to the target emotion; A preset emotional coordinate system is obtained, and the preset emotional coordinate system is divided into regions to obtain a second number of coordinate regions; the second number is equal to the first number. All the emotion clusters are set in the coordinate region to obtain the emotion region; one emotion cluster corresponds to one emotion region; Each emotional region is divided into emotional sub-regions; each emotional sub-region corresponds to a coordinate range. The target emotion is set in the emotion sub-region according to the emotion intensity value, and after all the target emotions are set in the emotion sub-region, the preset emotion coordinate system is recorded as the target emotion coordinate system.
7. A music emotion recognition device, characterized in that, include: The first acquisition module is used to acquire audio data to be identified, and to perform emotion recognition on the audio data to be identified using a music emotion recognition model to obtain the emotion recognition coordinates corresponding to the audio data to be identified; the music emotion recognition model is trained by the music emotion recognition model training method described in claims 1 to 4. The second acquisition module is used to acquire a target emotion coordinate system; the target emotion coordinate system includes at least one emotion region; one emotion region includes multiple target emotions; one target emotion corresponds to a coordinate range; A matching module is used to match the emotion recognition coordinates with all of the coordinate ranges; The determination module is used to determine the target emotion corresponding to the coordinate range to which the emotion recognition coordinates belong as the music emotion recognition result corresponding to the audio data to be recognized.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the music emotion recognition model training method as described in any one of claims 1 to 4; or when the processor executes the computer program, it implements the music emotion recognition method as described in claim 5 or 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the music emotion recognition model training method as described in any one of claims 1 to 4; or when the computer program is executed by the processor, it implements the music emotion recognition method as described in claim 5 or 6.
Citation Information
Patent Citations
Training method of emotion recognition model and emotion recognition method and device
CN113327631A
Cross-library speech emotion recognition method and device based on progressive migration neural network
CN115497507A