Tutorials
Psycholinguistics
-
Extract by-interval mean formants in Praat
27 June 2024On this page I present a Praat script that extracts by-interval mean formants.
-
Python program to present an array of pictures and their labels
20 February 2024In a visual world eye-tracking experiment, sometimes the researcher needs to familiarise participants with the pictures they will see before the eye-tracking procedure to allow the participants to associate each picture with a specific label. On this page I share a Python program for this familiarisation task, based on pygame.
-
Reducing breathing and room noise from speech samples
23 July 2023On this page I share my Python script that removes breathing and room noise from recordings of my participants’ responses in a speech production experiment.
-
Get audio file durations using Praat
14 June 2023On this page I share a Praat script that gets audio file durations from a directory containing audio files. The script outputs a .csv file.
-
Convert audio file formats using Python
14 June 2023I work closely with auditory stimuli. Sometimes I need to convert a large number of audio files from one format to another, usually because different experiment software works better with different audio formats. Here I share my Python script that converts all audio files in a folder from one format to another.
-
Remove track loss trials from visual world eye-tracking data
25 April 2023One step of cleaning visual world eye-tracking data is to exclude track loss trials. These are trials where for an extensive amount of time, no eye gaze was detected on any objects in the visual display. There are multiple reasons for track loss. For example, the participant may not have paid attention to the visual display, or the eye-tracker may have been ‘drifting’. On this page, I share an R function that removes track loss trials from visual world eye-tracking data.
-
Comparing images from two folders
30 March 2023Sometimes psychology researchers need to recycle stimuli from old experiments, usually because they have already got some standardized measures for the old stimuli.
-
Make auditory serial presentation stimuli
10 March 2023Psycholinguistic research sometimes requires the stimuli to have specific timing. On this page, I share a Praat script that given the stimulus-onset asynchrony (SOA), makes auditory serial presentation stimuli from continuous speech recordings and their textgrids.
-
Extract normalised pitch contour
10 March 2023On this page I present a Praat script that extracts pitch contour information based on
.wav
sounds and.Textgrid
files. -
Automated processing of Chinese cloze responses
06 February 2023The cloze task is widely used in psycholinguistics, mainly to determine the predictability of a word given certain context. In a cloze task, the participant sees incomplete sentences, and is asked to complete the sentences by writing down one or a few words. The predictability, or the cloze probability, of a given word is the proportion of people who fill a gap in a sentence with that specific word. Therefore, processing cloze responses includes counting the frequency of each word appeared in all responses. In many languages, such as English, this task is easy to automate: word boundaries are easy to determine. In languages such as Chinese, where no written word boundaries exist, we need a solution to automate the processing of cloze responses.