我已经在 Praat 编写脚本只有几个星期了,所以请耐心等待。我正在尝试在带注释的语音数据语料库中提取每个口语单词的音高轮廓。我可以毫无问题地提取整个长声音文件的音高轮廓,并且可以将 .wav 文件压缩成单个口语单词的较小 .wav 文件,但是当我尝试循环遍历较小的 .wavs 时,我经常收到此错误:
要分析此声音,“最小音高”不得小于 [某个数字]。
这个数字似乎很随意。有没有一种好方法可以To Pitch:
根据给定 .wav 的最小音高动态更改参数?
#initialize counter
i = 0
#loop through .wav files
for current_file from 1 to file_count
i = i + 1
select Strings list
filename$ = Get string... current_file
Read from file... 'source_directory$'/'filename$'
appendInfoLine: string$(i)+ "/" + string$(file_count) + " " + filename$
To Pitch: 0.1, 75, 600
#create pitch file
pitch_file$ = filename$ - "wav" + "pit"
#write to pitch file
no_of_frames = Get number of frames
for frame from 1 to no_of_frames
time = Get time from frame number: frame
pitch = Get value in frame: frame, "Hertz"
appendFileLine: pitch_file$, "'time','pitch'"
endfor
endfor