Read text content of text stimuli

Hi, I am making an online experiment where I have a drag and drop page containing multiple text stimuli. I want to make it so that whenever I click on the text stimuli, Pavlovia and Psychopy and read out loud the text content of the stimuli. For example if I have a text stimuli that says “welcome” when I click on it, I want it to say welcome as well. I don’t know if this is feasible by psychopy and psychojs, or do I need to import custom sound flies to do so? Thank you in advance!

You’ll have to import your own sound files. :wink: That should not require too much work with sound components, if I’m not mistaken.

Edit: There are text to speech libraries both for Python and for JS. For offline experiments it should be fairly straightforward to add such a library as an external module. With JS, you might be able to use the SpeechSynthesis API, which is integrated in most modern browsers; but I know to little about JS and PsychoJS to judge whether that is an easy task. Integrating the SpeechSynthesis API is definitely beyond what you could do with the builder’s autotranslate functionalities.

Thank you! I used the web SpeechSynthesis API and it worked wonderfully!

1 Like