Mercurial > hg > emotion-detection-top-level
comparison Code/Descriptors/PRAAT/shimmer-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 shimmer 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 1 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 5 | |
18 | |
19 if ( method = 1 ) | |
20 theMethod$ = "apq3" | |
21 elsif ( method = 2 ) | |
22 theMethod$ = "apq5" | |
23 elsif ( method = 3 ) | |
24 theMethod$ = "apq11" | |
25 elsif ( method = 4 ) | |
26 theMethod$ = "dda" | |
27 elsif ( method = 5 ) | |
28 theMethod$ = "local" | |
29 endif | |
30 | |
31 dirPath$ = "C:\Users\Dawn\Dropbox\BUPTResearch2011\Data\Opera\PaperDatabase\" + folderName$ | |
32 Create Strings as file list... list 'dirPath$'\*.wav | |
33 fileNum = Get number of strings | |
34 for ifile to fileNum | |
35 select Strings list | |
36 fileName$ = Get string... ifile | |
37 newFileName$ = fileName$ | |
38 Read from file... 'dirPath$''fileName$' | |
39 newfilePath$ = dirPath$ | |
40 | |
41 newFileName$ = newFileName$-".wav" | |
42 To PointProcess (extrema)... 1 yes no Sinc70 | |
43 plus Sound 'newFileName$' | |
44 | |
45 | |
46 if ( method = 1 ) | |
47 c$ = Get shimmer (local)... 0.0 0 0.0001 0.02 1.3 1.6 | |
48 elsif ( method = 2 ) | |
49 c$ = Get shimmer (apq5)... 0.0 0 0.0001 0.02 1.3 1.6 | |
50 elsif ( method = 3 ) | |
51 c$ = Get shimmer (apq11)... 0.0 0 0.0001 0.02 1.3 1.6 | |
52 elsif ( method = 4 ) | |
53 c$ = Get shimmer (dda)... 0.0 0 0.0001 0.02 1.3 1.6 | |
54 elsif ( method = 5 ) | |
55 c$ = Get shimmer (apq3)... 0.0 0 0.0001 0.02 1.3 1.6 | |
56 endif | |
57 | |
58 newfolder$ = newFileName$ + "_metrics" | |
59 metricFilename$ = newFileName$ + "_FullShimmer_" + theMethod$ | |
60 #c$ > 'dirPath$''newfolder$'\'metricFilename$'.txt | |
61 Write to text file... 'dirPath$''newfolder$'\'metricFilename$'.txt | |
62 | |
63 select PointProcess 'newFileName$' | |
64 Remove | |
65 select Sound 'newFileName$' | |
66 Remove | |
67 endfor | |
68 select Strings list | |
69 Remove | |
70 endfor | |
71 endfor |