how to read emotion label of MSP-IMPROV dataset samples?
I asked this question from Prof. Busso as the leader of the MSP-Improv dataset team. He answered:
&quot;
The intended emotion is included in the file name. The emotion annotated by the workers is provided in the file Evalution.txt. You should not use the intended emotion as the actual emotion.
Example:
MSP-IMPROV-S01A-M01-P-FM01
intended emotion was anger, but if you see the evaluation you will see the following information:
UTD-IMPROV-S01A-M01-P-FM01.avi; N; A:3.666667; V:3.166667; D:2.833333 ; N:4.166667;
51o11nal985p2oq49qmnnqivm2-p3b; Neutral; Neutral; A:3.000000; V:3.000000; D:4.000000; N:4.000000;
6lrk33e18tetg934je64ale7r6-p3b; Neutral; Neutral; A:4.000000; V:3.000000; D:3.000000; N:4.000000;
cv970rs8rn8v23p3f3tec5bgb4-p3b; Happy; Happy,Neutral; A:5.000000; V:4.000000; D:3.000000; N:5.000000;
n76ifqflrdaao10o0bg8js05o3-p3b; Neutral; Neutral; A:3.000000; V:3.000000; D:2.000000; N:4.000000;
puumgduqdt8hfiffuvts8m3241-p3b; Neutral; Neutral; A:4.000000; V:3.000000; D:2.000000; N:4.000000;
qlvg8teulu3c7mcgvds07eqte1-p3b; Neutral; Neutral; A:3.000000; V:3.000000; D:3.000000; N:4.000000;
This file was annotated as neutral.
&quot;
so I write a code for this purpose that reads the file name and finds it in the Evaluation file and read real annotated emotion.
this is the main function (please put MSP database  in &quot;DBs&quot; folder):
 function [DB, samplesN, fs]= mspDBread(sesNum)
%%
emoEvl  = 'DBs/MSPEvalution.txt';


rootdir     = 'DBs/MSP-IMPROV';
sesList    = dir(rootdir);
sesList    = sesList(3:end);
samplesN =1;
for iSes= sesNum
session = sesList(iSes).name;
sentenceRoot = [rootdir,'/',session];
sentences = dir(sentenceRoot);
sentences = sentences(3:end);

for iSentence = 1:numel(sentences)
    scenarioRoot=[sentenceRoot,'/',sentences(iSentence).name];
    SentName = sentences(iSentence).name;
    scenario = dir(scenarioRoot);
    scenario = scenario(3:end);
    for iScen = 1:numel(scenario)
        fileRoot = [scenarioRoot,'/',scenario(iScen).name];
        fileList = dir(fileRoot);
        fileList = fileList(3:end);
        for iFile = 1:numel(fileList)
            
            emoList={};
            i=1;
            textFileID = fopen(emoEvl);
            tline = fgetl(textFileID);
            
            while ischar(tline)
                
                tline = fgetl(textFileID);
                if numel(tline)~=0
                    if strcmp(tline(1),'U')
                        words = strsplit(tline);
                        destLineHeader = words(1);
                        destLineHeader = destLineHeader{1,1};
                        destLineHeader = destLineHeader(5:end-5);
                        waveFileName = fileList(iFile).name;
                        if strcmp(destLineHeader,waveFileName(5:end-4))
                            
                            emotion = words(2);
                            emotion = emotion{1,1};
                            emotion = emotion(1,1);
                            
                            compRoot= [fileRoot,'/',waveFileName];
                            
                            
                            [x, fs] = audioread(compRoot);
                            
                            
                            DB{samplesN,1} = samplesN;                          % sample Number
                            DB{samplesN,2} = str2double(session(end));          % session number
                            DB{samplesN,3} = str2double(waveFileName(13:14));   % scentence number
                            DB{samplesN,4} = scenarioMap(waveFileName(21));     % scenario type
                            DB{samplesN,5} = labelMap(emotion);                 % emoton label
                            DB{samplesN,6} = genderMAP(waveFileName(17));       % speaker gender
                            DB{samplesN,7} = str2double( waveFileName(18:19));  % speaker ID
                            DB{samplesN,8} = genderMAP( waveFileName(23));      % listener gender   1:male 0:female
                            DB{samplesN,9} = genderMAP( waveFileName(24));      % seaker gender     1:male 0:female
                            DB{samplesN,10} = str2double(waveFileName(25:26));  % turn number
                            DB{samplesN,11} = waveFileName;                     % complete name  of voice
                            DB{samplesN,12} = x;                                % data
                            
                            disp ([num2str(samplesN), '   session : ',session(end), '     label:',waveFileName(15),'  detect: ',emotion,'   EmoIndex: ',num2str(labelMap(emotion)),'    ',  waveFileName])
                            samplesN =samplesN+1;
                            
                        end
                    end
                end
            end
            fclose('all') ;
        end
    end
  end
end

other functions that are used in the above function is listed below:
1- scenario mapping function:
function [code]=scenarioMap(character)

if character=='T'
    code = 0;
elseif character=='S'
    code = 1;
elseif character=='P'
    code = 2;
elseif character=='R'
    code = 3;
else
    code = 4;
end

2- label mapping function:
function [code]= labelMap(character)

if character=='A'
    code = 0;
elseif character=='H'
    code = 1;
elseif character=='S'
    code = 2;
elseif character=='N'
    code = 3;
elseif character=='O'
    code = 4;
    disp('--------zzzzzzz-----')
elseif character=='W'
    code = 4;
    disp('--------zzzzzzz-----')
else
    code = 4;
end

3-Gender mapping function:
function [gender ]= genderMAP(str)

if strcmp(str,'F')
    gender = 0;
elseif strcmp(str,'M')
    gender = 1;
end