A speech emotion recognition model training method and system

By processing speech information from multiple angles and using various training modes, the speech emotion recognition model is optimized, solving the problems of complex data collection and poor generalization ability. It achieves efficient emotion recognition and stability, and is suitable for speech emotion analysis in multicultural environments.

CN119580776BActive Publication Date: 2026-01-06NANJING AUDIT UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411685464.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-23
Publication Date
2026-01-06
Estimated Expiration
2044-11-23

AI Technical Summary

Technical Problem

Existing methods for training voice emotion recognition models suffer from problems such as complex data collection and processing, poor generalization ability, and lack of competitiveness. They are unable to cope with voice emotion recognition tasks in different cultures, and the models have significant performance differences and lack market positioning.

Method used

By acquiring positive and negative speech information, pre-emphasis, windowing, and Fourier transform processing are performed to obtain MFCC coefficients. Then, Mel-transform and discrete cosine transform are performed, combined with homomorphic and cepstral processing, to construct a sample set for supervised and unsupervised training. The performance of the undetermined model is compared with popular models to optimize the training process.

Benefits of technology

It improves the training efficiency of the model and the accuracy of emotion recognition, can analyze customers' emotions in real time and remind relevant personnel, reduces the cost of manual intervention, and is suitable for large-scale voice data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580776B_ABST
    Figure CN119580776B_ABST
Patent Text Reader

Abstract

The application provides a speech emotion recognition model training method and system, and belongs to the field of model training; solves the problem of low model training efficiency; specifically as follows: step S1: obtaining the MFCC coefficient of each piece of speech information; step S2: obtaining the LPCC coefficient of each piece of speech information; performing supervised training and unsupervised training on the original model; until the output results of the supervised training and the unsupervised training of the original model are the same, obtaining a to-be-determined model and a to-be-determined output; step S3: comparing the performance of the to-be-determined model and the popular model; if the performance of the to-be-determined model is weaker than that of the popular model, analyzing the weak points of the to-be-determined model to obtain an improvement report; otherwise, no processing is performed; step S4: summarizing the improvement report and updating the speech information; the application extracts the feature of the speech information by defining the extraction method, so that the model can accurately capture the text characteristics and voiceprint characteristics of different emotional speech in the iteration process, and the training efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application discloses a speech emotion recognition model training method and system, and relates to the field of model training. BACKGROUND

[0002] The existing speech emotion recognition model training method and system have the following disadvantages:

[0003] Data collection and processing are difficult: speech emotion recognition requires a large amount of emotional speech data support, but different cultures, regions and languages have different ways of expressing emotions, making the construction of the data set particularly complex; in addition, speech information is often disturbed by various noises, such as environmental noise and distortion of speech information, which can affect the accuracy of emotion recognition.

[0004] Poor generalization ability: the existing model extracts less speech information feature values, and the analysis results of the existing model on the same sentence and different tone speech information are mostly the same, which is not targeted; and the speech habits of different cultures are quite different, and the selection of the training set of the existing model is single, which is difficult to cope with the speech emotion recognition task under different cultures.

[0005] Lack of competitiveness: there are various speech emotion recognition models and systems on the market, but their performance differs greatly; most of the existing models are committed to completing the given task without comparing them with popular models on the market, which makes enterprises less aware of the advantages and disadvantages of the models, unable to determine the market positioning, and lacking in competitiveness. SUMMARY

[0006] In view of the deficiencies of the prior art, the application aims to provide a speech emotion recognition model training method and system, which aims to solve the problem of low model training efficiency.

[0007] In order to achieve the above-mentioned purpose, the application is implemented by the following technical scheme: a speech emotion recognition model training method comprises:

[0008] Step S1: obtaining positive speech information and negative speech information; backing up the positive speech information and the negative speech information, and performing one processing of pre-emphasis, windowing and Fourier transform on each piece of speech information, and then performing two processing of Mel transformation and discrete cosine transformation, to obtain the MFCC coefficient of each piece of speech information;

[0009] Step S2: performing homomorphism and cepstrum processing on each piece of speech information to obtain the LPCC coefficient of each piece of speech information; obtaining an original model; converting the speech information into text information, and dividing the positive speech information and the negative speech information into sample set alpha and sample set beta in the format of text information-MFCC coefficient-LPCC coefficient;

[0010] Supervised training is performed on the original model by taking sample set α and sample set β as independent inputs; unsupervised training is performed on the original model by taking sample set α and sample set β as mixed inputs; until the output results of the supervised training and the unsupervised training of the original model are the same, obtaining a tentative model;

[0011] The positive voice information and the negative voice information are input into the tentative model to obtain a tentative output;

[0012] Step S3: The positive voice information and the negative voice information are taken as inputs of the popular model to obtain a standard output;

[0013] According to the tentative output and the standard output, the performance of the tentative model and the popular model is compared;

[0014] If the performance of the tentative model is weaker than that of the popular model, the outputs of the convolution layer, the pooling layer and the full connection layer of the tentative model are sequentially obtained and input into the corresponding convolution layer, the pooling layer and the full connection layer of the popular model, so as to analyze the weak points of the tentative model and obtain a promotion report;

[0015] If the performance of the tentative model is stronger than that of the popular model, no processing is performed;

[0016] Step S4: The promotion report is summarized and fed back; new positive voice information and new negative voice information are obtained, and the training and analysis process of the original model is performed again until the performance of the original model approaches or is stronger than that of the popular model.

[0017] Further, the specific steps of step S1 are as follows:

[0018] Step S11: Positive voice information and negative voice information are obtained, and the total number of voice information is counted, denoted as vn;

[0019] Step S12: The time length of each piece of voice information is counted, denoted as vd1, vd2, vd vn ;

[0020] The maximum value in vd1-vd vn is denoted as vd max , the minimum value is denoted as vd min , and the mode is denoted as vd mode ;

[0021] Step S13: Relationship a1: lim(vd i )→vd max is defined;

[0022] Relationship a2: lim(vd i )→vd min is defined;

[0023] In the relations a1 and a2, i is an integer, and the value of i ranges from 1 to vn; vd i Indicates the duration of the i-th voice message;

[0024] Put vd1~vd vn Substitute the values ​​into relations a1 and a2, count the number of values ​​that satisfy relation a1, denoted as vn1; count the number of values ​​that satisfy relation a2, denoted as vn2.

[0025] Calculate the percentage coefficient of the maximum duration, denoted as va1, va1 = vn1 / vn;

[0026] Calculate the percentage coefficient of the minimum duration, denoted as va2, va2 = vn2 / vn;

[0027] Step S14: Calculate the frame duration of the speech information;

[0028] Calculate the weighted duration vd of the speech information we ;vd we The calculation formula is as follows:

[0029] vd we =(va1×vd) max +va2×vd min +vd mode ) / 3;

[0030] The nominal number of samples for the speech information is denoted as sq; the formula for calculating sq is as follows:

[0031] sq = [log 60 (vd we )]×1024;

[0032] The frame duration of a single voice message is calculated and denoted as fd; the formula for calculating fd is as follows:

[0033] fd = vd we / sq;

[0034] The frame shift duration of a single voice message is denoted as fsd, and fsd = fd / 2;

[0035] Step S15: Count the number of positive speech information, denoted as va; count the number of negative speech information, denoted as vb; va, vb and vn satisfy: va + vb = vn;

[0036] Back up positive and negative voice information, and process the positive voice information:

[0037] The first positive voice information is denoted as voice information V, the voice information V is pre-emphasized, windowed and enhanced by Fourier transform, and then MFCC coefficients of the first voice information are obtained by using a Mel filter and a discrete cosine transform;

[0038] Step S16: The same steps as processing the first voice information are repeated to process the second to the va-th positive voice information, and MFCC coefficients of the second to the va-th positive voice information are obtained.

[0039] Step S17: The same steps as processing the positive voice information are repeated to process the negative voice information, and MFCC coefficients of the negative voice information are obtained, and the process goes to step S2.

[0040] Further, the specific steps of step S15 are as follows:

[0041] Step S151: A high-pass filter is used to remove low-frequency noise in the voice information, and voice information V1 is obtained; the voice information V1 is frame processed by using a frame length fd and a frame shift length fsd, and voice information V2 is obtained.

[0042] The number of voice information V2 is denoted as F, F=vd1 / fd; F is a positive number and is rounded up.

[0043] Step S152: The voice information V2 is windowed by using a Hamming window, and voice information V3 is obtained; the number of voice information V3 is the same as that of voice information V2.

[0044] The function expression w(n) of the Hamming window is as follows:

[0045] w(n)=0.54-0.46cos[(2πn) / (F-1)]; where n represents the index of the (n+1)-th voice information V2, and n ranges from 0 to (F-1).

[0046] Step S153: Fourier transform is used to convert each time-stamped voice information V3 into corresponding time-stamped frequency domain information, and information V4 is obtained; the function expression of the Fourier transform is as follows:

[0047]

[0048] where k represents the index of information V4, n represents the index of voice information V3, and k and n both range from 0 to (F-1).

[0049] X(k) represents the k-th time-stamped information V4, and x(n) represents the n-th time-stamped voice information V3.

[0050] e represents a natural constant, and j represents an imaginary unit (i.e., j 2= -1), and π represents a circular constant.

[0051] Further, the subsequent steps of the step S153 are as follows:

[0052] Step S154: Obtain the frequency of each information V4, denoted as f1, f2~f F ;

[0053] Using the Mel scale triangular filter, the information V4 simulates the nonlinear frequency perception of human hearing, and the information V5 is obtained;

[0054] The number of triangular filters is F;

[0055] The frequency scanning range of the triangular filter is set to 0 Hz~(2 / F) Hz;

[0056] Convert the frequency of information V4 corresponding to each timestamp to Mel frequency, and the conversion formula is as follows:

[0057] F mel (f i ) = 2595 x lg(1+f i / 700); where i represents the number of information V4, f i represents the frequency of the i-th information V4; F mel (f i ) represents the perceived frequency of f i in Mel units;

[0058] Summarize F mel (f1)~F mel (f F ) as information V5;

[0059] Step S155: Discrete cosine transform is performed on the perceived frequency of information V4 to obtain the MFCC coefficient of the first piece of speech information;

[0060] The formula of discrete cosine transform is as follows:

[0061]

[0062] Wherein, MFCC(i) represents the MFCC coefficient corresponding to the i-th information V5;

[0063] Summarize MFCC(1)~MFCC(F) as the MFCC coefficient of the first piece of active speech information.

[0064] Further, the specific steps of the step S2 are as follows:

[0065] Step S21: Perform homomorphism and cepstrum processing on the active speech to obtain the LPCC coefficient of the active speech information;

[0066] Step S22: Repeat the same steps of homomorphic and cepstrum processing for positive speech to process negative speech information to obtain the LPCC coefficients of negative speech information;

[0067] Step S23: Obtain the model provided by the user as the original model;

[0068] Convert the positive speech information and the negative speech information into corresponding positive speech text and negative speech text;

[0069] Summarize the positive speech information as a sample set α in the format of positive speech text-MFCC coefficients of positive speech information-LPCC coefficients of positive speech information;

[0070] Summarize the negative speech information as a sample set β in the format of negative speech text-MFCC coefficients of negative speech information-LPCC coefficients of negative speech information;

[0071] Step S24: Define a training process for supervised training of the original model:

[0072] Process a: Extract the MFCC coefficients corresponding to all positive speech information to construct an MFCC sequence I, denoted as Cmf I, Cmf I = {MFCC1, MFCC2, ~MFCC va};

[0073] Extract the LPCC coefficients corresponding to all positive speech information to construct an LPCC sequence I, denoted as Clp I, Clp I = {LPCC1, LPCC2, ~LPCC va};

[0074] Process b: Extract the MFCC coefficients corresponding to all negative speech information to construct an MFCC sequence II, denoted as Cmf II, Cmf II = {MFCC1`, MFCC2` ~MFCC vb `};

[0075] Extract the LPCC coefficients corresponding to all negative speech information to construct an LPCC sequence II, denoted as Clp II, Clp II = {LPCC1`, LPCC2` ~LPCC vb `};

[0076] Process c: Fuse Cmf I and Clp I to obtain a positive voiceprint feature sequence, denoted as C I, C I = {(MFCC1, LPCC1), (MFCC2, LPCC2) ~ (MFCC va , LPCC va )};

[0077] Cmf II is fused with Clp II to obtain an active voiceprint feature sequence, denoted as C II, C II = {(MFCC1`, LPCC1`), (MFCC2`, LPCC2`)~(MFCC vb `), LPCC vb `)}.

[0078] Process d: taking the active voice text - C I as a feature set of sample set a, denoted as feature set a1; taking the negative voice text - C II as a feature set of sample set β, denoted as feature set β1;

[0079] Process e: setting the state number in the original model to 4 and the Gaussian element number to 3;

[0080] The feature set a1 and the feature set β1 are respectively brought into the original model, and iteration is performed until the voice information corresponding to the feature set a1 and the feature set β1 is output by the original model;

[0081] Process f: setting a determination condition for model convergence: the difference between the output probabilities of two adjacent times is less than 1x10 -4 ;

[0082] Setting a cross-validation algorithm as a test algorithm (for preventing overfitting of the original model).

[0083] Further, subsequent steps of the step S24 are as follows:

[0084] Step S25: defining a training process for unsupervised training of the original model:

[0085] Process 1: repeating the process a~process c to obtain the active voiceprint feature sequence C I and the active voiceprint feature sequence C II;

[0086] Process 2: taking C I and C II as a training set 1, taking the active voice text and the negative voice text as a training set 2, and using a K-means clustering algorithm to iteratively train the original model until the elements in the training set 1 and the elements in the training set 2 are simultaneously output and the output elements correspond;

[0087] Process 3: setting a determination condition for model convergence: the difference between the output probabilities of two adjacent times is less than 1x10 -4 ;

[0088] Setting a cross-validation algorithm as a test algorithm (for preventing overfitting of the original model).

[0089] Step S26: performing supervised training and unsupervised training on the original model; until the output results of the supervised training and the unsupervised training of the original model are the same, obtaining a to-be-determined model;

[0090] Step S27: Input positive and negative speech information into the undetermined model to obtain the undetermined output, and record the response time of the undetermined output as the undetermined time, then proceed to step S3.

[0091] Furthermore, the specific steps of step S21 are as follows:

[0092] Step S211: Perform homomorphic and cepstral processing on the first active speech information; perform framing, windowing and Fourier transform on the first active speech information using the frame duration fd and frame shift duration fsd to obtain the discrete-time information of the first active speech information, denoted as information E; the number of information E is F;

[0093] Obtain the frequency corresponding to each piece of information E, denoted as x1, x2, and so on. F ;

[0094] Step S212: Perform Z-transform, logarithmic transformation, and inverse Z-transform on the first to the Fth pieces of information E;

[0095] The functional expression for the Z-transform is as follows:

[0096] Where i represents the number of information items E, x i Let X(z) represent the frequency of the i-th information E; X(z) represent the output of the Z-transform of information E from the first to the i-th information.

[0097] z i Let z be a complex variable representing the i-th piece of information E. i The calculation formula is as follows:

[0098] z i =(vc×x) i )×e(j×ω) -1 Where vc represents the speed of sound, e represents the natural constant, and j represents the imaginary unit j. 2 =-1; ω represents the phase of the i-th information E, and the formula for calculating ω is as follows:

[0099] ω=arctan[(vc×x i [) / fd]; where arctan represents the arctangent function;

[0100] The function expression for the logarithmic transformation is as follows:

[0101] Where lnX(z) represents the output result of the logarithmic transformation of X(z);

[0102] The inverse Z-transform of lnX(z) is performed using the iztrans function, transforming the information E from frequency domain information to time domain information, denoted as ts1, ts2~ts F ;

[0103] Step S213: Perform homomorphic and cepstrum processing on the ts1-ts F F ;

[0104] The function expression of the cepstrum processing is as follows:

[0105] Wherein, i and k represent the number of information E, and the value range of i and k is: 1-F; xi i represents the frequency of the i-th information E, ts i represents the time domain information corresponding to the i-th information E, and ce i represents the LPC coefficient of the i-th information E.

[0106] Using the discrete cosine transform algorithm, the ce1-ce F is converted from time domain information to frequency domain information to obtain the LPCC coefficient of the first positive voice information.

[0107] Step S214: Repeat the same steps of homomorphic and cepstrum processing on the first positive voice information to process the second to the va-th positive voice information to obtain the LPCC coefficient of the second to the va-th positive voice information.

[0108] Further, the specific steps of the step S3 are as follows:

[0109] Step S31: Take the positive voice information and the negative voice information as the input of the popular model to obtain the standard output, and record the response time of the popular model as the standard time.

[0110] Step S32: Use the difflib module and the fuzzywuzzy library to calculate the text matching degree of the tentative output relative to the standard output, denoted as tmd; the tentative time is denoted as ta, and the standard time is denoted as tb.

[0111] Step S33: Define the relationship C: [lim(tmd)→1]∩(ta≤tb).

[0112] Determine whether the relationship C is established.

[0113] If it is established, it means that the performance of the tentative model is stronger than that of the popular model, and it is not processed.

[0114] If it is not established, the performance of the tentative model is weaker than that of the popular model, and the outputs of the convolution layer, the pooling layer and the full connection layer of the tentative model are obtained in turn, and step S34 is entered.

[0115] ​Step S34: input the output of the to-be-determined model convolution layer, the pooling layer and the full connection layer into the convolution layer, the pooling layer and the full connection layer corresponding to the popular model, and determine whether the output of the popular model is the same as the standard output;

[0116] Step S341: input the output of the to-be-determined model convolution layer into the convolution layer of the popular model, execute the popular model to obtain an output a1, and determine whether the output a1 is the same as the standard output;

[0117] If the output a1 is the same as the standard output, it indicates that the convolution layer of the original model is good.

[0118] If the output a1 is different from the standard output, it indicates that the convolution layer of the original model is abnormal.

[0119] Step S342: input the output of the to-be-determined model pooling layer into the pooling layer of the popular model, execute the popular model to obtain an output a2, and determine whether the output a2 is the same as the standard output.

[0120] If the output a2 is the same as the standard output, it indicates that the pooling layer of the original model is good.

[0121] If the output a2 is different from the standard output, it indicates that the pooling layer of the original model is abnormal.

[0122] Step S343: input the output of the to-be-determined model full connection layer into the full connection layer of the popular model, execute the popular model to obtain an output a3, and determine whether the output a3 is the same as the standard output.

[0123] If the output a3 is the same as the standard output, it indicates that the full connection layer of the original model is good.

[0124] If the output a3 is different from the standard output, it indicates that the full connection layer of the original model is abnormal.

[0125] Step S35: summarize the analysis results of step S34 as a promotion report of the original model.

[0126] A voice emotion recognition model training system comprises:

[0127] A voice acquisition module is configured to obtain positive voice information and negative voice information, and perform a first processing of pre-emphasis, windowing and Fourier transform on each piece of voice information, and then perform a second processing of Mel transformation and discrete cosine transformation, to obtain MFCC coefficients of each piece of voice information.

[0128] A model training module is configured to perform homomorphism and cepstrum processing on each piece of voice information to obtain LPCC coefficients of each piece of voice information, obtain an original model, convert the voice information into text information, divide the positive voice information and the negative voice information into a sample set α and a sample set β in the format of text information-MFCC coefficients-LPCC coefficients.

[0129] Supervised training is performed on the original model by taking sample set alpha and sample set beta as independent inputs, unsupervised training is performed on the original model by taking sample set alpha and sample set beta as mixed inputs, until the output results of the supervised training and the unsupervised training of the original model are the same, and the undetermined model is obtained;

[0130] The positive voice information and the negative voice information are input into the undetermined model to obtain an undetermined output;

[0131] The comparison and analysis module is used for taking the positive voice information and the negative voice information as inputs of the popular model to obtain a standard output;

[0132] According to the undetermined output and the standard output, the performance of the undetermined model and the popular model is compared;

[0133] If the performance of the undetermined model is weaker than that of the popular model, the outputs of the convolution layer, the pooling layer and the full connection layer of the undetermined model are sequentially obtained and input into the corresponding convolution layer, the pooling layer and the full connection layer of the popular model, the weak points of the undetermined model are analyzed, and a promotion report is obtained;

[0134] If the performance of the undetermined model is stronger than that of the popular model, no processing is performed;

[0135] The voice updating module is used for summarizing the promotion report and feeding back, obtaining new positive voice information and new negative voice information, and performing the training and analysis process of the original model again until the performance of the original model approaches or is stronger than that of the popular model.

[0136] Compared with the prior art, the present application has the following advantages:

[0137] Improve service quality: the present application processes voice information based on multiple data sources, multiple angles and multiple aspects, and trains a machine model, so that the model can analyze the voice emotion of a customer in real time; when the machine model trained based on the present application detects a statement expressing dissatisfaction or anger of the customer, the model can quickly identify and remind relevant personnel to prevent unnecessary conflicts.

[0138] The training effect is remarkable: the present application extracts voice information from multiple angles before model training, adopts multiple training modes in the training process, and optimizes the training by comparing the trained model with a popular model, so that the model continuously learns and optimizes in the training process, improving the accuracy and stability of emotion recognition.

[0139] Reduce labor cost: the present application can automatically identify the emotional state of a customer, reduce manual intervention and reduce labor cost, and is suitable for large-scale processing of voice data. BRIEF DESCRIPTION OF DRAWINGS

[0140] Other features, objects, and advantages of the application will become more apparent from the following detailed description when read in connection with the following drawings:

[0141] Figure 1 Schematic diagram of the method of the application;

[0142] Figure 2 Schematic diagram of the system of the application;

[0143] Figure 3 Schematic diagram of the language information extraction of the application. DETAILED DESCRIPTION

[0144] In order to make the above objectives, features and advantages of the application more apparent and easy to understand, the application will be further described in detail below in combination with the drawings and specific embodiments.

[0145] Embodiment one

[0146] Please refer to Figure 1 and Figure 3 A voice emotion recognition model training method comprises the following steps:

[0147] Step S1: Obtain positive voice information and negative voice information, and perform once processing of pre-emphasis, windowing and Fourier transform on each piece of voice information, and then perform twice processing of Mel transformation and discrete cosine transformation, to obtain MFCC coefficients of each piece of voice information;

[0148] The specific steps of step S1 are as follows:

[0149] Step S11: Obtain positive voice information and negative voice information, and count the total number of voice information (i.e. the total number of positive voice information and negative voice information), denoted as vn;

[0150] It should be noted that the "positive voice information" in the application refers to voice related to positive emotions (such as happy, joyful, optimistic, etc.); and the "negative voice information" refers to voice related to negative emotions (such as depressed, lost, angry, etc.);

[0151] The information source of the positive and negative voice information in the application is an open voice library. Common open voice libraries include LibriSpeech, VoxForge, TIMIT, etc.

[0152] Step S12: Count the duration of each piece of voice information, denoted as vd1, vd2, vd vn ; (wherein vd1 represents the duration of the first piece of voice information; vd2 represents the duration of the second piece of voice information; vd vn represents the duration of the vnth piece of voice information.)

[0153] Extract the maximum value in vd1~vd vn , and mark it as vd max , the minimum value as vd min , and the mode as vd mode ;

[0154] Step S13: define the relationship a1 and a2;

[0155] Relationship a1: lim(vd i )→vd max ;

[0156] Relationship a2: lim(vd i )→vd min ;

[0157] The i in relationship a1 and a2 is an integer, and the value range of i is: 1~vn; vd i represents the duration of the i-th voice information;

[0158] Substitute vd1~vd vn into relationship a1 and a2, count the number of relationship a1, and mark it as vn1; count the number of relationship a2, and mark it as vn2;

[0159] Calculate the proportion coefficient of the maximum duration, mark it as va1, va1=vn1 / vn;

[0160] Calculate the proportion coefficient of the minimum duration, mark it as va2, va2=vn2 / vn;

[0161] Step S14: calculate the frame duration of voice information;

[0162] Calculate the weighted duration vd we of voice information; vd we The calculation formula is as follows:

[0163] vd we =(va1×vd max +va2×vd min +vd mode ) / 3;

[0164] Calculate the rated sampling number of voice information, mark it as sq; The calculation formula of sq is as follows:

[0165] sq=[log 60 (vd we )]×1024;

[0166] Calculate the frame duration of a single voice information, mark it as fd; The calculation formula of fd is as follows:

[0167] fd=vd we / sq; (unit of fd: millisecond)

[0168] Frame shift duration of single voice information, recorded as fsd, fsd = fd / 2;

[0169] Step S15: Count the number of positive voice information, recorded as va; count the number of negative voice information, recorded as vb; va, vb and vn satisfy: va+vb = vn;

[0170] Backup positive voice information and negative voice information, and process the positive voice information:

[0171] Record the first positive voice information as voice information V, and perform pre-emphasis, windowing and Fourier transform enhancement processing on the voice information V, and then use Mel filter and discrete cosine transform to obtain the MFCC coefficient of the first voice information;

[0172] Step S151: Use a high-pass filter to remove low-frequency noise in the voice information, to obtain voice information V1; frame the voice information V1 with frame duration fd and frame shift duration fsd, to obtain voice information V2;

[0173] The number of voice information V2 (i.e. the number of samples), recorded as F, F = vd1 / fd; F is a positive number, rounded up;

[0174] Step S152: Use Hamming window to perform windowing processing on the voice information V2, to obtain voice information V3; the number of voice information V3 is the same as that of voice information V2;

[0175] The function expression w(n) of Hamming window is as follows:

[0176] w(n) = 0.54 - 0.46cos[(2πn) / (F-1)]; where n represents the index of the (n+1)th voice information V2, n ranges from 0 to (F-1); (the reason for counting from zero: matching the default computer internal counting method, which starts from zero by default)

[0177] Step S153: Use Fourier transform to convert each timestamp voice information V3 (time domain information) into corresponding timestamp frequency domain information, to obtain information V4; the function expression of Fourier transform is as follows:

[0178]

[0179] Where k represents the index of information V4 (i.e. frequency domain information), n represents the index of voice information V3 (i.e. time domain information), and k and n both range from 0 to (F-1);

[0180] X(k) represents the information V4 (i.e., frequency domain information) of the kth timestamp, and x(n) represents the voice information V3 (i.e., time domain information) of the nth timestamp;

[0181] e represents a natural constant, j represents an imaginary unit (i.e., j 2 = -1), and p represents a circular constant;

[0182] Step S154: Obtain the frequency of each information V4, denoted as f1, f2,..., and fF. F (wherein f1 represents the frequency of the information V4 corresponding to the 1st timestamp; f2 represents the frequency of the information V4 corresponding to the 2nd timestamp; and so on, and fF represents the frequency of the information V4 corresponding to the Fth timestamp.) F ;

[0183] Using the triangular filter of the Mel scale, the information V4 (i.e., frequency domain information) is received to simulate the nonlinear frequency perception of human hearing, and the information V5 is obtained.

[0184] The number of triangular filters is F; (The reason for setting the number of triangular filters to F here is to prevent interference between two information V4 of adjacent timestamps when performing Mel frequency conversion.

[0185] The user or relevant technical personnel can adjust the number of triangular filters according to actual needs)

[0186] The frequency scanning range of the triangular filter is set to 0 Hz to (2 / F) Hz.

[0187] The frequency of the information V4 corresponding to each timestamp is converted to the Mel frequency, and the conversion formula is as follows:

[0188] F mel (f i ) = 2595 x lg (1 + f i / 700); wherein i represents the number of information V4, f i represents the frequency of the ith information V4, and F mel (f i ) represents the perceived frequency (i.e., Mel frequency) of f i in Mel units;

[0189] F mel (f1) to F mel (f F ) are summarized as information V5.

[0190] Step S155: Perform discrete cosine transform on the perceived frequency of the information V4 to obtain the MFCC coefficient of the 1st voice information.

[0191] The formula of the discrete cosine transform is as follows:

[0192]

[0193] wherein MFCC(i) represents the MFCC coefficient corresponding to the i-th information V5;

[0194] MFCC(1)~MFCC(F) are summarized as the MFCC coefficients of the 1st positive voice information;

[0195] Step S16: the same steps (i.e. steps S151~S155) of processing the 1st voice information are repeated to process the 2nd to va-th positive voice information, to obtain the MFCC coefficients of the 2nd to va-th positive voice information;

[0196] Step S17: the same steps (i.e. steps S15~S16) of processing the positive voice information are repeated to process the negative voice information, to obtain the MFCC coefficients of the negative voice information.

[0197] Step S2: homomorphic and cepstrum processing are performed on each voice information to obtain the LPCC coefficients of each voice information; a model provided by a user is obtained as an original model; the voice information is converted into text information, and the positive voice information and the negative voice information are divided into sample set a and sample set β in the format of text information—MFCC coefficients—LPCC coefficients;

[0198] The sample set a and the sample set β are taken as independent inputs to perform supervised training on the original model; the sample set a and the sample set β are taken as mixed inputs to perform unsupervised training on the original model; until the output results of the supervised training and the unsupervised training of the original model are the same (the model training is completed), to obtain a to-be-determined model;

[0199] The positive voice information and the negative voice information are input into the to-be-determined model to obtain a to-be-determined output (i.e. the output of the to-be-determined model);

[0200] The specific steps of step S2 are as follows:

[0201] Step S21: homomorphic and cepstrum processing are performed on the positive voice to obtain the LPCC coefficients of the positive voice information;

[0202] Homomorphic and cepstrum processing are performed on the 1st positive voice information;

[0203] Step S211: the 1st positive voice information is framed, windowed and Fourier transformed with a framing time length fd and a frame shift time length fsd (i.e. steps S151~S153) to obtain discrete time information of the 1st positive voice information, denoted as information E; the number of information E is F (the same as the number of voice information V2 described above);

[0204] Obtain the frequency corresponding to each information E, denoted as x1, x2~x F ; (wherein, x1 represents the frequency of the first information E; x2 represents the frequency of the second information E; and so on, x F represents the frequency of the Fth information E)

[0205] Step S212: Z-transform, logarithmic conversion and inverse Z-transform are performed on the first to Fth information E.

[0206] The function expression of Z-transform is as follows:

[0207] Wherein, i represents the number of information E, x i represents the frequency of the ith information E; X(z) represents the output result of Z-transform on the first to ith information E.

[0208] z i represents the complex variable of the ith information E, z i The calculation formula of z

[0209] z i = (vc x x i ) x e(j x ω) -1 ; wherein, vc represents the speed of sound, e represents the natural constant; j represents the imaginary unit j 2 =-1; ω represents the phase of the ith information E, and the calculation formula of ω is as follows:

[0210] ω = arctan[(vc x x i ) / fd]; wherein, arctan represents the inverse tangent function.

[0211] The function expression of logarithmic conversion is as follows:

[0212] Wherein, lnX(z) represents the output result of logarithmic conversion on X(z).

[0213] Inverse Z-transform is performed on lnX(z) using the iztrans function, and the information E is converted from frequency domain information to time domain information, denoted as ts1, ts2~ts F ; (wherein, ts1 represents the time domain information corresponding to the first information E; ts2 represents the time domain information corresponding to the second information E; and so on, ts F represents the time domain information corresponding to the Fth information E.)

[0214] Step S213: Perform cepstrum processing on ts1~ts F , and obtain the LPC coefficients of the first to Fth information E, denoted as ce1~ce F .

[0215] The function expression of the cepstrum processing is as follows:

[0216] Wherein, i and k both represent the number of information E, the value range of i and k is: 1~F; x i represents the frequency of the i-th information E, ts i represents the time domain information corresponding to the i-th information E, ce i represents the LPC coefficient of the i-th information E;

[0217] The discrete cosine transform algorithm is used to convert the ce1~ce F from the time domain information to the frequency domain information, and the LPCC coefficient of the first positive voice information is obtained;

[0218] Step S214: Repeat the same steps of homomorphism and cepstrum processing on the first positive voice information (steps S211~S213) to process the second to the va-th positive voice information, and obtain the LPCC coefficient of the second to the va-th positive voice information;

[0219] Step S22: Repeat the same steps of homomorphism and cepstrum processing on the positive voice to process the negative voice information, and obtain the LPCC coefficient of the negative voice information;

[0220] Step S23: Obtain the model provided by the user as the original model;

[0221] Use the recognize_google function and recognize_sphinx function in the SpeechRecognition library to convert the positive voice information and the negative voice information into corresponding positive voice text and negative voice text;

[0222] According to the format of positive voice text-MFCC coefficient of positive voice information-LPCC coefficient of positive voice information, the positive voice information is summarized as a sample set α;

[0223] According to the format of negative voice text-MFCC coefficient of negative voice information-LPCC coefficient of negative voice information, the negative voice information is summarized as a sample set β;

[0224] Step S24: Define the training process of supervised training on the original model:

[0225] Process a: Extract the MFCC coefficients corresponding to all positive voice information to construct the MFCC sequence I, denoted as Cmf I, Cmf I={MFCC1, MFCC2~MFCC va}; (where MFCC1 represents the MFCC coefficient of the first active speech information; MFCC2 represents the MFCC coefficient of the second active speech information; and so on, MFCC...) va (This represents the MFCC coefficient of the vath active speech information)

[0226] Extract all active speech information corresponding to the LPCC coefficients to construct LPCC sequence I, denoted as ClpI, where ClpI = {LPCC1, LPCC2 ~ LPCC1}. va}; (where LPCC1 represents the LPCC coefficient of the first active speech information; LPCC2 represents the LPCC coefficient of the second active speech information; and so on, LPCC...) va (This represents the LPCC coefficient of the vath positive speech information)

[0227] Procedure b: Extract the MFCC coefficients corresponding to all negative speech information to construct MFCC sequence II, denoted as CmfII, where CmfII = {MFCC1`, MFCC2` ~ MFCC... vb `};(where MFCC1` represents the MFCC coefficient of the first negative speech information; MFCC2` represents the MFCC coefficient of the second negative speech information; and so on, MFCC... vb ` represents the MFCC coefficient of the vbth negative speech message)

[0228] Extract the LPCC coefficients corresponding to all negative speech information to construct LPCC sequence II, denoted as ClpII, where ClpII = {LPCC1`, LPCC2` ~ LPCC... vb `};(where LPCC1` represents the LPCC coefficient of the first negative speech information; LPCC2` represents the LPCC coefficient of the second negative speech information; and so on, LPCC vb ` represents the LPCC coefficient of the vbth negative speech message)

[0229] Step c: Fuse CmfⅠ and ClpⅠ to obtain the positive voiceprint feature sequence, denoted as CI, CI = {(MFCC1, LPCC1), (MFCC2, LPCC2) ~ ( ...), (MFCC1, LPCC1), (MFCC va LPCC va )};

[0230] Fusing CmfⅡ and ClpⅡ yields the active voiceprint feature sequence, denoted as CⅡ, where CⅡ = {(MFCC1`, LPCC1`), (MFCC2`, LPCC2`) ~ (MFCC1`, LPCC1`). vb `, LPCC vb `)};

[0231] Process d: Use positive speech text—CI as the feature set of sample set α, denoted as feature set α1; use negative speech text—CII as the feature set of sample set β, denoted as feature set β1;

[0232] Process e: Set the number of states in the original model to 4 and the number of Gaussian elements to 3;

[0233] Substitute feature set α1 and feature set β1 into the original model and iterate until the speech information corresponding to feature set α1 and feature set β1 are output by the original model.

[0234] Procedure f: Set the convergence criterion for the model: the difference (positive) between two consecutive output probabilities is less than 1 × 10⁻⁶. -4 ;

[0235] Set cross-validation as the testing algorithm (to prevent overfitting of the original model);

[0236] Step S25: Define the training process for unsupervised training of the original model:

[0237] Procedure 1: Repeat procedures a to c to obtain positive voiceprint feature sequence CⅠ and positive voiceprint feature sequence CⅡ;

[0238] Process 2: Use CⅠ and CⅡ as training set 1, and positive speech text and negative speech text as training set 2. Use the K-means clustering algorithm to iterate the original model until the elements in training set 1 and the elements in training set 2 are output simultaneously and the output elements correspond (that is, the (positive or negative) speech text output by training set 1 corresponds to the (positive or negative) voiceprint feature sequence output by training set 2).

[0239] Step 3: Set the convergence criterion for the model: the difference (positive) between two consecutive output probabilities is less than 1 × 10⁻⁶. -4 ;

[0240] Set cross-validation as the testing algorithm (to prevent overfitting of the original model);

[0241] Step S26: Perform supervised and unsupervised training on the original model until the outputs of supervised and unsupervised training of the original model are the same (model training is complete), and obtain the undetermined model;

[0242] Step S27: Input positive speech information and negative speech information into the undetermined model to obtain the undetermined output (i.e. the output of the undetermined model), and record the response time of the undetermined output as the undetermined time.

[0243] Step S3: (Directly) use positive and negative speech information as input to the popular model to obtain the standard output (i.e., the output of the popular model);

[0244] Compare the performance of the undetermined model and the popular model based on the undetermined output and the standard output.

[0245] If the performance of the undetermined model is weaker than that of the popular model, the outputs of the convolutional layer, pooling layer and fully connected layer of the undetermined model are obtained in sequence and input into the corresponding convolutional layer, pooling layer and fully connected layer of the popular model to analyze the weaknesses of the undetermined model and obtain an improvement report.

[0246] If the performance of the undetermined model is better than that of the popular model, then no action is taken;

[0247] The specific steps of step S3 are as follows:

[0248] Step S31: (Directly) use positive speech information and negative speech information as input to the popular model to obtain the standard output (i.e., the output of the popular model), and record the response time of the popular model as the standard time;

[0249] It should be noted that the "popular models" in this invention refer to language emotion recognition models that are widely used in the market. Common popular models include GPT, BERT, RoBERTa, etc.

[0250] Step S32: Using the difflib module and the fuzzywuzzy library, calculate the text matching degree of the pending output relative to the standard output, denoted as tmd; denote the pending time as ta and the standard time as tb;

[0251] Step S33: Define relation C: [lim(tmd)→1]∩(ta≤tb);

[0252] Determine whether relation C is true;

[0253] If true, it means that the performance of the undetermined model is better than that of the popular model, so no action is taken.

[0254] If this is not the case, the performance of the undetermined model is weaker than that of the popular model. The outputs of the convolutional layer, pooling layer and fully connected layer of the undetermined model are obtained in sequence, and the process proceeds to step S34.

[0255] Step S34: Input the outputs of the convolutional layer, pooling layer, and fully connected layer of the undetermined model into the convolutional layer, pooling layer, and fully connected layer corresponding to the popular model, and determine whether the output of the popular model is the same as the standard output;

[0256] Step S341: Substitute the output of the convolutional layer of the undetermined model into the convolutional layer of the popular model, execute the popular model to obtain output a1; determine whether output a1 is the same as the standard output;

[0257] If the output a1 is the same as the standard output, it means that the convolutional layer of the original model is good;

[0258] If the output a1 is different from the standard output, it indicates that the convolutional layer of the original model is abnormal.

[0259] Step S342: Substitute the output of the pooling layer of the undetermined model into the pooling layer of the popular model, execute the popular model to obtain output a2; determine whether output a2 is the same as the standard output;

[0260] If the output a2 is the same as the standard output, it means that the pooling layer of the original model is good;

[0261] If the output a2 is different from the standard output, it indicates that the pooling layer of the original model is abnormal.

[0262] Step S343: Substitute the output of the fully connected layer of the undetermined model into the fully connected layer of the popular model, execute the popular model to obtain output a3; determine whether output a3 is the same as the standard output;

[0263] If the output a3 is the same as the standard output, it means that the fully connected layer of the original model is good;

[0264] If the output a3 is different from the standard output, it indicates that the fully connected layer of the original model is abnormal.

[0265] Step S35: Summarize the analysis results of step S34 as an improvement report of the original model.

[0266] Step S4: Summarize the improvement report and provide feedback; obtain new positive speech information and new negative speech information, and repeat the training and analysis process of the original model (i.e., steps S1 to S3) until the performance of the original model approaches or surpasses the performance of popular models.

[0267] It should be noted that the information sources for "new positive voice information and new negative voice information" in step S4 must be different from the information sources for "positive voice information and negative voice information" in step S1.

[0268] Example 2

[0269] Please see Figure 2 A voice emotion recognition model training system includes: a voice acquisition module, a model training module, a comparison and analysis module, a voice update module, a database, and a server; wherein the voice acquisition module, the model training module, the comparison and analysis module, and the voice update module are respectively connected to the database and the server.

[0270] Speech acquisition module: used to acquire positive and negative speech information, and perform pre-emphasis, windowing and Fourier transform on each speech information, followed by Mel transformation and discrete cosine transform on the second stage to obtain the MFCC coefficients of each speech information.

[0271] Model training module: used to perform homomorphic and cepstral processing on each speech information to obtain the LPCC coefficients of each speech information; to obtain the model provided by the user as the original model; to convert the speech information into text information, and to divide the positive speech information and negative speech information into sample set α and sample set β according to the format of text information-MFCC coefficients-LPCC coefficients;

[0272] The original model is trained under supervision by using sample sets α and β as independent inputs; the original model is trained under unsupervised supervision by using sample sets α and β as mixed inputs; the training continues until the outputs of the supervised and unsupervised training of the original model are the same (model training is complete), and the undetermined model is obtained.

[0273] Positive and negative speech information are input into the undetermined model to obtain the undetermined output (i.e., the output of the undetermined model).

[0274] Comparative Analysis Module: Used to (directly) take positive and negative speech information as input to the popular model and obtain the standard output (i.e. the output of the popular model);

[0275] Compare the performance of the undetermined model and the popular model based on the undetermined output and the standard output.

[0276] If the performance of the undetermined model is weaker than that of the popular model, the outputs of the convolutional layer, pooling layer and fully connected layer of the undetermined model are obtained in sequence and input into the corresponding convolutional layer, pooling layer and fully connected layer of the popular model to analyze the weaknesses of the undetermined model and obtain an improvement report.

[0277] If the performance of the undetermined model is better than that of the popular model, then no action is taken;

[0278] Voice update module: used to summarize improvement reports and provide feedback; acquire new positive voice information and new negative voice information, and re-execute the training and analysis process of the original model (i.e., steps S1 to S3) until the performance of the original model approaches or surpasses the performance of popular models.

[0279] The above formulas are all dimensionless calculations. The formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation. For example, there are weighting coefficients and proportional coefficients. The values ​​set are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. The values ​​of the weighting coefficients and proportional coefficients are only required to not affect the proportional relationship between the parameters and the quantified values.

[0280] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, 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 covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for training a speech emotion recognition model, characterized in that, The training method comprises: Step S1: obtaining positive voice information and negative voice information; backing up the positive voice information and the negative voice information, and performing one-time processing of pre-emphasis, windowing and Fourier transform on each piece of voice information, and then performing secondary processing of Mel transformation and discrete cosine transformation to obtain MFCC coefficients of each piece of voice information; Step S2: performing homomorphism and cepstrum processing on each piece of voice information to obtain LPCC coefficients of each piece of voice information; obtaining an original model; converting the voice information into text information, and collecting the positive voice information as a sample set α in the format of positive voice text-positive voice information MFCC coefficients-positive voice information LPCC coefficients; collecting the negative voice information as a sample set β in the format of negative voice text-negative voice information MFCC coefficients-negative voice information LPCC coefficients; performing supervised training on the original model by taking the sample set α and the sample set β as independent inputs; performing unsupervised training on the original model by taking the sample set α and the sample set β as mixed inputs; until the output results of the supervised training and the unsupervised training of the original model are the same, a to-be-determined model is obtained; inputting the positive voice information and the negative voice information into the to-be-determined model to obtain a to-be-determined output; Step S3: taking the positive voice information and the negative voice information as inputs of a language emotion recognition model to obtain a standard output; comparing the performance of the to-be-determined model and the language emotion recognition model according to the to-be-determined output and the standard output; if the performance of the to-be-determined model is weaker than that of the language emotion recognition model, then sequentially inputting the outputs of the convolution layer, the pooling layer and the full connection layer of the to-be-determined model into the corresponding convolution layer, the pooling layer and the full connection layer of the language emotion recognition model to analyze the weak points of the to-be-determined model and obtain a promotion report; if the performance of the to-be-determined model is stronger than that of the language emotion recognition model, then not processing; Step S4: collecting the promotion report and feeding back; obtaining new positive voice information and new negative voice information, and executing the training and analysis process of the original model again until the performance of the original model approaches or is stronger than that of the language emotion recognition model. 2.The voice emotion recognition model training method of claim 1, wherein, The specific steps of the step S1 are as follows: Step S11: obtaining the positive voice information and the negative voice information, and counting the total number of voice information, denoted as vn; Step S12: count the time length of each voice information, denoted as vd1, vd2 ~ vd vn ; The maximum value in vd1 ~ vd vn is recorded as vd max , the minimum value is recorded as vd min , and the mode is recorded as vd mode ; Step S13: defining the relation a1: lim (vd i )→ vd max ; Definition relation a2: lim (vd i )→ vd min ; i in the relational expressions a1 and a2 is an integer, and i has a value in a range of 1 to vn; vd i denotes the duration of the i-th voice information; vd1 ~ vd vn Substitute the relationship a1 and a2, statistics meet the relationship a1, recorded as vn1; Statistics meet the relationship a2, recorded as vn2; calculating the proportion coefficient of the maximum time length, denoted as va1, va1 = vn1 / vn; calculating the proportion coefficient of the minimum time length, denoted as va2, va2 = vn2 / vn; Step S14: calculating the frame length of the voice information; a weighted duration vd of the speech information is calculated we ; vd we The calculation formula of vd is as follows: vd we = (va1 x vd max + va2 x vd min + vd mode ) / 3; calculating the rated sampling number of the voice information, denoted as sq; the calculation formula of sq is as follows: sq = [log 60 (vd we )] x 1024; calculating the frame length of a single piece of voice information, denoted as fd; the calculation formula of fd is as follows: fd = vd we / sq; the frame shift length of a single piece of voice information, denoted as fsd, fsd = fd / 2; Step S15: counting the number of positive voice information, denoted as va; counting the number of negative voice information, denoted as vb; va, vb and vn satisfy: va+vb = vn; processing the positive voice information by backing up the positive voice information and the negative voice information; The first positive voice information is denoted as voice information V, and the voice information V is pre-emphasized, windowed, and enhanced by Fourier transform, and then is processed by a Mel filter and a discrete cosine transform to obtain MFCC coefficients of the first voice information; Step S16: The same steps as those for processing the first voice information are repeated to process the second to the va-th positive voice information to obtain MFCC coefficients of the second to the va-th positive voice information. Step S17: The same steps as those for processing the positive voice information are repeated to process the negative voice information to obtain MFCC coefficients of the negative voice information, and the process goes to step S2. 3.The voice emotion recognition model training method of claim 2, wherein, The specific steps of step S15 are as follows: Step S151: A high-pass filter is used to remove low-frequency noise in the voice information to obtain voice information V1; the voice information V1 is frame processed with a frame length fd and a frame shift length fsd to obtain voice information V2; The number of voice information V2 is denoted as F, F = vd1 / fd; F is a positive number and is rounded up; Step S152: The voice information V2 is windowed by a Hamming window to obtain voice information V3; The function expression of the Hamming window is as follows: w(n) = 0.54 - 0.46cos[(2πn) / (F-1)]; where n represents the index of the (n+1)th voice information V2, and n ranges from 0 to (F-1); Step S153: Fourier transform is used to convert each time-stamped voice information V3 into frequency domain information corresponding to the time stamp to obtain information V4; the function expression of the Fourier transform is as follows: where k represents the index of the information V4, and n represents the index of the voice information V3, and k and n both range from 0 to (F-1); X(k) represents the kth time-stamped information V4, and x(n) represents the nth time-stamped voice information V3; e represents a natural constant, and j represents an imaginary unit. 4.The voice emotion recognition model training method of claim 3, wherein, The subsequent steps of step S153 are as follows: Step S154: Obtain the frequency of each information V4, denoted as f1, f2~f F ; The information V4 is received by a Mel scale triangular filter to obtain information V5; The number of triangular filters is F; The frequency scanning range of the triangular filter is set to 0 Hz to (2 / F) Hz; The frequency of each time-stamped information V4 is converted into a Mel frequency, and the conversion formula is as follows: F mel (f i )=2595×lg(1+f i / 700); where i represents the number of information V4, f i F represents the frequency of the i-th information V4; mel (f i f represents units in Mel. i The perceived frequency; Summary F mel (f1) ~ F mel (f F ) as information V5; Step S155: The perceptual frequency of the information V4 is subjected to a discrete cosine transform to obtain MFCC coefficients of the first voice information; The formula of the discrete cosine transform is as follows: where MFCC(i) represents the MFCC coefficient corresponding to the ith information V5; MFCC(1) to MFCC(F) are summarized as MFCC coefficients of the first positive voice information. 5.The voice emotion recognition model training method of claim 2, wherein, The specific steps of step S2 are as follows: Step S21: The positive voice is subjected to homomorphism and cepstrum processing to obtain LPCC coefficients of the positive voice information; Step S22: The same steps as those for processing the positive voice are repeated to process the negative voice information to obtain LPCC coefficients of the negative voice information; Step S23: A model provided by a user is obtained as an original model; The positive voice information and the negative voice information are converted into corresponding positive voice text and negative voice text; The positive speech information is summarized as a sample set α in the format of positive speech text-MFCC coefficients of positive speech information-LPCC coefficients of positive speech information; The negative speech information is summarized as a sample set β in the format of negative speech text-MFCC coefficients of negative speech information-LPCC coefficients of negative speech information; Step S24: defining a training process for supervised training of the original model: Process a: extract all positive speech information corresponding to the MFCC coefficient to construct MFCC sequence I, denoted as Cmfl, Cmfl = {MFCC1, MFCC2 ~ MFCC va}. Where MFCC1 represents the MFCC coefficient of the first positive speech information; MFCC2 represents the MFCC coefficient of the second positive speech information; and so on, MFCC... va This represents the MFCC coefficient of the vath active speech information; Extracting LPCC coefficients corresponding to all positive speech information to construct LPCC sequence I, denoted as Clp I, Clp I = {LPCC1, LPCC2 ~ LPCC va}; wherein LPCC1 represents the LPCC coefficients of the 1st positive speech information; LPCC2 represents the LPCC coefficients of the 2nd positive speech information; and so on, LPCC va represents the LPCC coefficients of the va-th positive speech information. Process b: extract MFCC coefficients corresponding to all negative speech information to construct MFCC sequence II, denoted as Cmf II, Cmf II = {MFCC1`, MFCC2` ~ MFCC vb `n`}; wherein MFCC1` represents the MFCC coefficients of the 1st negative voice information; MFCC2` represents the MFCC coefficients of the 2nd negative voice information; and so on, MFCCvb` represents the MFCC coefficients of the vbth negative voice information. vb ` represents the MFCC coefficients of the 1st negative voice information; MFCC2` represents the MFCC coefficients of the 2nd negative voice information; and so on, MFCCvb` represents the MFCC coefficients of the vbth negative voice information. extracting LPCC coefficients corresponding to all positive speech information to construct LPCC sequence II, denoted as Clp II, Clp II = {LPCC1`, LPCC2` ~ LPCC vb `}; wherein LPCC1` represents the LPCC coefficients of the 1st negative voice information; LPCC2` represents the LPCC coefficients of the 2nd negative voice information; and so on, LPCCvb` represents the LPCC coefficients of the vbth negative voice information. vb ` represents the LPCC coefficients of the 1st negative voice information; LPCC2` represents the LPCC coefficients of the 2nd negative voice information; and so on, LPCCvb` represents the LPCC coefficients of the vbth negative voice information. Process c: CmfI is fused with ClpI to obtain the positive voiceprint feature sequence, denoted as CI, CI = {(MFCC1, LPCC1), (MFCC2, LPCC2) ~ (MFCC va , LPCC va )}; Cmf II is fused with Clp II to obtain an active voiceprint feature sequence, denoted as C II, C II = {(MFCC1`, LPCC1`), (MFCC2`, LPCC2`) ~ (MFCC vb `, LPCC vb `)}; Process d: taking positive speech text-CⅠ as a feature set of sample set α, denoted as feature set α1; taking negative speech text-CⅡ as a feature set of sample set β, denoted as feature set β1; Process e: setting the number of states in the original model to 4 and the number of Gaussian elements to 3; The feature set α1 and the feature set β1 are respectively brought into the original model, and iteration is performed until the speech information corresponding to the feature set α1 and the feature set β1 is output by the original model; Flow f: Set the determination condition of model convergence: the difference of output probability of two adjacent times is less than 1 x 10 -4 ; The cross-validation algorithm is set as the test algorithm.

6. The method of claim 5, wherein the voice emotion recognition model is trained using a convolutional neural network (CNN) and a recurrent neural network (RNN). The subsequent steps of the step S24 are as follows: Step S25: defining a training process for unsupervised training of the original model: Process 1: repeating processes a-c to obtain positive voiceprint feature sequence CⅠ and positive voiceprint feature sequence CⅡ; Process 2: taking CⅠ and CⅡ as training set 1, taking positive speech text and negative speech text as training set 2, and using K-means clustering algorithm to iterate the original model until the elements in the training set 1 and the elements in the training set 2 are output at the same time and the output elements correspond; Flow 3: Set the determination condition of model convergence: the difference of the output probability of the two adjacent times is less than 1 x 10 -4 ; The cross-validation algorithm is set as the test algorithm; Step S26: performing supervised training and unsupervised training on the original model; until the output results of the supervised training and the unsupervised training of the original model are the same, obtaining a to-be-determined model; Step S27: inputting the positive speech information and the negative speech information into the to-be-determined model to obtain a to-be-determined output, recording the response time of the to-be-determined output as a to-be-determined time, and entering step S3. 7.The voice emotion recognition model training method of claim 5, wherein, The specific steps of the step S21 are as follows: Step S211: homomorphic and cepstrum processing is performed on the first positive speech information; the first positive speech information is framed, windowed and Fourier transformed with a framing time length fd and a frame shift time length fsd to obtain discrete time information of the first positive speech information, denoted as information E; the number of information E is F; Obtain the frequency corresponding to each information E, denoted as x1, x2 ~ x F ; Step S212: Z-transform, logarithmic conversion and inverse Z-transform are performed on the first to Fth information E; The function expression of Z-transform is as follows: where i represents the number of information E, x i represents the frequency of the i-th information E; X(z) represents the output result of Z-transform on the 1st to i-th information E; z i represents a complex variable of the i-th information E, z i The calculation formula of z z i = (vc x x i ) x e(j x ω) -1 ; where vc represents a sound speed, e represents a natural constant; j represents an imaginary unit j 2 = -1; ω represents a phase of the i-th information E, and a calculation formula of ω is as follows: ω = arctan[(vc x x i ) / fd]; where arctan represents the inverse tangent function; The function expression of logarithmic conversion is as follows: wherein, lnX(z) represents an output result of logarithmic conversion on X(z); The inverse Z-transform of lnX(z) is processed using the iztrans function to convert the information E from frequency domain information to time domain information, denoted as ts1, ts2,..., ts F ; Step S213: Perform cepstrum processing on ts1~ts F to obtain the LPC coefficients of the first to Fth information E, denoted as ce1~ce F ; The function expression of cepstrum processing is as follows: where i and k both represent the number of information E, the value range of i and k is: 1~F; x i represents the frequency of the i-th information E, ts i represents the time domain information corresponding to the i-th information E, ce i represents the LPC coefficient of the i-th information E; The ce1~ce F The LPCC coefficients of the first positive voice information are obtained by converting the time domain information into the frequency domain information. Step S214: repeating the same steps of homomorphic and cepstrum processing on the first positive speech information to process the second to va-th positive speech information to obtain the LPCC coefficients of the second to va-th positive speech information. 8.The method of training a speech emotion recognition model according to claim 6, wherein, The specific steps of the step S3 are as follows: Step S31: taking the positive speech information and the negative speech information as the input of the language emotion recognition model to obtain a standard output, and recording the response time of the language emotion recognition model as a standard time; Step S32: using the difflib module and the fuzzywuzzy library, calculating the text matching degree of the pending output relative to the standard output, denoted as tmd; the pending time is denoted as ta, and the standard time is denoted as tb; Step S33: defining the relationship formula C: [lim(tmd)→1]∩(ta≤tb); Determine whether the relationship formula C is established; If it is established, it means that the performance of the pending model is stronger than that of the language emotion recognition model, and it is not processed; If it is not established, the performance of the pending model is weaker than that of the language emotion recognition model, and the outputs of the convolution layer, the pooling layer and the full connection layer of the pending model are obtained in turn, and step S34 is entered; Step S34: inputting the outputs of the convolution layer, the pooling layer and the full connection layer of the pending model into the corresponding convolution layer, the pooling layer and the full connection layer of the language emotion recognition model, and determining whether the output of the language emotion recognition model is the same as the standard output; Step S341: substituting the output of the convolution layer of the pending model into the convolution layer of the language emotion recognition model, executing the hot model to obtain the output a1; and determining whether the output a1 is the same as the standard output; If the output a1 is the same as the standard output, it means that the convolution layer of the original model is good; If the output a1 is different from the standard output, it means that the convolution layer of the original model is abnormal; Step S342: substituting the output of the pooling layer of the pending model into the pooling layer of the language emotion recognition model, executing the language emotion recognition model to obtain the output a2; and determining whether the output a2 is the same as the standard output; If the output a2 is the same as the standard output, it means that the pooling layer of the original model is good; If the output a2 is different from the standard output, it means that the pooling layer of the original model is abnormal; Step S343: substituting the output of the full connection layer of the pending model into the full connection layer of the language emotion recognition model, executing the language emotion recognition model to obtain the output a3; and determining whether the output a3 is the same as the standard output; If the output a3 is the same as the standard output, it means that the full connection layer of the original model is good; If the output a3 is different from the standard output, it means that the full connection layer of the original model is abnormal; Step S35: summarizing the analysis results of step S34 as the improvement report of the original model. 9.A system for training a speech emotion recognition model, adapted to the method of any one of claims 1-8, wherein, The training system comprises: A voice acquisition module: used to take positive voice information and negative voice information, and perform a processing of pre-emphasis, windowing and Fourier transform on each voice information, and then perform a second processing of Mel transformation and discrete cosine transformation, to obtain the MFCC coefficient of each voice information; A model training module: used to perform homomorphism and cepstrum processing on each voice information to obtain the LPCC coefficient of each voice information; obtain an original model; convert the voice information into text information, and divide the positive voice information and the negative voice information into sample set α and sample set β in the format of text information-MFCC coefficient-LPCC coefficient; Take sample set α and sample set β as independent inputs to supervise the training of the original model; take sample set α and sample set β as mixed inputs to unsupervised training of the original model; until the output results of the supervised training and the unsupervised training of the original model are the same, to obtain a pending model; The positive voice information and the negative voice information are input into the undetermined model to obtain an undetermined output; The comparative analysis module is configured to input the positive voice information and the negative voice information into the language emotion recognition model to obtain a standard output; The performance of the undetermined model and the language emotion recognition model is compared according to the undetermined output and the standard output; If the performance of the undetermined model is weaker than the performance of the language emotion recognition model, the outputs of the convolution layer, the pooling layer and the full connection layer of the undetermined model are sequentially obtained and input into the corresponding convolution layer, the pooling layer and the full connection layer of the language emotion recognition model, the weak points of the undetermined model are analyzed, and a promotion report is obtained; If the performance of the undetermined model is stronger than the performance of the language emotion recognition model, no processing is performed; The voice updating module is configured to summarize the promotion report and feedback, obtain new positive voice information and new negative voice information, and execute the training and analysis process of the original model again until the performance of the original model approaches or is stronger than the performance of the language emotion recognition model.

Citation Information

Patent Citations

  • Speech emotion recognition method

    CN106847309A

  • Emotion recognition model training method and device, computer equipment and storage medium

    CN111933187A