【问题标题】:Praat scripting: How to extract max of pitch for every syllable?Praat 脚本:如何提取每个音节的最大音高?
【发布时间】:2018-01-07 15:58:00
【问题描述】:

我想提取每个音节的最大音高。 我有一段代码,但它抛出一个错误:

writeInfoLine: ""

selectObject: "TextGrid example", "Pitch example"

# syllable tier is 1 
number = Get number of intervals: 1
for i from 1 to number
name$ = Get label of interval: 1, i
start_time = Get start time of interval: 1, i
end_time = Get end time of interval: 1, i
max_pitch = Get maximum: start_time, end_time, "Hertz", "Parabolic"
appendInfoLine: name$, "      ", max_pitch
endfor

【问题讨论】:

    标签: praat


    【解决方案1】:

    这是一个脚本,其中包含有关如何运行它的说明。它在 TextGrid 和 Pitch 对象之间来回跳转。

    # open your wav file and textgrid into objects window
    # select wav file
    # run script
    
    clearinfo
    
    objName$ = selected$ ("Sound")
    To Pitch: 0, 75, 600
    
    select TextGrid 'objName$'
    intervals = Get number of intervals: 1
    
    printline 'intervals' intervals in textgrid
    
    for i from 1 to intervals
     # need var$ because it's a string
     lab$ = Get label of interval: 1, i
     start = Get start time of interval: 1, i
     end = Get end time of interval: 1, i
     # now look at the Intensity object
     select Pitch 'objName$'
     max = Get maximum: start, end, "Hertz", "Parabolic"
     printline 'start' 'end' 'lab$' 'max'
     # reset for next iteration
     select TextGrid 'objName$'
    endfor
    

    【讨论】:

      猜你喜欢
      • 2019-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-22
      相关资源
      最近更新 更多