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