Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Experiment with audio stimuli

Hello, i am new using the program. I have seen videos, but i am not sure how i can present audio stimuli by randomly selecting them from a folder.

The idea is to present many audio modules from a folder and as they appear the person write their answer (free text).

Thank you

Comments

  • Hi,


    there is the Audio stimulus (see https://docs.expyriment.org/expyriment.stimuli.Audio.html).

    It takes a filename as an input, so all you need to do is to randomly select a filename from all the audio files in a folder. For instance to select 10 random filenames from a folder with audio files:

    import os
    import glob
    import expyriment as xpy
    
    files = glob.glob(os.path.join("/path/to/audio_files", "*.wav"))
    xpy.design.randomize.shuffle_list(files)
    selection = files[:10]
    
  • Ok thanks!

    Can i use OpenSesame for the experiment? I was looking some videos in Opensesame, but i`m not sure.

  • Yes, OpenSesame can run entire Expyriment in inline scripts (I think), but there is no advantage of doing it like this over just running the Expyriment script directly.

Sign In or Register to comment.