0
我有幾個語音文件,我需要剪切聲音文件的某個部分,從0.21毫秒到0.45毫秒。下面的腳本將選擇從0.21毫秒到0.45毫秒的聲音片段並保存。我想從語音文件中剪切片段,然後在沒有它的情況下保存它。我應該在「選擇結束選擇到最近的過零點」並改變「寫入選定的聲音......」後添加另一行,但我不確定具體是什麼。praat - 刪除段
form Files
sentence InputDir ./
endform
createDirectory ("output")
Create Strings as file list... list 'inputDir$'*.wav
numberOfFiles = Get number of strings
for ifile to numberOfFiles
select Strings list
fileName$ = Get string... ifile
Read from file... 'inputDir$''fileName$'
sound_name$ = selected$ ("Sound")
select Sound 'sound_name$'
Edit
editor Sound 'sound_name$'
Select... 0.21 0.45
Move start of selection to nearest zero crossing
Move end of selection to nearest zero crossing
Write selected sound to WAV file... ./output/'fileName$'
endeditor
select all
minus Strings list
Remove
endfor
select all
Remove