2005-11-24

[Phonetics] .NSP 轉 .WAV 的 Praat Scrpt

一小段 Praat Script
可以將CSL的專屬格式.nsp轉成.wav
預設路徑是C:\temp
########################################
# Name: Convert .NSP to .WAV
# By: Pbice
# Date: 2005/11/23
########################################

directory$ = "C:\temp\"

Create Strings as file list... list 'directory$'/*.nsp
numberOfFiles = Get number of strings

for ifile to numberOfFiles
select Strings list
fileName$ = Get string... ifile
Read from file... 'directory$'/'fileName$'
fileName$ = fileName$ - ".nsp"
Write to WAV file... 'directory$'/'fileName$'.wav
Remove
endfor

select Strings list
Remove

沒有留言: