Mercurial > hg > emotion-detection-top-level
annotate Code/Descriptors/PRAAT/jitter-singing @ 4:92ca03a8fa99 tip
Update to ICASSP 2013 benchmark
author | Dawn Black |
---|---|
date | Wed, 13 Feb 2013 11:02:39 +0000 |
parents | |
children |
rev | line source |
---|---|
Dawn@4 | 1 #This file is used to extract all the jitter value of the singing database |
Dawn@4 | 2 #All jitter results would be saved into a txt file for each sample |
Dawn@4 | 3 |
Dawn@4 | 4 |
Dawn@4 | 5 for folder from 2 to 4 |
Dawn@4 | 6 |
Dawn@4 | 7 if ( folder = 1 ) |
Dawn@4 | 8 folderName$ = "WangXinnong\pos\" |
Dawn@4 | 9 elsif ( folder = 2 ) |
Dawn@4 | 10 folderName$ = "WangXinnong\neg\" |
Dawn@4 | 11 elsif ( folder = 3 ) |
Dawn@4 | 12 folderName$ = "ZhangShuo\pos\" |
Dawn@4 | 13 elsif ( folder = 4 ) |
Dawn@4 | 14 folderName$ = "ZhangShuo\neg\" |
Dawn@4 | 15 endif |
Dawn@4 | 16 |
Dawn@4 | 17 for method from 1 to 4 |
Dawn@4 | 18 |
Dawn@4 | 19 if ( method = 1 ) |
Dawn@4 | 20 theMethod$ = "rap" |
Dawn@4 | 21 elsif ( method = 2 ) |
Dawn@4 | 22 theMethod$ = "ddp" |
Dawn@4 | 23 elsif ( method = 3 ) |
Dawn@4 | 24 theMethod$ = "local" |
Dawn@4 | 25 elsif ( method = 4 ) |
Dawn@4 | 26 theMethod$ = "ppq5" |
Dawn@4 | 27 endif |
Dawn@4 | 28 |
Dawn@4 | 29 dirPath$ = "C:\Users\Dawn\Dropbox\BUPTResearch2011\Data\Opera\PaperDatabase\" + folderName$ |
Dawn@4 | 30 Create Strings as file list... list 'dirPath$'\*.wav |
Dawn@4 | 31 fileNum = Get number of strings |
Dawn@4 | 32 for ifile to fileNum |
Dawn@4 | 33 select Strings list |
Dawn@4 | 34 fileName$ = Get string... ifile |
Dawn@4 | 35 newFileName$ = fileName$ |
Dawn@4 | 36 Read from file... 'dirPath$''fileName$' |
Dawn@4 | 37 newfilePath$ = dirPath$ |
Dawn@4 | 38 |
Dawn@4 | 39 newFileName$ = newFileName$-".wav" |
Dawn@4 | 40 To PointProcess (extrema)... 1 yes no Sinc70 |
Dawn@4 | 41 |
Dawn@4 | 42 |
Dawn@4 | 43 if ( method = 1 ) |
Dawn@4 | 44 c$ = Get jitter (rap)... 0.0 0 0.0001 0.02 1.3 |
Dawn@4 | 45 elsif ( method = 2 ) |
Dawn@4 | 46 c$ = Get jitter (ddp)... 0.0 0 0.0001 0.02 1.3 |
Dawn@4 | 47 elsif ( method = 3 ) |
Dawn@4 | 48 c$ = Get jitter (local)... 0.0 0 0.0001 0.02 1.3 |
Dawn@4 | 49 elsif ( method = 4 ) |
Dawn@4 | 50 c$ = Get jitter (ppq5)... 0.0 0 0.0001 0.02 1.3 |
Dawn@4 | 51 endif |
Dawn@4 | 52 |
Dawn@4 | 53 newfolder$ = newFileName$ + "_metrics" |
Dawn@4 | 54 metricFilename$ = newFileName$ + "_FullJitter_" + theMethod$ |
Dawn@4 | 55 #c$ > 'dirPath$''newfolder$'\'metricFilename$'.txt |
Dawn@4 | 56 Write to text file... 'dirPath$''newfolder$'\'metricFilename$'.txt |
Dawn@4 | 57 |
Dawn@4 | 58 select PointProcess 'newFileName$' |
Dawn@4 | 59 Remove |
Dawn@4 | 60 select Sound 'newFileName$' |
Dawn@4 | 61 Remove |
Dawn@4 | 62 endfor |
Dawn@4 | 63 select Strings list |
Dawn@4 | 64 Remove |
Dawn@4 | 65 endfor |
Dawn@4 | 66 endfor |