Skip to content

Tokenized Audio Stimulus

A tokenized-audio stimulus is similar to the tokenized text stimulus, except that here a token is an audio clip instead of a text segment. A tokenized-audio stimulus can be particularly useful for creating a self-paced listening study. When the participant presses the designated key for advancing in the stimulus, the currently playing audio clip will be cut off, and the next audio clip (if it exists) will start playing.

Required Properties

type

  • Definition: The type of stimulus (text, tokenized_text, image, etc.)
  • Possible values: For a tokenized-audio stimulus, type must be specified as tokenized_audio.
{
  "type": "tokenized_audio",
  "content": ["a.mp3", "b.mp3", "c.mp3"]
}

content

  • Definition: A list consisting of the file names of the list of audio clips to be played
  • Possible values: Must be the file names of the audio files (e.g. ["a.mp3", "b.mp3", "c.mp3"])
  • Format support is dependent on the participant's browser. See Tips tab for further information.
{
  "type": "tokenized_audio",
  "content": ["a.mp3", "b.mp3", "c.mp3"]
}
  • mp3 tends to work well across our supported browsers and all major operating systems (Windows, Mac, and Linux). However, there is a chance that older Linux systems with older browsers will not support this format.
  • There are many ways to convert your audio stimuli to the desired format. For audio transcoding, check out fre:ac.

Optional Properties

barrier

  • Definition: If set to true, then all subsequent stimuli and responses will not be displayed until this tokenized audio stimulus displays all its audio clips.
  • Possible values: true or false
  • Default: true

{
  "type": "tokenized_audio",
  "content": ["a.mp3”, "b.mp3", "c.mp3"],
  "barrier": false
}
In trials using the above stimulus code, other stimuli and responses will be displayed at the same time as the tokenized audio.
{
  "type": "tokenized_audio",
  "content": ["a.mp3”, "b.mp3", "c.mp3"],
  "barrier": true
}
In trials using the above stimulus code, the tokenized audio will play before other stimuli and responses are displayed. This code is equivalent to code where the barrier property is not specified.

delay

Info

This property is used for presenting multiple stimuli on a trial in a sequence. To implement inter-trial intervals, see the delay parameter in trial templates instead.

Warning

The delaying of multiple stimuli on a trial does NOT have a chain effect. That is, the delay of any stimulus on a trial is always relative to the onset of that trial or the end of the last stimulus acting as a barrier.

  • Definition: Delay the onset of a stimulus by a certain number of seconds, relative to (1) the onset of a trial if there are no stimuli acting as barriers or (2) the end of the last stimulus acting as a barrier.
  • Possible values: A number in seconds (decimals are supported)
  • Default: 0 (no delay)

{
  "type": "tokenized_audio",
  "content": ["a.mp3”, "b.mp3", "c.mp3"],
  "delay": 1.6
}
The above code introduces a delay of 1600 milliseconds.

hint

  • Definition: Whether to display an instruction note that tells participants to press the key_advance key
  • Possible values: true or false
  • Default: true
  • Instruction reads Press the "[key]" key to play the sounds. where [key] is the key specified in key_advance.
  • Setting this to false can be useful if participants are given sufficient practice in prior parts of the study.
{
  "type": "tokenized_audio",
  "content": ["a.mp3”, "b.mp3", "c.mp3"],
  "hint": false
}

key_advance

  • Definition: The key that a participant should press to play each audio clip in the content list
  • Possible values: Any character
  • Default: " " (i.e., the space bar)
{
  "type": "tokenized_audio",
  "content": ["a.mp3”, "b.mp3", "c.mp3"],
  "key_advance": "j"
}

last_token_skippable

  • Definition: Whether or not participants can press the key_advance key to skip the very last audio clip in the list
  • Possible values: true or false
  • Default: false
  • Setting this to true will potentially allow participants to speed through the entire stimulus without listening to anything (i.e., holding down the designated key throughout the process).
{
  "type": "tokenized_audio",
  "content": ["a.mp3”, "b.mp3", "c.mp3"],
  "last_token_skippable": true
}

parent

  • Definition: If specified, then the properties of the specified stimulus will be inherited by this stimulus, unless a property of the same name is defined in this stimulus.
  • Possible values: The name of another defined stimulus

"t_a_1": {
  "type": "tokenized_audio",
  "content": ["a.mp3", "b.mp3", "c.mp3"],
  "hint": true,
  "key_advance": "j",
  "barrier": false
}
"t_a_2": {
  "type": "tokenized_audio",
  "content": ["d.mp3", "e.mp3", "f.mp3"],
  "parent": "t_a_1",
  "hint": false
}
Here, the t_a_2 stimulus inherits the barrier and key_advance properties of t_a_1. t_a_2 does not inherit the hint property of t_a_1 because the stimulus definition of t_a_2 has its own specified hint property.

progress_bar

  • Definition: Whether to display a progress bar to visually indicate how many audio files are left to be played
  • Possible values: true or false
  • Default: true
  • Setting this to false will result in no visual indication of the progress of the current tokenized-audio stimulus.
{
  "type": "tokenized_audio",
  "content": ["a.mp3”, "b.mp3", "c.mp3"],
  "progress_bar": false
}

See Also

Audio Stimulus, Tokenized Text