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