Accessible experiment with audio-Files

I want to create an accessible experiment for word lists. Therefore, participants can choose in the variable ‘Version’ at the beginning between “visual” or “visual + audio”. I have included all audio files.

How can I ensure that audio is only played if it is selected? My first idea would be to use volume: 1 vs. 0. Is this a good way or is there a better way for doing it?

The volume method sounds like a good idea to me! Is there a reason to not want to do it that way?

I’m not sure if it works perfectly under each system. Maybe I could deactivate sound directly in the module.

unfortunately, I get an error:

var volumeDF = 1.0;
if (expInfo[“Instruktionen”] === “visuell”) {
volumeDF = 0.0;

Uncaught (in promise) TypeError: Failed to execute ‘linearRampToValueAtTime’ on ‘AudioParam’: The provided float value is non-finite.
at Howl4.fade (howler.js:1328:30)
at (TrackPlayer.js:220:14)
at (Sound.js:105:16)
at Object.function (FalseFriends.js:1063:57)
at Window.render (Window.js:353:13)
at update (Scheduler.js:155:26)

Hi Becca,

if there is no solution to this error. Do you have another idea to solve this task?


Is this in a JS/Both component? If you typed var then you may be limiting the scope of the variable so it can’t be seen by the audio component. I strongly recommend using Auto translate components whenever possible.

ah, thanks. Without “var” it rounds perfectly.

I don’t use both, as I only have online subjects.

Thanks a lot.