diff --git a/index.js b/index.js index 33bafa6..892d429 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,7 @@ import jsPsychHtmlButtonResponse from '@jspsych/plugin-html-button-response'; import jsPsychSurvey from '@jspsych/plugin-survey'; import jsPsychRecordCall from './scripts/record-call.js'; import jsPsychMarkCall from './scripts/mark-call.js'; +import jsPsychTranscribeCall from './scripts/transcribe-call.js'; import '@jspsych/plugin-survey/css/survey.css' import jsPsychInitializeMicrophone from '@jspsych/plugin-initialize-microphone'; import jsPsychBrowserCheck from '@jspsych/plugin-browser-check'; @@ -69,7 +70,7 @@ const publication_consent = { const continue_button = document.getElementsByClassName('jspsych-btn')[0]; continue_button.disabled = true; - let timeLeft = 15; + let timeLeft = 17; if(debug) { timeLeft = 0; @@ -129,6 +130,10 @@ const mark_page = { type: jsPsychMarkCall, }; +const transcribe_page = { + type: jsPsychTranscribeCall, +}; + const data_quality_warning = { type: jsPsychHtmlButtonResponse, stimulus: textStimuli.data_quality_warning, @@ -142,7 +147,7 @@ const exit_page = { }; const recording_loop = { - timeline: [recording_page, mark_page, exit_page], + timeline: [recording_page, mark_page, transcribe_page, exit_page], loop_function: function(data){ const last_trial_data = jsPsych.data.getLastTrialData(); if(jsPsych.pluginAPI.compareKeys(last_trial_data.trials[0].response, 'q')){ @@ -170,8 +175,6 @@ const post_experiment_survey = { let timeline = [] if (debug) { - timeline.push(data_quality_warning); - timeline.push(browser_check); timeline.push(initialize_microphone); timeline.push(recording_loop); diff --git a/scripts/mark-call.js b/scripts/mark-call.js index 25941a7..4be31f4 100644 --- a/scripts/mark-call.js +++ b/scripts/mark-call.js @@ -74,6 +74,33 @@ import html from '../utils/html.js'; } display_element.innerHTML = ` + +