Week 11: Perceptual experiments
1 Intro
Perception has been studied from different perspectives. Questions related to phonetics have to do with, for instance, how sensitive listeners are to a given acoustic parameter. In phonology, questions relate to how the perception of a given acoustic cue can be associated to the recognition of a certain category. Just as in production, the research questions can vary from the concrete to the abstract.
An important aspect that you might want to take into account is that perceptual experiments are impossible to modify post hoc. That is, if your research question went through slight changes or if your stimuli did not turn out how you wanted, you will have to gather new data. With production this situation might be salvageable if you have for instance a long interview with each subject.
That being said, perception experiments have an advantage: you don’t need to deal with annotation, which can be very time consuming; the data will be ready for analysis.
2 Types of perception experiments in phon/phon
2.1 Categorization
Categorization (identifcation/labelling) is perhaps one of the most common perceptual tasks in phonology. In each trial, the subject is exposed to a single stimulus and is asked to give a response to the question: “What sound did you hear?”
Answers can be given in two ways:
- 1.
- Forced-choice task: the subject chooses an answer from predetermined options;
- 2.
- Multiple-choice, where the subject can choose more than one option among a series of possible answers; or
- 3.
- Open-choice, where the subject can provide a free response after having heard the stimulus.
For 1 and 2, several options are available. The simplest option is to use an orthographic transcription, for example: ”the vowel in the word pin”. But your research question might want to avoid any orthographic biases, in which case you can use a picture of a lexical item with the sound in question (i.e. a picture of a pin.)
2.2 Discrimination
Discrimination has usually been considered to be a less phonological task, and more related to phonetic aspects of perception. Discrimination tasks present more than one stimulus per trial, where several paradigms are possible:
- 1.
- AX task: the subjects are asked to answer whether two sounds are the same or different.
- 2.
- An AXB task presents three stimuli, where two of them are the same (either A and X or X and B). The subject is asked to pair those that are considered to be the same. If the stimulus to be discriminated is after the reference stimuli, the experiment is called an ABX task. Conversely, in an XAB task the stimulus in question comes before the referential ones. All of these tasks have been considered to aim at different types of processing. It has been argued that AX tasks elicit acoustically-driven responses, while ABX, XAB, and AXB would be able to elicit phonologically-driven responses, due to the need for the listener to resort to phonological categories in order to group the stimuli.
Something to take into account when designing discrimination experiments is the Interstimulus Interval (ISI), that is, the amount of silence time between the stimuli. If you are aiming to a more acoustic research question, the you might want to use a shorter ISI. If on the other hand your question is more phonological, then you will need to lengthen the time so that your subject relies more on abstract categories than short-term memory.
2.3 Rating
Ratings are usually performed as a Likert scale, where the subject listens to a given stimulus and is then asked to rate it in terms of how good an exemplar of a given category it is, where 1 = bad exemplar and 5 = good exemplar. Depending on your research question, you can also use a 7-point scale, 9-point scale, etc. but take into account that there is a slight bias towards not using the extreme values!
Likewise, you can make a crossover between discrimination and ratings: you can ask people to rate a pair of stimuli (that is, an AX paradigm) in terms of how similar/dissimilar they are. This will give you a more fine-grained idea of what people perceive as same or different.
2.4 Categorical perception
Categorical perception has been understood as a phenomenon by which perception along a continuum of acoustic values abruptly changes. If we have a 10-step continuum between /ba/ and /da/ (that is, we give the same stimulus gradually different locus values) and we pair them so that subjects discriminate between step 1 and step 2, then step 2 and step 3, and so on, the responses will be mostly ”same”, except at some point whereresponses will be ”different”; after reaching this point, responses are ”same” again. This point in which discrimination is higher coincides with the point where the same subjects will stop categorizing the same 10 tokens as /ba/ and start perceiving them as /da/ in an identification task. In sum, this is two tasks (identification and discrimination) with the same stimuli.
3 Creating a continuum
We will create a continuum between /e/ and /a/ (values for Spanish). The following script builds on the previous KlattGrid script. First, create a folder called continuum in your Desktop.
For the vowels, we will assume the following values:
- /e/: F1=450, F2=2000
- /a/: F1=800, F2=1350
#Reference values:
ef1= 400
ef2= 2300
af1=800
af2=1350
#Create a series of KlattGrids
for i to 10
Create KlattGrid: "vowel", 0, 0.5, 5, 1, 1, 6, 1, 1, 1
Add pitch point: 0.25, 140
Add voicing amplitude point: 0.25, 90
Add oral formant frequency point: 1, 0.25, ef1+(((af1-ef1)/9)*i-1)
Add oral formant frequency point: 2, 0.25, ef2-(((ef2-af2)/9)*i-1)
Add oral formant bandwidth point: 1, 0.25, 50
Add oral formant bandwidth point: 2, 0.25, 50
To Sound
Save as WAV file: "/home/fernanda/Desktop/continuum/vowel_"+string$(i)+".wav"
endfor
Listen to the stimuli: each one of them is a step in a Hertz continuum1 . Since German has more categories along this continuum, it is likely that you will perceive three categories (I only perceive two). Make a mental note: when did you start perceiving a different vowel?
4 Stimuli pairs
We will create stimuli for an AX discrimination task. We will concatenate two adjacent sounds, with a silence of 1.5 s in between. First, we create a folder called discr in our Desktop.
dir$= "/home/fernanda/Desktop"
Create Strings as file list: "fileList", dir$+"/continuum/*.wav"
Insert string: 0, "vowel_10.wav"
Remove string: 2
numstrings= Get number of strings
for i to numstrings-1
string$= Get string... i
bit$= mid$(string$, 7,1)
step=number(bit$)
first=Read from file: dir$ + "/continuum/vowel_"+bit$+".wav"
sil=Create Sound from formula: "silence", 1, 0, 1.5, 44100, "0"
sec=Read from file: dir$+"/continuum/vowel_"+string$(step+1)+".wav"
selectObject: first
plusObject: sil
plusObject:sec
Concatenate
Save as WAV file: dir$+"/discr/vowels_"+string$(i)+"_"+string$(step+1)+".wav"
selectObject: "Strings fileList"
endfor
Lines 1 and 2 create a Strings list with the file names in the continuum folder. However, the problem is that they will be listed as vowel_1 followed immediately by vowel_10. In order to put vowel 10 at the end of the Strings list, we will insert a string vowel_10.wav at the end of the Strings list (that-'s what the 0 means) and remove the second String (i.e. the former vowel_10.wav). This was done in lines 3 and 4.
After this we have a for loop in which the following actions are performed:
- In Lines 7 and 8 we recover character 7 from each String (the one with the number); we store it as a numeric variable (Line 9).
- Line 10 opens a file corresponding to a String from 1 to 9. Then Line 11 creates a silence of 1.5 seconds. Line 12 opens the file that immediately follows the one where the loop iterates, so if the script is dealing with vowel_3 then it will open vowel_4 after the creation of the silence.
- Lines 13-16 select the three objects together (the first sound, the silence, and the second sound) and concatenates them.
- Finally, Line 17 saves the concatenated file into the discr folder.
Now listen to the audio files in the discr folder. Where did you start hearing differences between sounds? Does it match with your previous categorization task?
5 The Experiment interface
In the previous weeks we have learned how to prepare stimuli for perceptual research with Praat. Now, a different problem arises: how do I present my stimuli to the participants? Here you have several options, including external platforms such as LimeSurvey (these are very useful if you’d like to perform experiments via web). However, testing perception online is a bit tricky as you are not in control of the participant’s behaviour: did he/she take a toilet break while responding? Was he/she interrupted by someone else?
If you want to run your experiment in a controlled setting, then you can use the Praat Experiment interface. It won’t allow for designing very sophisticated experiments, but you can definitely run the ones we learned about in the previous session.
5.1. Making stimuli
This is the same script as in section 4, albeit with some slight modifications: we used the English
vowels /ɛ/ and /æ/ (as in the words bed and cat, respectively). We also made a 5-step continuum,
for simplicity’s sake. We will store them in a folder called Sounds inside another folder called span
bedf1=610
bedf2= 1900
catf1=850
catf2=1610
for i to 5
Create KlattGrid: "vowel", 0, 0.5, 5, 1, 1, 6, 1, 1, 1
Add pitch point: 0.25, 140
Add voicing amplitude point: 0.25, 90
Add oral formant frequency point: 1, 0.25, bedf1+(((catf1-bedf1)/4)*i-1)
Add oral formant frequency point: 2, 0.25, bedf2-(((bedf2-catf2)/4)*i-1)
Add oral formant bandwidth point: 1, 0.25, 50
Add oral formant bandwidth point: 2, 0.25, 50
To Sound
Save as WAV file: "/home/fernanda/Desktop/Sounds/vowel_"+string$(i)+".wav"
endfor
5.2 The script
The following script creates the Experiment. Note that in order to run the experiment you will need to use the Open > Read from file... option from the Objects window. If you use the Praat > Open Praat script... option then you will be able to edit the script, but not run it. Also, you will need to save this script in the Experiment
folder that you created, next to (not inside!) the Sounds
subfolder.
Now I will apologize in advance for the massive wall of code coming up. I will explain what each line does right below it. Also please note that this script does not end on line 20; you need to scroll down the code window.
"ooTextFile"
"ExperimentMFC 7"
blankWhilePlaying? <no>
stimuliAreSounds? <yes>
stimulusFileNameHead = "Sounds/"
stimulusFileNameTail = ".wav"
stimulusCarrierBefore = ""
stimulusCarrierAfter = ""
stimulusInitialSilenceDuration = 0.5 seconds
stimulusMedialSilenceDuration = 0
stimulusFinalSilenceDuration = 0.5 seconds
numberOfDifferentStimuli = 5
"vowel_1" ""
"vowel_2" ""
"vowel_3" ""
"vowel_4" ""
"vowel_5" ""
numberOfReplicationsPerStimulus = 4
breakAfterEvery = 10
randomize = <PermuteBalancedNoDoublets>
startText = "Hi, this is a listening experiment.
First, you will listen to a vowel sound. Choose the word you think has
that vowel in it.
Then, rate the vowel. Was it a good or a bad exemplar?
Click to start."
runText = "This vowel is like the one in the word..."
pauseText = "Time for a break. Click to resume whenever you’re ready."
endText = "The experiment has finished. Thanks for participating!"
maximumNumberOfReplays = 0
replayButton = 0 0 0 0 "" ""
okButton = 0 0 0 0 "" ""
oopsButton = 0 0 0 0 "" ""
responsesAreSounds? <no> "" "" "" "" 0 0 0
numberOfDifferentResponses = 2
0.25 0.35 0.6 0.7 "bed" 40 "" "e"
0.65 0.75 0.6 0.7 "bad" 40 "" "a"
numberOfGoodnessCategories = 5
0.25 0.35 0.10 0.20 "1 (poor)" 24 ""
0.35 0.45 0.10 0.20 "2" 24 ""
0.45 0.55 0.10 0.20 "3" 24 ""
0.55 0.65 0.10 0.20 "4" 24 ""
0.65 0.75 0.10 0.20 "5 (good)" 24 ""
5.2.1 Main settings
Lines 1 and 2 are invariable and have to do with the type of file and version that Praat is dealing with. In Line 3 you can make the screen go blank while the sounds are playing by setting it to no. Line 4 can be changed if the stimuli were not meant to be sounds.
Lines 5 and 6 are the path and extension of the files. Since we stored the sounds in the folder called Sounds, the script here states so. Here we are assuming that the script with the experiment is in a folder immediately outside the Sounds folder.
5.2.2 Carrier sentence
If we wanted to have a carrier sentence, such as ”I say once”, we can record the first part (”I say”) and add the name of the sound file between the quotation marks in Line 7; the same goes for the end part of the carrier sentence in Line 8.
5.2.3 Silences
In Week 11 we learned how to concatenate the sounds with a given ISI. With this script you don’t need to do that: lines 9 to 11 can take care of this. Lines 9 and 11 fix the silences between trials; Line 10 sets the ISI. Here we just set it to 0 because we are going to run an identification task, so only one stimulus per trial is presented.
5.2.4 Stimuli, blocks and trials
Line 12 states the number of different stimuli for the experiment (we created 5 with the previous script, so we set it to 5.) Then we add one line with the file name of each stimulus between quotation marks, followed by a set of empty quotation marks.
If we were to create a discrimination experiment, Line 13 would read "vowel_1, vowel_2" "", and so on. The ISI, as we already mentioned, is set in Line 10.
Usually, these experiments repeat the same stimulus quite a few times, which in turn means that we will have a lot of trials (say, hundreds). But making the participants respond to hundreds of trials in one sitting will inevitably lead to fatigue and errors. Line 18 sets the amount of repetitions for each stimulus, while Line 19 sets the number of trials per block. Here, the subject will be able to take a break after 10 trials.
Importantly, we want the experiment to randomize the order of the stimuli, which can be done in Line 20. The options are:
- CyclicNonRandom will present the stimuli in the order given in the script.
- WithReplacement will be completely random. It could be the case that one of the stimuli will be played only once, or even never.
- PermuteAll Here you will have your stimuli played the same amount of times each, but not necessarily within each block; so for instance, you could have vowel_1 played 4 times in block 1 and 0 times in block 2.
- PermuteBalanced will let you have all your stimuli played the same amount of time within each block, but it might be the case that the same stimuli is presented twice in a row.
- PermuteBalancedNoDoublets will present the stimuli at random but it will make sure that all the stimuli are played the same amount of times, and that you won’t have the same stimulus played twice in a row.
5.2.5 Text
Lines 21 to 27 set the text throughout the experiment. Each line break in the script equals one line break in the text. Just make sure to use one set of quotation marks for each text!
5.2.6 Optional buttons
You can also let your participants replay a given sound. Line 28 sets the maximum number of times that they can play a given sound. Line 29 sets the coordinates for the replay button. The coordinates work in the usual X-Y plot, where the origin is on the lower left corner and the values go from 0 to 1. The first two values are the X-axis and the other two the ones for the Y-axis. The first set of quotation marks set the font size for the button.
Likewise, you can have an OK button, which confirms the participant’s answer; and an ”oops” button, which allows the participant to chance their answer (Lines 30-31).
5.2.7 Responses
Finally, we get to set the response buttons. Since this experiment has 2 tasks per trial, we will have two sets of buttons.
- The first set of buttons are the responses to the identification task. We decided to give only two choices, but this is of course uo to you. Line 33 sets the number of possible choices, and then Lines 34-35 give the coordinates for each button. The first text is what will appear on the screen; the number 40 is the font size. The ”e” and ”a” will be the way in which the responses will appear on the results table generated by Praat.
- And finally, the same holds for the goodness categories. We gave the participants 5 options.
5.3 The procedure
Now, how do we administer this experiment? First, you can run it in any computer. Recall that Praat can be portable too, so you can have everything in a USB stick and it will run.
As we mentioned earlier, you will need to open the experiment script with the Read from file option. If everything is ok, then the Objects window will show you the Run button. Click and the experiment will start running in a pop-up window.
After the experiment took place, you may simply close the pop-up window. The Objects window will have an Extract Results option. Click and a ResultsMFC experiment object will appear; you may rename it with the participant’s name. After that, click on Collect to Table. This will create a table with the results, which you can then save to your computer.
6 Homework
Try generating a 5-step continuum with different vowel pairs: one where the acoustic distance is bigger and one where it is smaller (for example, /i-u/ and /æ- ɑ/) and set up an AX experiment with Praat. Reflect: How sensitive are you to the changes in each continuum step? On ILIAS, upload a .zip file called experiment_lastname.zip where you have your folder called Sounds with either one of the sound continua (I suggest creating a /i-u/ continuum and pair them using the script in section 4), and the experiment.praat file. You don't need to send the script in section 4; just the already concatenated sounds in the corresponding folder are enough.