Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kschuler committed Dec 2, 2024
1 parent a6bad18 commit 0eaa19b
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 71 deletions.
132 changes: 66 additions & 66 deletions params.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,73 +198,73 @@ var PARAMS = {
},
test: {
list1: [
{ sound1: "daropi", sound2: "pabiku", category: "part-word" },
{ sound1: "budopa", sound2: "pigola", category: "word" },
{ sound1: "daropi", sound2: "tibudo", category: "part-word" },
{ sound1: "pigola", sound2: "tudaro", category: "word" },
{ sound1: "daropi", sound2: "tibudo", category: "part-word" },
{ sound1: "golatu", sound2: "tibudo", category: "part-word" },
{ sound1: "pigola", sound2: "bikuti", category: "word" },
{ sound1: "tudaro", sound2: "budopa", category: "word" },
{ sound1: "tibudo", sound2: "golatu", category: "part-word" },
{ sound1: "bikuti", sound2: "budopa", category: "word" },
{ sound1: "pabiku", sound2: "golatu", category: "part-word" },
{ sound1: "tudaro", sound2: "pigola", category: "word" },
{ sound1: "bikuti", sound2: "tudaro", category: "word" },
{ sound1: "golatu", sound2: "daropi", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", category: "word" },
{ sound1: "pabiku", sound2: "daropi", category: "part-word" },
{ sound1: "budopa", sound2: "pigola", category: "word" },
{ sound1: "golatu", sound2: "daropi", category: "part-word" },
{ sound1: "tibudo", sound2: "pabiku", category: "part-word" },
{ sound1: "bikuti", sound2: "tudaro", category: "word" },
{ sound1: "pigola", sound2: "bikuti", category: "word" },
{ sound1: "daropi", sound2: "tibudo", category: "part-word" },
{ sound1: "pabiku", sound2: "golatu", category: "part-word" },
{ sound1: "bikuti", sound2: "budopa", category: "word" },
{ sound1: "golatu", sound2: "pabiku", category: "part-word" },
{ sound1: "tibudo", sound2: "golatu", category: "part-word" },
{ sound1: "pigola", sound2: "tudaro", category: "word" },
{ sound1: "budopa", sound2: "bikuti", category: "word" },
{ sound1: "pabiku", sound2: "daropi", category: "part-word" },
{ sound1: "tudaro", sound2: "budopa", category: "word" },
{ sound1: "tibudo", sound2: "pabiku", category: "part-word" },
{ sound1: "tudaro", sound2: "pigola", category: "word" }
],
{ sound1: "pigola", sound2: "tudaro", sound3: "budopa", category: "word" },
{ sound1: "golatu", sound2: "tibudo", sound3: "daropi", category: "part-word" },
{ sound1: "tudaro", sound2: "bikuti", sound3: "pigola", category: "word" },
{ sound1: "daropi", sound2: "pabiku", sound3: "golatu", category: "part-word" },
{ sound1: "bikuti", sound2: "budopa", sound3: "tudaro", category: "word" },
{ sound1: "tibudo", sound2: "daropi", sound3: "pabiku", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", sound3: "pigola", category: "word" },
{ sound1: "tibudo", sound2: "golatu", sound3: "pabiku", category: "part-word" },
{ sound1: "tudaro", sound2: "pigola", sound3: "bikuti", category: "word" },
{ sound1: "golatu", sound2: "pabiku", sound3: "daropi", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", sound3: "pigola", category: "word" },
{ sound1: "pabiku", sound2: "golatu", sound3: "tibudo", category: "part-word" },
{ sound1: "pigola", sound2: "budopa", sound3: "tudaro", category: "word" },
{ sound1: "daropi", sound2: "tibudo", sound3: "golatu", category: "part-word" },
{ sound1: "bikuti", sound2: "pigola", sound3: "budopa", category: "word" },
{ sound1: "tibudo", sound2: "daropi", sound3: "pabiku", category: "part-word" },
{ sound1: "pigola", sound2: "budopa", sound3: "tudaro", category: "word" },
{ sound1: "golatu", sound2: "tibudo", sound3: "daropi", category: "part-word" },
{ sound1: "tudaro", sound2: "budopa", sound3: "bikuti", category: "word" },
{ sound1: "pabiku", sound2: "golatu", sound3: "tibudo", category: "part-word" },
{ sound1: "bikuti", sound2: "tudaro", sound3: "pigola", category: "word" },
{ sound1: "daropi", sound2: "pabiku", sound3: "golatu", category: "part-word" },
{ sound1: "budopa", sound2: "pigola", sound3: "bikuti", category: "word" },
{ sound1: "tibudo", sound2: "golatu", sound3: "pabiku", category: "part-word" },
{ sound1: "pigola", sound2: "tudaro", sound3: "bikuti", category: "word" },
{ sound1: "golatu", sound2: "pabiku", sound3: "daropi", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", sound3: "tudaro", category: "word" },
{ sound1: "pabiku", sound2: "daropi", sound3: "tibudo", category: "part-word" },
{ sound1: "daropi", sound2: "tibudo", sound3: "golatu", category: "part-word" },
{ sound1: "pabiku", sound2: "daropi", sound3: "tibudo", category: "part-word" },
{ sound1: "bikuti", sound2: "tudaro", sound3: "budopa", category: "word" },
{ sound1: "tudaro", sound2: "pigola", sound3: "budopa", category: "word" }
],
list2: [
{ sound1: "budopa", sound2: "pigola", category: "word" },
{ sound1: "bikuti", sound2: "tudaro", category: "word" },
{ sound1: "golatu", sound2: "daropi", category: "part-word" },
{ sound1: "daropi", sound2: "pabiku", category: "part-word" },
{ sound1: "pigola", sound2: "tudaro", category: "word" },
{ sound1: "pigola", sound2: "bikuti", category: "word" },
{ sound1: "golatu", sound2: "tibudo", category: "part-word" },
{ sound1: "pigola", sound2: "tudaro", category: "word" },
{ sound1: "tibudo", sound2: "pabiku", category: "part-word" },
{ sound1: "tudaro", sound2: "pigola", category: "word" },
{ sound1: "daropi", sound2: "tibudo", category: "part-word" },
{ sound1: "tudaro", sound2: "budopa", category: "word" },
{ sound1: "pabiku", sound2: "golatu", category: "part-word" },
{ sound1: "tudaro", sound2: "budopa", category: "word" },
{ sound1: "golatu", sound2: "pabiku", category: "part-word" },
{ sound1: "pabiku", sound2: "golatu", category: "part-word" },
{ sound1: "bikuti", sound2: "tudaro", category: "word" },
{ sound1: "bikuti", sound2: "budopa", category: "word" },
{ sound1: "tibudo", sound2: "golatu", category: "part-word" },
{ sound1: "golatu", sound2: "daropi", category: "part-word" },
{ sound1: "bikuti", sound2: "budopa", category: "word" },
{ sound1: "tibudo", sound2: "golatu", category: "part-word" },
{ sound1: "daropi", sound2: "tibudo", category: "part-word" },
{ sound1: "pigola", sound2: "bikuti", category: "word" },
{ sound1: "pabiku", sound2: "daropi", category: "part-word" },
{ sound1: "tibudo", sound2: "pabiku", category: "part-word" },
{ sound1: "tudaro", sound2: "pigola", category: "word" },
{ sound1: "pabiku", sound2: "daropi", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", category: "word" },
{ sound1: "daropi", sound2: "tibudo", category: "part-word" },
{ sound1: "budopa", sound2: "pigola", category: "word" },
{ sound1: "budopa", sound2: "bikuti", category: "word" }
]
{ sound1: "budopa", sound2: "pigola", sound3: "bikuti", category: "word" },
{ sound1: "tudaro", sound2: "bikuti", sound3: "pigola", category: "word" },
{ sound1: "golatu", sound2: "pabiku", sound3: "daropi", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", sound3: "pigola", category: "word" },
{ sound1: "daropi", sound2: "pabiku", sound3: "golatu", category: "part-word" },
{ sound1: "tibudo", sound2: "daropi", sound3: "pabiku", category: "part-word" },
{ sound1: "tudaro", sound2: "pigola", sound3: "bikuti", category: "word" },
{ sound1: "pigola", sound2: "tudaro", sound3: "budopa", category: "word" },
{ sound1: "daropi", sound2: "tibudo", sound3: "golatu", category: "part-word" },
{ sound1: "bikuti", sound2: "pigola", sound3: "budopa", category: "word" },
{ sound1: "daropi", sound2: "pabiku", sound3: "golatu", category: "part-word" },
{ sound1: "pigola", sound2: "tudaro", sound3: "bikuti", category: "word" },
{ sound1: "pabiku", sound2: "golatu", sound3: "tibudo", category: "part-word" },
{ sound1: "bikuti", sound2: "budopa", sound3: "tudaro", category: "word" },
{ sound1: "tibudo", sound2: "daropi", sound3: "pabiku", category: "part-word" },
{ sound1: "golatu", sound2: "pabiku", sound3: "daropi", category: "part-word" },
{ sound1: "tudaro", sound2: "pigola", sound3: "budopa", category: "word" },
{ sound1: "pigola", sound2: "budopa", sound3: "tudaro", category: "word" },
{ sound1: "golatu", sound2: "tibudo", sound3: "daropi", category: "part-word" },
{ sound1: "tudaro", sound2: "budopa", sound3: "bikuti", category: "word" },
{ sound1: "pabiku", sound2: "daropi", sound3: "tibudo", category: "part-word" },
{ sound1: "daropi", sound2: "tibudo", sound3: "golatu", category: "part-word" },
{ sound1: "tibudo", sound2: "golatu", sound3: "pabiku", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", sound3: "pigola", category: "word" },
{ sound1: "pabiku", sound2: "daropi", sound3: "tibudo", category: "part-word" },
{ sound1: "bikuti", sound2: "tudaro", sound3: "pigola", category: "word" },
{ sound1: "tibudo", sound2: "golatu", sound3: "pabiku", category: "part-word" },
{ sound1: "pigola", sound2: "budopa", sound3: "tudaro", category: "word" },
{ sound1: "pabiku", sound2: "golatu", sound3: "tibudo", category: "part-word" },
{ sound1: "budopa", sound2: "bikuti", sound3: "tudaro", category: "word" },
{ sound1: "bikuti", sound2: "tudaro", sound3: "budopa", category: "word" },
{ sound1: "golatu", sound2: "tibudo", sound3: "daropi", category: "part-word" }
]
}
}
}
Expand Down
23 changes: 18 additions & 5 deletions task.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
if (typeof reader.result === 'string' && reader.result.startsWith('data:')) {
base64Data = reader.result.split(',')[1]; // Extract the base64 string
const recording = childlanglabClient.uploadRecording(base64Data, trial_index )
console.log(recording)
done(recording)
} else {
console.error('Unexpected FileReader result format:', reader.result);
Expand Down Expand Up @@ -389,7 +390,19 @@
choices: "NO_KEYS",
trial_ends_after_audio: true,
post_trial_gap: 0
},
},
{
type: jsPsychAudioKeyboardResponse,
stimulus: function(){
let sound = `sounds/${jsPsych.timelineVariable('sound3')}-resampled.wav`
return sound
},
prompt: '<img src="images/pingu-option-blue.png" width="600"><br><br><button class="jspsych-btn" disabled>Next</button>',
response_allowed_while_playing: false,
choices: "NO_KEYS",
trial_ends_after_audio: true,
post_trial_gap: 0
},
{
type: jsPsychHtmlVideoResponse,
stimulus: '<img src="images/pingu-listens.png" width="600">',
Expand Down Expand Up @@ -544,11 +557,11 @@ <h3>Exit survey</h3>

var timeline = [
consent,
browser_check,
fullscreen_check,
//browser_check,
//fullscreen_check,
preload,
get_instructions(CONDITION_PARAMS.instructions.exposure),
exposure,
// get_instructions(CONDITION_PARAMS.instructions.exposure),
// exposure,
get_instructions(CONDITION_PARAMS.instructions.test),
init_camera, // this is a conditional function that only runs for SICR
init_microphone,
Expand Down

0 comments on commit 0eaa19b

Please sign in to comment.