我是 Praat 脚本的新手,我正在尝试提取语音报告,但是对于声音文件中的特定开始/结束时间而不是整个文件。从手册中,给出了这个例子:
voiceReport$ = Voice report: 0, 0, 75, 500, 1.3, 1.6, 0.03, 0.45
jitter = extractNumber (voiceReport$, "Jitter (local): ")
shimmer = extractNumber (voiceReport$, "Shimmer (local): ")
writeInfoLine: "Jitter = ", percent$ (jitter, 3), ", shimmer = ", percent$ (shimmer, 3)
这将运行整个文件的语音报告。
从其他一些有用的示例中,我能够将以下脚本放在一起,该脚本创建了一个具有“静音”和“发声”层的 TextGrid。我想在每个发声行上运行语音报告(beginsound 和 endsound 是标记)。
form analysis
sentence inputFile
endform
sound = Read from file: inputFile$
selectObject: sound
soundname$ = selected$("Sound")
soundid = selected("Sound")
To TextGrid (silences)... 60 0.3 0.1 silent sounding
textgridid = selected("TextGrid")
select 'textgridid'
silencetierid = Extract tier... 1
silencetableid = Down to TableOfReal... sounding
nsounding = Get number of rows
npauses = 'nsounding'
speakingtot = 0
for ipause from 1 to npauses
beginsound = Get value... 'ipause' 1
endsound = Get value... 'ipause' 2
speakingdur = 'endsound' - 'beginsound'
speakingtot = 'speakingdur' + 'speakingtot'
printline sounding 'beginsound' 'endsound'
comment How to run Voice Report between beginsound and endsound?
endfor
据我了解,语音报告可以在 TextGrid 选择或 Sound + Pitch + PointProcess 对象的选择上运行。我不确定如何在此处将 Voice Report 命令添加到我的 for 循环中。非常感谢任何帮助/指导。谢谢。