forked from stylerw/styler_praat_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconvert_to_aiff.praat
31 lines (28 loc) · 2.36 KB
/
convert_to_aiff.praat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This Praat script will change the sample rate of all sound files in a given directory
# and save AIFF files with the new rate to another directory.
# (See the Praat manual for details on resampling.)
#
# This script is distributed under the GNU General Public License.
# Copyright 29.10.2003 Mietta Lennes
# Redistributed by Will Styler, because it's useful
form Change sample rate in sound files´
sentence Sound_file_extension .wav
comment Directory path of input files:
text input_directory /Users/will/Documents/research/hyperarticulation/gm stimuli for psyscope/nodeltalo/
comment Directory path of resampled files (old files will be overwritten!):
text output_directory /Users/will/Documents/research/hyperarticulation/gm stimuli for psyscope/nodeltalo/
endform
Create Strings as file list... list 'input_directory$'*'sound_file_extension$'
numberOfFiles = Get number of strings
for ifile to numberOfFiles
select Strings list
sound$ = Get string... ifile
Read from file... 'input_directory$''sound$'
objectname$ = selected$ ("Sound", 1)
Write to AIFF file... 'output_directory$''objectname$'.aif
Remove
# select Sound 'objectname$'
# Remove
endfor
select Strings list
Remove