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