form dialogue sentence openpath E:\praat\wav4 sentence savepath E:\praat\wav4 positive wordtier 3 positive segmenttier 2 positive pointnum 10 endform if right$(openpath$,1)<>"\" openpath$=openpath$+"\" endif if right$(savepath$,1)<>"\" savepath$=savepath$+"\" endif pointnum=pointnum-1 savepath$=savepath$+"resultOfDuration.csv" Create Strings as file list... fileList 'openpath$'*.TextGrid numberOffiles=Get number of strings filedelete 'savepath$' fileappend 'savepath$' ÎļþÃû,Òô¶Î,Òô¶Îʱ³¤,ËùÔÚµ¥´Ê,ʱ³¤,Òôµ÷,»ùƵ1,'newline$' for ifile from 1 to numberOffiles select Strings fileList fileName$=Get string... 'ifile' simpleName$=fileName$-".TextGrid" pitchTierName$=simpleName$+".PitchTier" Read from file... 'openpath$''pitchTierName$' Read from file... 'openpath$''fileName$' numberOfIntervals=Get number of intervals... 'segmenttier' for iInterval from 1 to numberOfIntervals select TextGrid 'simpleName$' sTime=Get starting point... 'segmenttier' 'iInterval' eTime=Get end point... 'segmenttier' 'iInterval' labOfInterval$=Get label of interval... 'segmenttier' 'iInterval' if labOfInterval$<>"silence" and labOfInterval$<>"" duration=eTime-sTime durationTemp='duration:3' tempTime=sTime+duration/2 intervalOfWord=Get interval at time... 'wordtier' 'tempTime' sTimew=Get starting point... 'wordtier' 'intervalOfWord' eTimew=Get end point... 'wordtier' 'intervalOfWord' durationw=eTimew-sTimew durationTempw='durationw:3' labOfIntervalw$=Get label of interval... 'wordtier' 'intervalOfWord' toneOfWord$=right$(labOfIntervalw$,1) fileappend 'savepath$' 'fileName$','labOfInterval$','durationTemp','labOfIntervalw$','durationTempw','toneOfWord$', stepTime=duration/pointnum for i from 0 to pointnum select PitchTier 'simpleName$' tmTime=sTime+stepTime*i pitchValue=Get value at time... 'tmTime' pitchValuetmp='pitchValue:0' fileappend 'savepath$' 'pitchValuetmp', endfor fileappend 'savepath$' 'newline$' endif endfor select TextGrid 'simpleName$' Remove select PitchTier 'simpleName$' Remove endfor select Strings fileList Remove exit Over!