psychopy 2024.1.4__py3-none-any.whl → 2024.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of psychopy might be problematic. Click here for more details.
- psychopy/.DS_Store +0 -0
- psychopy/CHANGELOG.txt +206 -0
- psychopy/GIT_SHA +1 -0
- psychopy/VERSION +1 -0
- psychopy/__init__.py +77 -15
- psychopy/app/Resources/classic/plugin16.png +0 -0
- psychopy/app/Resources/classic/plugin16@2x.png +0 -0
- psychopy/app/Resources/dark/plugin16.png +0 -0
- psychopy/app/Resources/dark/plugin16@2x.png +0 -0
- psychopy/app/Resources/light/plugin16.png +0 -0
- psychopy/app/Resources/light/plugin16@2x.png +0 -0
- psychopy/app/__init__.py +76 -2
- psychopy/app/_psychopyApp.py +126 -101
- psychopy/app/builder/builder.py +14 -10
- psychopy/app/builder/dialogs/__init__.py +8 -8
- psychopy/app/builder/dialogs/dlgsConditions.py +12 -13
- psychopy/app/builder/dialogs/paramCtrls.py +24 -57
- psychopy/app/builder/validators.py +2 -2
- psychopy/app/coder/codeEditorBase.py +8 -8
- psychopy/app/coder/coder.py +4 -4
- psychopy/app/connections/sendusage.py +2 -2
- psychopy/app/connections/updates.py +9 -9
- psychopy/app/dialogs.py +34 -2
- psychopy/app/idle.py +31 -0
- psychopy/app/jobs.py +21 -3
- psychopy/app/linuxconfig/__init__.py +9 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.po +4602 -2540
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.po +56 -54
- psychopy/app/locale/es_ES/LC_MESSAGE/messages.po +53 -43
- psychopy/app/locale/es_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_US/LC_MESSAGE/messages.po +56 -54
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.po +1011 -942
- psychopy/app/locale/pt_PT/LC_MESSAGE/messages.po +9415 -5
- psychopy/app/pavlovia_ui/_base.py +33 -3
- psychopy/app/pavlovia_ui/search.py +0 -1
- psychopy/app/plugin_manager/dialog.py +104 -51
- psychopy/app/plugin_manager/packages.py +5 -0
- psychopy/app/plugin_manager/plugins.py +145 -67
- psychopy/app/preferencesDlg.py +8 -8
- psychopy/app/psychopyApp.py +11 -5
- psychopy/app/ribbon.py +124 -14
- psychopy/app/runner/runner.py +6 -1
- psychopy/app/stdout/stdOutRich.py +27 -11
- psychopy/app/themes/icons.py +52 -2
- psychopy/assets/__init__.py +0 -0
- psychopy/assets/click.png +0 -0
- psychopy/assets/clicknext.png +0 -0
- psychopy/assets/next.png +0 -0
- psychopy/assets/psychopy.ico +0 -0
- psychopy/assets/psychopy.png +0 -0
- psychopy/assets/templates/__init__.py +0 -0
- psychopy/assets/touch.png +0 -0
- psychopy/assets/touchnext.png +0 -0
- psychopy/assets/window.ico +0 -0
- psychopy/changes/2023.1.0.md +9 -0
- psychopy/changes/2024.1.0.md +16 -0
- psychopy/changes/__init__.py +0 -0
- psychopy/clock.py +2 -2
- psychopy/colors.py +2 -1
- psychopy/compatibility.py +53 -1
- psychopy/contrib/.DS_Store +0 -0
- psychopy/contrib/configobj/__init__.py +10 -8
- psychopy/data/__init__.py +3 -2
- psychopy/data/base.py +5 -5
- psychopy/data/experiment.py +130 -4
- psychopy/data/routine.py +56 -0
- psychopy/data/staircase.py +2 -2
- psychopy/data/trial.py +559 -97
- psychopy/data/utils.py +56 -21
- psychopy/demos/.DS_Store +0 -0
- psychopy/demos/builder/.DS_Store +0 -0
- psychopy/demos/builder/Design Templates/.DS_Store +0 -0
- psychopy/demos/builder/Experiments/.DS_Store +0 -0
- psychopy/demos/builder/Feature Demos/.DS_Store +0 -0
- psychopy/demos/builder/Feature Demos/buttonBox/buttonBoxDemo.psyexp +375 -0
- psychopy/demos/builder/Feature Demos/buttonBox/readme.md +5 -0
- psychopy/demos/builder/Feature Demos/pilotMode/pilotMode.psyexp +433 -0
- psychopy/demos/builder/Feature Demos/pilotMode/readme.md +7 -0
- psychopy/demos/builder/Hardware/.DS_Store +0 -0
- psychopy/demos/builder/Helper Tools/.DS_Store +0 -0
- psychopy/demos/coder/.DS_Store +0 -0
- psychopy/demos/coder/hardware/testSoundLatency.py +2 -2
- psychopy/demos/coder/iohub/.DS_Store +0 -0
- psychopy/demos/coder/misc/hdf5_2_csv +33 -0
- psychopy/event.py +30 -29
- psychopy/experiment/.DS_Store +0 -0
- psychopy/experiment/_experiment.py +6 -6
- psychopy/experiment/components/.DS_Store +0 -0
- psychopy/experiment/components/__init__.py +6 -3
- psychopy/experiment/components/_base.py +286 -131
- psychopy/experiment/components/aperture/.DS_Store +0 -0
- psychopy/experiment/components/brush/.DS_Store +0 -0
- psychopy/experiment/components/button/.DS_Store +0 -0
- psychopy/experiment/components/button/__init__.py +5 -1
- psychopy/experiment/components/buttonBox/.DS_Store +0 -0
- psychopy/experiment/components/camera/.DS_Store +0 -0
- psychopy/experiment/components/code/.DS_Store +0 -0
- psychopy/experiment/components/dots/.DS_Store +0 -0
- psychopy/experiment/components/eyetracker_record/.DS_Store +0 -0
- psychopy/experiment/components/eyetracker_record/__init__.py +92 -30
- psychopy/experiment/components/form/.DS_Store +0 -0
- psychopy/experiment/components/form/__init__.py +6 -2
- psychopy/experiment/components/grating/.DS_Store +0 -0
- psychopy/experiment/components/grating/__init__.py +14 -3
- psychopy/experiment/components/image/.DS_Store +0 -0
- psychopy/experiment/components/image/__init__.py +14 -3
- psychopy/experiment/components/joyButtons/.DS_Store +0 -0
- psychopy/experiment/components/joystick/.DS_Store +0 -0
- psychopy/experiment/components/keyboard/.DS_Store +0 -0
- psychopy/experiment/components/keyboard/__init__.py +22 -10
- psychopy/experiment/components/microphone/.DS_Store +0 -0
- psychopy/experiment/components/microphone/__init__.py +59 -39
- psychopy/experiment/components/mouse/.DS_Store +0 -0
- psychopy/experiment/components/mouse/__init__.py +44 -29
- psychopy/experiment/components/movie/.DS_Store +0 -0
- psychopy/experiment/components/movie/__init__.py +1 -1
- psychopy/experiment/components/panorama/.DS_Store +0 -0
- psychopy/experiment/components/parallelOut/.DS_Store +0 -0
- psychopy/experiment/components/patch/.DS_Store +0 -0
- psychopy/experiment/components/polygon/.DS_Store +0 -0
- psychopy/experiment/components/polygon/__init__.py +26 -6
- psychopy/experiment/components/progress/.DS_Store +0 -0
- psychopy/experiment/components/ratingScale/.DS_Store +0 -0
- psychopy/experiment/components/resourceManager/.DS_Store +0 -0
- psychopy/experiment/components/roi/.DS_Store +0 -0
- psychopy/experiment/components/roi/__init__.py +5 -0
- psychopy/experiment/components/routineSettings/.DS_Store +0 -0
- psychopy/experiment/components/routineSettings/__init__.py +57 -10
- psychopy/experiment/components/serialOut/.DS_Store +0 -0
- psychopy/experiment/components/settings/.DS_Store +0 -0
- psychopy/experiment/components/settings/__init__.py +117 -42
- psychopy/experiment/components/slider/.DS_Store +0 -0
- psychopy/experiment/components/sound/.DS_Store +0 -0
- psychopy/experiment/components/sound/__init__.py +54 -19
- psychopy/experiment/components/static/.DS_Store +0 -0
- psychopy/experiment/components/static/__init__.py +1 -1
- psychopy/experiment/components/text/.DS_Store +0 -0
- psychopy/experiment/components/text/__init__.py +28 -3
- psychopy/experiment/components/textbox/.DS_Store +0 -0
- psychopy/experiment/components/textbox/__init__.py +12 -2
- psychopy/experiment/components/unknown/.DS_Store +0 -0
- psychopy/experiment/components/unknown/__init__.py +1 -2
- psychopy/experiment/components/unknownPlugin/.DS_Store +0 -0
- psychopy/experiment/components/unknownPlugin/__init__.py +2 -2
- psychopy/experiment/components/variable/.DS_Store +0 -0
- psychopy/experiment/flow.py +11 -4
- psychopy/experiment/loops.py +85 -37
- psychopy/experiment/params.py +74 -32
- psychopy/experiment/py2js_transpiler.py +8 -1
- psychopy/experiment/routines/.DS_Store +0 -0
- psychopy/experiment/routines/_base.py +102 -22
- psychopy/experiment/routines/counterbalance/.DS_Store +0 -0
- psychopy/experiment/routines/counterbalance/__init__.py +5 -1
- psychopy/experiment/routines/eyetracker_calibrate/.DS_Store +0 -0
- psychopy/experiment/routines/eyetracker_validate/.DS_Store +0 -0
- psychopy/experiment/routines/pavlovia_survey/.DS_Store +0 -0
- psychopy/experiment/routines/photodiodeValidator/.DS_Store +0 -0
- psychopy/experiment/routines/photodiodeValidator/__init__.py +6 -5
- psychopy/experiment/routines/unknown/.DS_Store +0 -0
- psychopy/gui/wxgui.py +4 -4
- psychopy/hardware/.DS_Store +0 -0
- psychopy/hardware/__init__.py +1 -1
- psychopy/hardware/base.py +12 -0
- psychopy/hardware/camera/__init__.py +1 -15
- psychopy/hardware/cedrus.py +10 -11
- psychopy/hardware/crs/colorcal.py +13 -22
- psychopy/hardware/crs/optical.py +10 -20
- psychopy/hardware/emulator.py +17 -14
- psychopy/hardware/eyetracker.py +42 -118
- psychopy/hardware/gammasci.py +4 -15
- psychopy/hardware/keyboard.py +102 -10
- psychopy/hardware/listener.py +3 -0
- psychopy/hardware/microphone.py +148 -18
- psychopy/hardware/minolta.py +8 -15
- psychopy/hardware/photodiode.py +191 -16
- psychopy/hardware/photometer/__init__.py +11 -19
- psychopy/hardware/pr.py +8 -15
- psychopy/hardware/speaker.py +39 -4
- psychopy/info.py +0 -71
- psychopy/iohub/.DS_Store +0 -0
- psychopy/iohub/__init__.py +1 -1
- psychopy/iohub/client/__init__.py +30 -20
- psychopy/iohub/client/keyboard.py +24 -24
- psychopy/iohub/datastore/__init__.py +2 -2
- psychopy/iohub/datastore/util.py +2 -2
- psychopy/iohub/default_config.yaml +1 -1
- psychopy/iohub/devices/.DS_Store +0 -0
- psychopy/iohub/devices/__init__.py +112 -25
- psychopy/iohub/devices/deviceConfigValidation.py +2 -1
- psychopy/iohub/devices/experiment/default_experiment.yaml +12 -1
- psychopy/iohub/devices/experiment/supported_config_settings.yaml +5 -1
- psychopy/iohub/devices/eyetracker/.DS_Store +0 -0
- psychopy/iohub/devices/eyetracker/__init__.py +46 -0
- psychopy/iohub/devices/eyetracker/calibration/procedure.py +2 -2
- psychopy/iohub/devices/eyetracker/hw/gazepoint/__init__.py +14 -2
- psychopy/iohub/devices/eyetracker/hw/mouse/eyetracker.py +3 -4
- psychopy/iohub/server.py +2 -2
- psychopy/iohub/start_iohub_process.py +3 -0
- psychopy/iohub/util/__init__.py +62 -70
- psychopy/layout.py +5 -5
- psychopy/logging.py +8 -1
- psychopy/microphone.py +10 -37
- psychopy/platform_specific/__init__.py +0 -2
- psychopy/platform_specific/darwin.py +1 -3
- psychopy/platform_specific/linux.py +31 -33
- psychopy/platform_specific/win32.py +38 -13
- psychopy/plugins/__init__.py +148 -116
- psychopy/plugins/util.py +39 -0
- psychopy/preferences/Darwin.spec +4 -2
- psychopy/preferences/FreeBSD.spec +4 -2
- psychopy/preferences/Linux.spec +4 -2
- psychopy/preferences/Windows.spec +4 -2
- psychopy/preferences/baseNoArch.spec +4 -2
- psychopy/preferences/preferences.py +47 -24
- psychopy/projects/pavlovia.py +47 -4
- psychopy/scripts/psyexpCompile.py +0 -4
- psychopy/session.py +153 -21
- psychopy/sound/__init__.py +31 -21
- psychopy/sound/_base.py +20 -3
- psychopy/sound/audioclip.py +320 -33
- psychopy/sound/backend_ptb.py +47 -58
- psychopy/sound/backend_pygame.py +1 -1
- psychopy/sound/backend_pysound.py +6 -15
- psychopy/sound/transcribe.py +53 -0
- psychopy/tests/.DS_Store +0 -0
- psychopy/tests/data/.DS_Store +0 -0
- psychopy/tests/data/TestUnknownPluginComponent_load_resave.psyexp +135 -0
- psychopy/tests/data/Test_textbox/test_ori_0_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_0_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_0_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_top left.png +0 -0
- psychopy/tests/data/correctScript/.DS_Store +0 -0
- psychopy/tests/data/test_components/testClearKeyboard/testClearKeyboard.psyexp +200 -0
- psychopy/tests/data/test_session/.DS_Store +0 -0
- psychopy/tests/data/test_session/root/testFutureTrials/testFutureTrials.psyexp +155 -0
- psychopy/tests/data/test_session/root/testTrialNav/trialNav.psyexp +158 -0
- psychopy/tests/test_app/.DS_Store +0 -0
- psychopy/tests/test_app/conftest.py +2 -2
- psychopy/tests/test_app/test_speed.py +4 -1
- psychopy/tests/test_data/test_TrialHandler2.py +146 -1
- psychopy/tests/test_experiment/.DS_Store +0 -0
- psychopy/tests/test_experiment/needs_wx/genComponsTemplate.py +3 -3
- psychopy/tests/test_experiment/needs_wx/test_components.py +2 -2
- psychopy/tests/test_experiment/test_components/test_KeyboardComponent.py +28 -0
- psychopy/tests/test_experiment/test_components/test_UnknownPluginComponent.py +27 -0
- psychopy/tests/test_experiment/test_components/test_base_components.py +58 -0
- psychopy/tests/test_experiment/test_py2js.py +1 -1
- psychopy/tests/test_hardware/test_keyboard.py +31 -0
- psychopy/tests/test_hardware/test_ports.py +1 -11
- psychopy/tests/test_liaison/test_Liaison.py +47 -0
- psychopy/tests/test_misc/test_core.py +5 -0
- psychopy/tests/test_session/test_Session.py +5 -1
- psychopy/tests/test_tools/test_versionchooser.py +39 -8
- psychopy/tests/test_visual/test_all_stimuli.py +0 -97
- psychopy/tests/test_visual/test_image.py +6 -5
- psychopy/tests/test_visual/test_textbox.py +36 -0
- psychopy/tests/utils.py +4 -0
- psychopy/tools/filetools.py +1 -1
- psychopy/tools/pkgtools.py +160 -137
- psychopy/tools/versionchooser.py +10 -10
- psychopy/tools/wizard.py +3 -3
- psychopy/visual/.DS_Store +0 -0
- psychopy/visual/backends/pygletbackend.py +24 -13
- psychopy/visual/basevisual.py +5 -11
- psychopy/visual/button.py +2 -14
- psychopy/visual/helpers.py +5 -5
- psychopy/visual/line.py +1 -2
- psychopy/visual/movie2.py +7 -816
- psychopy/visual/movie3.py +7 -589
- psychopy/visual/movies/__init__.py +8 -11
- psychopy/visual/movies/frame.py +5 -2
- psychopy/visual/movies/players/ffpyplayer_player.py +5 -2
- psychopy/visual/noise.py +8 -7
- psychopy/visual/patch.py +7 -16
- psychopy/visual/radial.py +9 -7
- psychopy/visual/ratingscale.py +8 -1415
- psychopy/visual/secondorder.py +10 -9
- psychopy/visual/shape.py +7 -2
- psychopy/visual/text.py +1 -1
- psychopy/visual/textbox2/textbox2.py +28 -5
- {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/METADATA +8 -13
- {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/RECORD +307 -213
- {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/WHEEL +1 -1
- psychopy/app/Resources/click.png +0 -0
- psychopy/app/Resources/next.png +0 -0
- psychopy/experiment/components/patch/__init__.py +0 -121
- psychopy/experiment/components/patch/classic/patch.png +0 -0
- psychopy/experiment/components/patch/dark/patch.png +0 -0
- psychopy/experiment/components/patch/dark/patch@2x.png +0 -0
- psychopy/experiment/components/patch/light/patch.png +0 -0
- psychopy/experiment/components/patch/light/patch@2x.png +0 -0
- psychopy/experiment/components/ratingScale/__init__.py +0 -337
- psychopy/experiment/components/ratingScale/classic/ratingscale.png +0 -0
- psychopy/experiment/components/ratingScale/classic/ratingscale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/dark/ratingScale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/dark/ratingscale.png +0 -0
- psychopy/experiment/components/ratingScale/light/ratingScale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/light/ratingscale.png +0 -0
- psychopy/platform_specific/posix.py +0 -16
- psychopy/tests/test_sound/test_microphone.py +0 -217
- psychopy/tests/test_visual/test_ratingScale.py +0 -299
- /psychopy/{app/Resources → assets}/Psychopy Window Favicon@16w.png +0 -0
- /psychopy/{app/Resources → assets}/Psychopy Window Favicon@32w.png +0 -0
- /psychopy/{app/Resources → assets}/USB-C.png +0 -0
- /psychopy/{app/Resources → assets}/USB.png +0 -0
- /psychopy/{app/Resources → assets}/creditCard.png +0 -0
- /psychopy/{app/Resources → assets}/default.mp3 +0 -0
- /psychopy/{app/Resources → assets}/default.mp4 +0 -0
- /psychopy/{app/Resources → assets}/default.png +0 -0
- /psychopy/{app/Resources → assets/templates}/instruct1.png +0 -0
- /psychopy/{app/Resources → assets/templates}/instruct2.png +0 -0
- {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/entry_points.txt +0 -0
- {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/licenses/AUTHORS.md +0 -0
- {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -25,6 +25,7 @@ def init(rate=44100, stereo=True, buffer=128):
|
|
|
25
25
|
pass
|
|
26
26
|
# for compatibility with other backends but not needed
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
def getDevices(kind=None):
|
|
29
30
|
"""Returns a dict of dict of audio devices of specified `kind`
|
|
30
31
|
|
|
@@ -32,15 +33,16 @@ def getDevices(kind=None):
|
|
|
32
33
|
"""
|
|
33
34
|
devs = {}
|
|
34
35
|
for ii, dev in enumerate(soundcard.device_info()):
|
|
35
|
-
if (dev['max_output_channels']==0 and kind=='output' or
|
|
36
|
-
dev['max_input_channels']==0 and kind=='input'):
|
|
36
|
+
if (dev['max_output_channels'] == 0 and kind == 'output' or
|
|
37
|
+
dev['max_input_channels'] == 0 and kind == 'input'):
|
|
37
38
|
continue
|
|
38
39
|
# newline characters must be removed
|
|
39
|
-
devName = dev['name'].replace('\r\n','')
|
|
40
|
+
devName = dev['name'].replace('\r\n', '')
|
|
40
41
|
devs[devName] = dev
|
|
41
42
|
dev['id'] = ii
|
|
42
43
|
return devs
|
|
43
44
|
|
|
45
|
+
|
|
44
46
|
# these will be controlled by sound.__init__.py
|
|
45
47
|
defaultInput = None
|
|
46
48
|
defaultOutput = None
|
|
@@ -268,7 +270,7 @@ class SoundPySoundCard(_SoundBase):
|
|
|
268
270
|
def _setSndFromFile(self, fileName):
|
|
269
271
|
# alias default names (so it always points to default.png)
|
|
270
272
|
if fileName in ft.defaultStim:
|
|
271
|
-
fileName = Path(prefs.paths['
|
|
273
|
+
fileName = Path(prefs.paths['assets']) / ft.defaultStim[fileName]
|
|
272
274
|
# load the file
|
|
273
275
|
if not path.isfile(fileName):
|
|
274
276
|
msg = "Sound file %s could not be found." % fileName
|
|
@@ -288,17 +290,6 @@ class SoundPySoundCard(_SoundBase):
|
|
|
288
290
|
logging.error(msg % fileName)
|
|
289
291
|
raise ValueError(msg % fileName)
|
|
290
292
|
|
|
291
|
-
@property
|
|
292
|
-
def status(self):
|
|
293
|
-
# NB this is stored by the _callbacks class for fast access when
|
|
294
|
-
# data buffer needs filling (_callbacks class does not have a
|
|
295
|
-
# reference back here)
|
|
296
|
-
return self.__dict__['status']
|
|
297
|
-
|
|
298
|
-
@status.setter
|
|
299
|
-
def status(self, status):
|
|
300
|
-
self.__dict__['status'] = status
|
|
301
|
-
|
|
302
293
|
def _setSndFromArray(self, thisArray):
|
|
303
294
|
"""For pysoundcard all sounds are ultimately played as an array so
|
|
304
295
|
other setSound methods are going to call this having created an arr
|
psychopy/sound/transcribe.py
CHANGED
|
@@ -228,6 +228,59 @@ class TranscriptionResult:
|
|
|
228
228
|
def wordData(self, val):
|
|
229
229
|
self._wordData = val
|
|
230
230
|
|
|
231
|
+
def getSpeechInterval(self):
|
|
232
|
+
"""Get the start and stop times for the interval of speech in the audio
|
|
233
|
+
clip.
|
|
234
|
+
|
|
235
|
+
This feature is only supported by the Whisper transcriber. The start and
|
|
236
|
+
end times of the speech interval are returned in seconds.
|
|
237
|
+
|
|
238
|
+
Returns
|
|
239
|
+
-------
|
|
240
|
+
tuple
|
|
241
|
+
Start and end times of the speech interval in seconds. If the engine
|
|
242
|
+
does not support this feature, or if the data is missing,
|
|
243
|
+
`(None, None)` is returned. In cases where either the start or end
|
|
244
|
+
time is missing, the value will be `None` for that field.
|
|
245
|
+
|
|
246
|
+
"""
|
|
247
|
+
nullData = (None, None) # default return value if no data
|
|
248
|
+
|
|
249
|
+
if self._engine in ('sphinx', 'google'):
|
|
250
|
+
logging.warning(
|
|
251
|
+
"Method `getSpeechInterval` is not supported for the "
|
|
252
|
+
"transcription engine `{}`.".format(self._engine))
|
|
253
|
+
return nullData
|
|
254
|
+
elif self._engine == 'whisper':
|
|
255
|
+
if self.responseData is None:
|
|
256
|
+
return nullData
|
|
257
|
+
|
|
258
|
+
# this value is in the response data which is in JSON format
|
|
259
|
+
segmentData = self.responseData.get('segments', None)
|
|
260
|
+
|
|
261
|
+
if segmentData is None:
|
|
262
|
+
return nullData
|
|
263
|
+
|
|
264
|
+
# integers for keys
|
|
265
|
+
segmentKeys = list(segmentData.keys())
|
|
266
|
+
|
|
267
|
+
if len(segmentKeys) == 0:
|
|
268
|
+
return nullData
|
|
269
|
+
|
|
270
|
+
# sort segment keys to ensure monotonic ordering
|
|
271
|
+
segmentKeys.sort()
|
|
272
|
+
|
|
273
|
+
# get first and last segment
|
|
274
|
+
firstSegment = segmentData.get(segmentKeys[0], None)
|
|
275
|
+
lastSegment = segmentData.get(segmentKeys[-1], None)
|
|
276
|
+
|
|
277
|
+
# get speech onset/offset times
|
|
278
|
+
speechOnset = firstSegment.get('start', None)
|
|
279
|
+
speechOffset = lastSegment.get('end', None)
|
|
280
|
+
|
|
281
|
+
# return start and end times
|
|
282
|
+
return speechOnset, speechOffset
|
|
283
|
+
|
|
231
284
|
@property
|
|
232
285
|
def success(self):
|
|
233
286
|
"""`True` if the transcriber returned a result successfully (`bool`)."""
|
psychopy/tests/.DS_Store
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<PsychoPy2experiment encoding="utf-8" version="2024.2.0">
|
|
3
|
+
<Settings>
|
|
4
|
+
<Param val="3" valType="str" updates="None" name="Audio latency priority"/>
|
|
5
|
+
<Param val="ptb" valType="str" updates="None" name="Audio lib"/>
|
|
6
|
+
<Param val="" valType="str" updates="None" name="Completed URL"/>
|
|
7
|
+
<Param val="auto" valType="str" updates="None" name="Data file delimiter"/>
|
|
8
|
+
<Param val="u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])" valType="code" updates="None" name="Data filename"/>
|
|
9
|
+
<Param val="True" valType="bool" updates="None" name="Enable Escape"/>
|
|
10
|
+
<Param val="Thank you for your patience." valType="str" updates="None" name="End Message"/>
|
|
11
|
+
<Param val="{'participant':'f"{randint(0, 999999):06.0f}"', 'session':'001'}" valType="code" updates="None" name="Experiment info"/>
|
|
12
|
+
<Param val="True" valType="bool" updates="None" name="Force stereo"/>
|
|
13
|
+
<Param val="True" valType="bool" updates="None" name="Full-screen window"/>
|
|
14
|
+
<Param val="" valType="str" updates="None" name="HTML path"/>
|
|
15
|
+
<Param val="" valType="str" updates="None" name="Incomplete URL"/>
|
|
16
|
+
<Param val="testMonitor" valType="str" updates="None" name="Monitor"/>
|
|
17
|
+
<Param val="[]" valType="list" updates="None" name="Resources"/>
|
|
18
|
+
<Param val="False" valType="bool" updates="None" name="Save csv file"/>
|
|
19
|
+
<Param val="False" valType="bool" updates="None" name="Save excel file"/>
|
|
20
|
+
<Param val="False" valType="bool" updates="None" name="Save hdf5 file"/>
|
|
21
|
+
<Param val="True" valType="bool" updates="None" name="Save log file"/>
|
|
22
|
+
<Param val="True" valType="bool" updates="None" name="Save psydat file"/>
|
|
23
|
+
<Param val="True" valType="bool" updates="None" name="Save wide csv file"/>
|
|
24
|
+
<Param val="1" valType="num" updates="None" name="Screen"/>
|
|
25
|
+
<Param val="True" valType="bool" updates="None" name="Show info dlg"/>
|
|
26
|
+
<Param val="False" valType="bool" updates="None" name="Show mouse"/>
|
|
27
|
+
<Param val="height" valType="str" updates="None" name="Units"/>
|
|
28
|
+
<Param val="" valType="str" updates="None" name="Use version"/>
|
|
29
|
+
<Param val="(1024, 768)" valType="list" updates="None" name="Window size (pixels)"/>
|
|
30
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
31
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
32
|
+
<Param val="avg" valType="str" updates="None" name="blendMode"/>
|
|
33
|
+
<Param val="float" valType="str" updates="None" name="clockFormat"/>
|
|
34
|
+
<Param val="{'thisRow.t': 'priority.CRITICAL', 'expName': 'priority.LOW'}" valType="dict" updates="None" name="colPriority"/>
|
|
35
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
36
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
37
|
+
<Param val="warning" valType="code" updates="None" name="consoleLoggingLevel"/>
|
|
38
|
+
<Param val="default" valType="str" updates="None" name="ecSampleRate"/>
|
|
39
|
+
<Param val="100.1.1.1" valType="str" updates="None" name="elAddress"/>
|
|
40
|
+
<Param val="FILTER_LEVEL_2" valType="str" updates="None" name="elDataFiltering"/>
|
|
41
|
+
<Param val="FILTER_LEVEL_OFF" valType="str" updates="None" name="elLiveFiltering"/>
|
|
42
|
+
<Param val="EYELINK 1000 DESKTOP" valType="str" updates="None" name="elModel"/>
|
|
43
|
+
<Param val="ELLIPSE_FIT" valType="str" updates="None" name="elPupilAlgorithm"/>
|
|
44
|
+
<Param val="PUPIL_AREA" valType="str" updates="None" name="elPupilMeasure"/>
|
|
45
|
+
<Param val="1000" valType="num" updates="None" name="elSampleRate"/>
|
|
46
|
+
<Param val="False" valType="bool" updates="None" name="elSimMode"/>
|
|
47
|
+
<Param val="RIGHT_EYE" valType="str" updates="None" name="elTrackEyes"/>
|
|
48
|
+
<Param val="PUPIL_CR_TRACKING" valType="str" updates="None" name="elTrackingMode"/>
|
|
49
|
+
<Param val="TestUnknownPluginComponent_load_resave" valType="str" updates="None" name="expName"/>
|
|
50
|
+
<Param val="on Sync" valType="str" updates="None" name="exportHTML"/>
|
|
51
|
+
<Param val="None" valType="str" updates="None" name="eyetracker"/>
|
|
52
|
+
<Param val="" valType="code" updates="None" name="frameRate"/>
|
|
53
|
+
<Param val="Attempting to measure frame rate of screen, please wait..." valType="str" updates="None" name="frameRateMsg"/>
|
|
54
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="gpAddress"/>
|
|
55
|
+
<Param val="4242" valType="num" updates="None" name="gpPort"/>
|
|
56
|
+
<Param val="ioHub" valType="str" updates="None" name="keyboardBackend"/>
|
|
57
|
+
<Param val="info" valType="code" updates="None" name="logging level"/>
|
|
58
|
+
<Param val="True" valType="bool" updates="None" name="measureFrameRate"/>
|
|
59
|
+
<Param val="MIDDLE_BUTTON" valType="list" updates="None" name="mgBlink"/>
|
|
60
|
+
<Param val="CONTINUOUS" valType="str" updates="None" name="mgMove"/>
|
|
61
|
+
<Param val="0.5" valType="num" updates="None" name="mgSaccade"/>
|
|
62
|
+
<Param val="neon.local" valType="str" updates="None" name="plCompanionAddress"/>
|
|
63
|
+
<Param val="8080" valType="num" updates="None" name="plCompanionPort"/>
|
|
64
|
+
<Param val="True" valType="bool" updates="None" name="plCompanionRecordingEnabled"/>
|
|
65
|
+
<Param val="0.6" valType="num" updates="None" name="plConfidenceThreshold"/>
|
|
66
|
+
<Param val="True" valType="bool" updates="None" name="plPupilCaptureRecordingEnabled"/>
|
|
67
|
+
<Param val="" valType="str" updates="None" name="plPupilCaptureRecordingLocation"/>
|
|
68
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="plPupilRemoteAddress"/>
|
|
69
|
+
<Param val="50020" valType="num" updates="None" name="plPupilRemotePort"/>
|
|
70
|
+
<Param val="1000" valType="num" updates="None" name="plPupilRemoteTimeoutMs"/>
|
|
71
|
+
<Param val="False" valType="bool" updates="None" name="plPupillometryOnly"/>
|
|
72
|
+
<Param val="psychopy_iohub_surface" valType="str" updates="None" name="plSurfaceName"/>
|
|
73
|
+
<Param val="0" valType="code" updates="None" name="runMode"/>
|
|
74
|
+
<Param val="False" valType="bool" updates="None" name="rush"/>
|
|
75
|
+
<Param val="time" valType="str" updates="None" name="sortColumns"/>
|
|
76
|
+
<Param val="" valType="str" updates="None" name="tbLicenseFile"/>
|
|
77
|
+
<Param val="" valType="str" updates="None" name="tbModel"/>
|
|
78
|
+
<Param val="60" valType="num" updates="None" name="tbSampleRate"/>
|
|
79
|
+
<Param val="" valType="str" updates="None" name="tbSerialNo"/>
|
|
80
|
+
<Param val="pyglet" valType="str" updates="None" name="winBackend"/>
|
|
81
|
+
</Settings>
|
|
82
|
+
<Routines>
|
|
83
|
+
<Routine name="trial">
|
|
84
|
+
<RoutineSettingsComponent name="trial" plugin="None">
|
|
85
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
86
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
87
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
88
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
89
|
+
<Param val="" valType="str" updates="constant" name="desc"/>
|
|
90
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
91
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
92
|
+
<Param val="False" valType="code" updates="None" name="forceNonSlip"/>
|
|
93
|
+
<Param val="trial" valType="code" updates="None" name="name"/>
|
|
94
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
95
|
+
<Param val="" valType="code" updates="constant" name="skipIf"/>
|
|
96
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
97
|
+
<Param val="" valType="code" updates="constant" name="stopVal"/>
|
|
98
|
+
<Param val="False" valType="bool" updates="None" name="useWindowParams"/>
|
|
99
|
+
</RoutineSettingsComponent>
|
|
100
|
+
<TestFromPluginComponent name="testPluginComp" plugin="psychopy-plugin-which-doesnt-exist">
|
|
101
|
+
<Param val="4" valType="code" updates="constant" name="angularCycles"/>
|
|
102
|
+
<Param val="0" valType="code" updates="constant" name="angularPhase"/>
|
|
103
|
+
<Param val="$[1,1,1]" valType="color" updates="constant" name="color"/>
|
|
104
|
+
<Param val="rgb" valType="str" updates="constant" name="colorSpace"/>
|
|
105
|
+
<Param val="1.0" valType="num" updates="constant" name="contrast"/>
|
|
106
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
107
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
108
|
+
<Param val="Linear" valType="str" updates="constant" name="interpolate"/>
|
|
109
|
+
<Param val="" valType="file" updates="constant" name="mask"/>
|
|
110
|
+
<Param val="radial" valType="code" updates="None" name="name"/>
|
|
111
|
+
<Param val="" valType="num" updates="constant" name="opacity"/>
|
|
112
|
+
<Param val="0" valType="num" updates="constant" name="ori"/>
|
|
113
|
+
<Param val="(0, 0)" valType="list" updates="constant" name="pos"/>
|
|
114
|
+
<Param val="3" valType="code" updates="constant" name="radialCycles"/>
|
|
115
|
+
<Param val="0" valType="code" updates="constant" name="radialPhase"/>
|
|
116
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
117
|
+
<Param val="(0.5, 0.5)" valType="list" updates="constant" name="size"/>
|
|
118
|
+
<Param val="" valType="code" updates="None" name="startEstim"/>
|
|
119
|
+
<Param val="time (s)" valType="str" updates="None" name="startType"/>
|
|
120
|
+
<Param val="0.0" valType="code" updates="None" name="startVal"/>
|
|
121
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
122
|
+
<Param val="1.0" valType="code" updates="constant" name="stopVal"/>
|
|
123
|
+
<Param val="True" valType="bool" updates="None" name="syncScreenRefresh"/>
|
|
124
|
+
<Param val="sqrXsqr" valType="file" updates="constant" name="tex"/>
|
|
125
|
+
<Param val="128" valType="code" updates="constant" name="texture resolution"/>
|
|
126
|
+
<Param val="from exp settings" valType="str" updates="None" name="units"/>
|
|
127
|
+
<Param val="" valType="code" updates="None" name="validator"/>
|
|
128
|
+
<Param val="(0, 360)" valType="code" updates="constant" name="visibleWedge"/>
|
|
129
|
+
</TestFromPluginComponent>
|
|
130
|
+
</Routine>
|
|
131
|
+
</Routines>
|
|
132
|
+
<Flow>
|
|
133
|
+
<Routine name="trial"/>
|
|
134
|
+
</Flow>
|
|
135
|
+
</PsychoPy2experiment>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<PsychoPy2experiment encoding="utf-8" version="2024.1.4">
|
|
3
|
+
<Settings>
|
|
4
|
+
<Param val="3" valType="str" updates="None" name="Audio latency priority"/>
|
|
5
|
+
<Param val="ptb" valType="str" updates="None" name="Audio lib"/>
|
|
6
|
+
<Param val="" valType="str" updates="None" name="Completed URL"/>
|
|
7
|
+
<Param val="auto" valType="str" updates="None" name="Data file delimiter"/>
|
|
8
|
+
<Param val="u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])" valType="code" updates="None" name="Data filename"/>
|
|
9
|
+
<Param val="True" valType="bool" updates="None" name="Enable Escape"/>
|
|
10
|
+
<Param val="" valType="str" updates="None" name="End Message"/>
|
|
11
|
+
<Param val="{'participant': 'f"{randint(0, 999999):06.0f}"', 'session': '001'}" valType="code" updates="None" name="Experiment info"/>
|
|
12
|
+
<Param val="True" valType="bool" updates="None" name="Force stereo"/>
|
|
13
|
+
<Param val="True" valType="bool" updates="None" name="Full-screen window"/>
|
|
14
|
+
<Param val="" valType="str" updates="None" name="HTML path"/>
|
|
15
|
+
<Param val="" valType="str" updates="None" name="Incomplete URL"/>
|
|
16
|
+
<Param val="testMonitor" valType="str" updates="None" name="Monitor"/>
|
|
17
|
+
<Param val="[]" valType="list" updates="None" name="Resources"/>
|
|
18
|
+
<Param val="False" valType="bool" updates="None" name="Save csv file"/>
|
|
19
|
+
<Param val="False" valType="bool" updates="None" name="Save excel file"/>
|
|
20
|
+
<Param val="False" valType="bool" updates="None" name="Save hdf5 file"/>
|
|
21
|
+
<Param val="True" valType="bool" updates="None" name="Save log file"/>
|
|
22
|
+
<Param val="True" valType="bool" updates="None" name="Save psydat file"/>
|
|
23
|
+
<Param val="True" valType="bool" updates="None" name="Save wide csv file"/>
|
|
24
|
+
<Param val="1" valType="num" updates="None" name="Screen"/>
|
|
25
|
+
<Param val="True" valType="bool" updates="None" name="Show info dlg"/>
|
|
26
|
+
<Param val="False" valType="bool" updates="None" name="Show mouse"/>
|
|
27
|
+
<Param val="height" valType="str" updates="None" name="Units"/>
|
|
28
|
+
<Param val="" valType="str" updates="None" name="Use version"/>
|
|
29
|
+
<Param val="[1920, 1080]" valType="list" updates="None" name="Window size (pixels)"/>
|
|
30
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
31
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
32
|
+
<Param val="avg" valType="str" updates="None" name="blendMode"/>
|
|
33
|
+
<Param val="float" valType="str" updates="None" name="clockFormat"/>
|
|
34
|
+
<Param val="{'thisRow.t': 'priority.CRITICAL', 'expName': 'priority.LOW'}" valType="dict" updates="None" name="colPriority"/>
|
|
35
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
36
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
37
|
+
<Param val="100.1.1.1" valType="str" updates="None" name="elAddress"/>
|
|
38
|
+
<Param val="FILTER_LEVEL_2" valType="str" updates="None" name="elDataFiltering"/>
|
|
39
|
+
<Param val="FILTER_LEVEL_OFF" valType="str" updates="None" name="elLiveFiltering"/>
|
|
40
|
+
<Param val="EYELINK 1000 DESKTOP" valType="str" updates="None" name="elModel"/>
|
|
41
|
+
<Param val="ELLIPSE_FIT" valType="str" updates="None" name="elPupilAlgorithm"/>
|
|
42
|
+
<Param val="PUPIL_AREA" valType="str" updates="None" name="elPupilMeasure"/>
|
|
43
|
+
<Param val="1000" valType="num" updates="None" name="elSampleRate"/>
|
|
44
|
+
<Param val="False" valType="bool" updates="None" name="elSimMode"/>
|
|
45
|
+
<Param val="RIGHT_EYE" valType="str" updates="None" name="elTrackEyes"/>
|
|
46
|
+
<Param val="PUPIL_CR_TRACKING" valType="str" updates="None" name="elTrackingMode"/>
|
|
47
|
+
<Param val="testKb" valType="str" updates="None" name="expName"/>
|
|
48
|
+
<Param val="on Sync" valType="str" updates="None" name="exportHTML"/>
|
|
49
|
+
<Param val="None" valType="str" updates="None" name="eyetracker"/>
|
|
50
|
+
<Param val="" valType="code" updates="None" name="frameRate"/>
|
|
51
|
+
<Param val="Attempting to measure frame rate of screen, please wait..." valType="str" updates="None" name="frameRateMsg"/>
|
|
52
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="gpAddress"/>
|
|
53
|
+
<Param val="4242" valType="num" updates="None" name="gpPort"/>
|
|
54
|
+
<Param val="PsychToolbox" valType="str" updates="None" name="keyboardBackend"/>
|
|
55
|
+
<Param val="warning" valType="code" updates="None" name="logging level"/>
|
|
56
|
+
<Param val="True" valType="bool" updates="None" name="measureFrameRate"/>
|
|
57
|
+
<Param val="('MIDDLE_BUTTON',)" valType="list" updates="None" name="mgBlink"/>
|
|
58
|
+
<Param val="CONTINUOUS" valType="str" updates="None" name="mgMove"/>
|
|
59
|
+
<Param val="0.5" valType="num" updates="None" name="mgSaccade"/>
|
|
60
|
+
<Param val="neon.local" valType="str" updates="None" name="plCompanionAddress"/>
|
|
61
|
+
<Param val="8080" valType="num" updates="None" name="plCompanionPort"/>
|
|
62
|
+
<Param val="True" valType="bool" updates="None" name="plCompanionRecordingEnabled"/>
|
|
63
|
+
<Param val="0.6" valType="num" updates="None" name="plConfidenceThreshold"/>
|
|
64
|
+
<Param val="True" valType="bool" updates="None" name="plPupilCaptureRecordingEnabled"/>
|
|
65
|
+
<Param val="" valType="str" updates="None" name="plPupilCaptureRecordingLocation"/>
|
|
66
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="plPupilRemoteAddress"/>
|
|
67
|
+
<Param val="50020" valType="num" updates="None" name="plPupilRemotePort"/>
|
|
68
|
+
<Param val="1000" valType="num" updates="None" name="plPupilRemoteTimeoutMs"/>
|
|
69
|
+
<Param val="False" valType="bool" updates="None" name="plPupillometryOnly"/>
|
|
70
|
+
<Param val="psychopy_iohub_surface" valType="str" updates="None" name="plSurfaceName"/>
|
|
71
|
+
<Param val="0" valType="code" updates="None" name="runMode"/>
|
|
72
|
+
<Param val="False" valType="bool" updates="None" name="rush"/>
|
|
73
|
+
<Param val="time" valType="str" updates="None" name="sortColumns"/>
|
|
74
|
+
<Param val="" valType="str" updates="None" name="tbLicenseFile"/>
|
|
75
|
+
<Param val="" valType="str" updates="None" name="tbModel"/>
|
|
76
|
+
<Param val="60" valType="num" updates="None" name="tbSampleRate"/>
|
|
77
|
+
<Param val="" valType="str" updates="None" name="tbSerialNo"/>
|
|
78
|
+
<Param val="pyglet" valType="str" updates="None" name="winBackend"/>
|
|
79
|
+
</Settings>
|
|
80
|
+
<Routines>
|
|
81
|
+
<Routine name="getter">
|
|
82
|
+
<RoutineSettingsComponent name="getter" plugin="None">
|
|
83
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
84
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
85
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
86
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
87
|
+
<Param val="If keypresses aren't being cleared properly, this Routine will end immediately." valType="str" updates="constant" name="desc"/>
|
|
88
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
89
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
90
|
+
<Param val="getter" valType="code" updates="None" name="name"/>
|
|
91
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
92
|
+
<Param val="" valType="code" updates="constant" name="skipIf"/>
|
|
93
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
94
|
+
<Param val="" valType="code" updates="constant" name="stopVal"/>
|
|
95
|
+
<Param val="False" valType="bool" updates="None" name="useWindowParams"/>
|
|
96
|
+
</RoutineSettingsComponent>
|
|
97
|
+
<KeyboardComponent name="key_resp" plugin="None">
|
|
98
|
+
<Param val="" valType="list" updates="constant" name="allowedKeys"/>
|
|
99
|
+
<Param val="" valType="str" updates="constant" name="correctAns"/>
|
|
100
|
+
<Param val="" valType="str" updates="None" name="deviceLabel"/>
|
|
101
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
102
|
+
<Param val="True" valType="bool" updates="constant" name="discard previous"/>
|
|
103
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
104
|
+
<Param val="True" valType="bool" updates="constant" name="forceEndRoutine"/>
|
|
105
|
+
<Param val="key_resp" valType="code" updates="None" name="name"/>
|
|
106
|
+
<Param val="press" valType="str" updates="constant" name="registerOn"/>
|
|
107
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
108
|
+
<Param val="" valType="code" updates="None" name="startEstim"/>
|
|
109
|
+
<Param val="time (s)" valType="str" updates="None" name="startType"/>
|
|
110
|
+
<Param val="0.0" valType="code" updates="None" name="startVal"/>
|
|
111
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
112
|
+
<Param val="" valType="code" updates="constant" name="stopVal"/>
|
|
113
|
+
<Param val="last key" valType="str" updates="constant" name="store"/>
|
|
114
|
+
<Param val="False" valType="bool" updates="constant" name="storeCorrect"/>
|
|
115
|
+
<Param val="True" valType="bool" updates="constant" name="syncScreenRefresh"/>
|
|
116
|
+
</KeyboardComponent>
|
|
117
|
+
<CodeComponent name="code" plugin="None">
|
|
118
|
+
<Param val="" valType="extendedCode" updates="constant" name="Before Experiment"/>
|
|
119
|
+
<Param val="" valType="extendedCode" updates="constant" name="Before JS Experiment"/>
|
|
120
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin Experiment"/>
|
|
121
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin JS Experiment"/>
|
|
122
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin JS Routine"/>
|
|
123
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin Routine"/>
|
|
124
|
+
<Param val="Auto->JS" valType="str" updates="None" name="Code Type"/>
|
|
125
|
+
<Param val="if frameN > 2:&#10; assert not len(key_resp.device.responses)&#10; continueRoutine = False" valType="extendedCode" updates="constant" name="Each Frame"/>
|
|
126
|
+
<Param val="var _pj;&#10;function _pj_snippets(container) {&#10; function _assert(comp, msg) {&#10; function PJAssertionError(message) {&#10; this.name = "PJAssertionError";&#10; this.message = (message || "Custom error PJAssertionError");&#10; if (((typeof Error.captureStackTrace) === "function")) {&#10; Error.captureStackTrace(this, this.constructor);&#10; } else {&#10; this.stack = new Error(message).stack;&#10; }&#10; }&#10; PJAssertionError.prototype = Object.create(Error.prototype);&#10; PJAssertionError.prototype.constructor = PJAssertionError;&#10; msg = (msg || "Assertion failed.");&#10; if ((! comp)) {&#10; throw new PJAssertionError(msg);&#10; }&#10; }&#10; container["_assert"] = _assert;&#10; return container;&#10;}&#10;_pj = {};&#10;_pj_snippets(_pj);&#10;if ((frameN > 2)) {&#10; _pj._assert((! key_resp.device.responses.length), null);&#10; continueRoutine = false;&#10;}&#10;" valType="extendedCode" updates="constant" name="Each JS Frame"/>
|
|
127
|
+
<Param val="" valType="extendedCode" updates="constant" name="End Experiment"/>
|
|
128
|
+
<Param val="" valType="extendedCode" updates="constant" name="End JS Experiment"/>
|
|
129
|
+
<Param val="" valType="extendedCode" updates="constant" name="End JS Routine"/>
|
|
130
|
+
<Param val="" valType="extendedCode" updates="constant" name="End Routine"/>
|
|
131
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
132
|
+
<Param val="code" valType="code" updates="None" name="name"/>
|
|
133
|
+
</CodeComponent>
|
|
134
|
+
</Routine>
|
|
135
|
+
<Routine name="presser">
|
|
136
|
+
<RoutineSettingsComponent name="presser" plugin="None">
|
|
137
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
138
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
139
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
140
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
141
|
+
<Param val="This Routine simulates a keypress (space) without it being collected and cleared by any Keyboard Component" valType="str" updates="constant" name="desc"/>
|
|
142
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
143
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
144
|
+
<Param val="presser" valType="code" updates="None" name="name"/>
|
|
145
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
146
|
+
<Param val="" valType="code" updates="constant" name="skipIf"/>
|
|
147
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
148
|
+
<Param val="" valType="code" updates="constant" name="stopVal"/>
|
|
149
|
+
<Param val="False" valType="bool" updates="None" name="useWindowParams"/>
|
|
150
|
+
</RoutineSettingsComponent>
|
|
151
|
+
<TextComponent name="text" plugin="None">
|
|
152
|
+
<Param val="white" valType="color" updates="constant" name="color"/>
|
|
153
|
+
<Param val="rgb" valType="str" updates="constant" name="colorSpace"/>
|
|
154
|
+
<Param val="1" valType="num" updates="constant" name="contrast"/>
|
|
155
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
156
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
157
|
+
<Param val="None" valType="str" updates="constant" name="flip"/>
|
|
158
|
+
<Param val="Open Sans" valType="str" updates="constant" name="font"/>
|
|
159
|
+
<Param val="LTR" valType="str" updates="None" name="languageStyle"/>
|
|
160
|
+
<Param val="0.05" valType="num" updates="constant" name="letterHeight"/>
|
|
161
|
+
<Param val="text" valType="code" updates="None" name="name"/>
|
|
162
|
+
<Param val="" valType="num" updates="constant" name="opacity"/>
|
|
163
|
+
<Param val="0" valType="num" updates="constant" name="ori"/>
|
|
164
|
+
<Param val="(0, 0)" valType="list" updates="constant" name="pos"/>
|
|
165
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
166
|
+
<Param val="" valType="code" updates="None" name="startEstim"/>
|
|
167
|
+
<Param val="time (s)" valType="str" updates="None" name="startType"/>
|
|
168
|
+
<Param val="0.0" valType="code" updates="None" name="startVal"/>
|
|
169
|
+
<Param val="frame N" valType="str" updates="None" name="stopType"/>
|
|
170
|
+
<Param val="2" valType="code" updates="constant" name="stopVal"/>
|
|
171
|
+
<Param val="True" valType="bool" updates="None" name="syncScreenRefresh"/>
|
|
172
|
+
<Param val="this exists solely to keep the Routine alive" valType="str" updates="constant" name="text"/>
|
|
173
|
+
<Param val="from exp settings" valType="str" updates="None" name="units"/>
|
|
174
|
+
<Param val="" valType="code" updates="None" name="validator"/>
|
|
175
|
+
<Param val="" valType="num" updates="constant" name="wrapWidth"/>
|
|
176
|
+
</TextComponent>
|
|
177
|
+
<CodeComponent name="make_press" plugin="None">
|
|
178
|
+
<Param val="" valType="extendedCode" updates="constant" name="Before Experiment"/>
|
|
179
|
+
<Param val="" valType="extendedCode" updates="constant" name="Before JS Experiment"/>
|
|
180
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin Experiment"/>
|
|
181
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin JS Experiment"/>
|
|
182
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin JS Routine"/>
|
|
183
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin Routine"/>
|
|
184
|
+
<Param val="Auto->JS" valType="str" updates="None" name="Code Type"/>
|
|
185
|
+
<Param val="# press space&#10;kp = keyboard.KeyPress("space", t)&#10;kp.duration = 1/60&#10;key_resp.device.receiveMessage(kp)&#10;# end&#10;continueRoutine = False" valType="extendedCode" updates="constant" name="Each Frame"/>
|
|
186
|
+
<Param val="kp = new keyboard.KeyPress("space", t);&#10;kp.duration = (1 / 60);&#10;key_resp.device.receiveMessage(kp);&#10;continueRoutine = false;&#10;" valType="extendedCode" updates="constant" name="Each JS Frame"/>
|
|
187
|
+
<Param val="" valType="extendedCode" updates="constant" name="End Experiment"/>
|
|
188
|
+
<Param val="" valType="extendedCode" updates="constant" name="End JS Experiment"/>
|
|
189
|
+
<Param val="" valType="extendedCode" updates="constant" name="End JS Routine"/>
|
|
190
|
+
<Param val="" valType="extendedCode" updates="constant" name="End Routine"/>
|
|
191
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
192
|
+
<Param val="make_press" valType="code" updates="None" name="name"/>
|
|
193
|
+
</CodeComponent>
|
|
194
|
+
</Routine>
|
|
195
|
+
</Routines>
|
|
196
|
+
<Flow>
|
|
197
|
+
<Routine name="presser"/>
|
|
198
|
+
<Routine name="getter"/>
|
|
199
|
+
</Flow>
|
|
200
|
+
</PsychoPy2experiment>
|
|
Binary file
|