Generating dynamic auditory stimuli online

Hi!

I am quite new to Psychopy. I apologize if the question is rather obvious.

I am using the standalone version of Pychopy. My goal is to create an experiment where stimuli are generated dynamically with values that depend on participants’ previous responses (a bit like a staircase paradigm). However, because the stimuli are drawn randomly from a continuous range, these must be generated trial to trial and they cannot be preloaded, as the set of generated stimuli is entirely dependent on the participant’s response choices. The auditory stimuli are synthetic vowels, and to generate them I am using a Python package called the tdklatt; in essence, it is not built-in neither in Python nor in standalone Psychopy.

My question is: is there a way of implementing that external library such that the experiment can be run online?

Thank you for your help.

Hello @MMS

Would that help GitHub - chdh/klatt-syn: Klatt formant synthesizer? I have not used it.

Best wishes Jens

Hi Jens,

Thank you for the source.

Would you know of a source explaining how to import packages in Psychopy/PsychoJS? I have no previous experience with Javascript.
I could copy and paste the whole code in my experiment (it has a free licence), though an import within it prevents me from doing so:
import * as PolyReal from "dsp-collection/math/PolyReal.js"

Best,
Mauro

Hello @MMS

You find some information about using plugins here https://plugins.psychopy.org/. I do not know anything about importing your own JavaScript libraries into PsychoPy. But there are some postings in the forum that might help, e.g. Importing javascript libraries for use in an experiment on pavlovia, or JS library & Python library

Best wishes Jens