-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRWR_Perception_StimPrep.praat
63 lines (52 loc) · 2.13 KB
/
RWR_Perception_StimPrep.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
include ../L2T-StartUpForm/L2T-StartupForm.praat
include ../L2T-Audio/L2T-Audio.praat
include ../L2T-utilities/L2T-Utilities.praat
include modules/StimulusTextGrid.praat
include modules/wav_segmentation.praat
#include modules/AddStimulusBoundaryMarkers.praat
include modules/CheckStimulusBoundaryMarkers.praat
# Set the session parameters.
loadStartUpForm = 0
experimental_task$ = "RealWordRep"
testwave$ = "Timepoint2"
activity$ = "Prep RWR_Perception stimuli"
defaultRWRPerceptionExperiment = 2
defaultRWRPerceptionActivity = 1
@session_parameters
stimPrepDirectory$ = session_parameters.rwr_perception_experiment_directory$ + "/StimPrep"
textGridDirectory$ = stimPrepDirectory$ + "/StimulusTextGrids"
finalStimDirectory$ = session_parameters.rwr_perception_experiment_directory$ + "/Stimuli"
checker_initials$ = session_parameters.initials$
if session_parameters.rwr_perception_activity$ == "Define word/CV boundaries for candidate stimuli"
# Define the TextGrid tier names and indices.
@stimulus_textgrid_tiers
@readInCandidateStimuli
# Count the number of rows.
numRows = Get number of rows
numRows = numRows + 1
if session_parameters.rwr_perception_experiment$ == "TP2_SibilantGoodness_VAS_StimPrep"
@addBoundaries
else
@checkBoundaries
endif
elif session_parameters.rwr_perception_activity$ == "Check a boundary-tagged stimulus TextGrid"
runScript: "modules/??"
elif session_parameters.rwr_perception_activity$ == "Extract audio files for candidate stimuli"
@readInCandidateStimuli
@makeMasterStimList
@segmentSoundFile
elif session_parameters.rwr_perception_activity$ == "Listen to all extracted stimulus files"
runScript: "modules/??"
endif
procedure readInCandidateStimuli
# Read Table from tab-separated file: defaultDirectory$ + "/candidateStimuli.txt"
Read Table from tab-separated file: stimPrepDirectory$ + "/candidateStimuli.txt"
Rename: "MainDataFrame"
endproc
procedure makeMasterStimList
stimList$ = stimPrepDirectory$ + "/FINAL_STIMULI_LIST.txt"
if fileReadable(stimList$)
deleteFile: stimList$
endif
fileappend 'stimList$' ID 'tab$' Filename 'tab$' TargetWord 'tab$' TargetConsonant 'tab$' Duration 'newline$'
endproc