Module collect_aesop1
[hide private]
[frames] | no frames]

Module collect_aesop1

source code

A script to run a reading experiment. Text stimulus, verbal response. It puts text up on a screen, the subject reads it, and the program records what the subject says. It is designed for recording largish blocks of text (paragraph sized) but is flexible and automated.


Run it as:

       collect_data -d some_directory groupname

and it will read some_directory/stimuli/ display stimuli, record speech, and write some_directory/response/groupname/ that contains all the input stimuli, along with metadata. It also produces one .wav file per utterance, named some_directory/response/groupname/datecode/StimulusNumber_RepetitionNumber.wav

These are Fiat 1.2 format data files, and can be read with gmisclib.fiatio from the Sourceforge speechresearch project. The Fiat format is defined at



The software can be conveniently run if the experimenter has the keyboard and the subject has the mouse. In the body of the experiment, the subject clicks "next" to see a prompt, then speaks. Then, the experimenter types "q" to terminate the recording. The software then pauses, waiting for the subject to click "Next" (to go on to the next stimulus) or "Repeat" to read the stimulus again. Alternatively, the experimenter can hit the space bar to go forward, or the "r" key to repeat a reading.

Note that the software can enforce a limit on how many times a text can be read, via the Maxreps value.

If the experimenter types 's', the recording is terminated and deleted, effectively skipping that stimulus. A comment is left in the output file, but no other metadata for this utterance. The experimenter can also type "x" -- this acts like "q", but leaves a mark in the "flag" column.

The software records one audio .wav file for each line in the control file, and writes one line in the output metadata file.

In typical operation, the groupname selects which experimental group a given subject is in. A subject is then simply identified by the filename of the output metadata file, so the data is naturally anonymized.

However, if a pre-existing subject ID needs to be carried through, or if a single subject comes in for more than one session, then the easiest solution is to use a different groupname for each subject. Typically, you'd use the subject ID number as the groupname, and simply make a copy of the input (control) file for each subject in a group.

Control File Format

The program reads a file (also in Fiat format) that controls many aspects of the experiment (on a stimulus-by-stimulus basis if need be). The variables below affect the experiment; any other data in the input file is simply passed to the output metadata file.

Values can be set in the header of the input Fiat file (in which case they have effect throughout the experiment) and/or they can be given columns of their own. If they have a column of their own, and a value is present then that value over-rides the default. (Note that the code %na in a column means that no value is given, so the value specified in the header, if any, would be used.) To say this again: the values set in the header and the columns of data in the input file are merged together. When the program is looking for a value, it looks first in the column data, then if nothing is found, it takes the value from the header.

The software has three text areas. A small one above for instructions to the subject, another small one above for status information, and a big one below for material to read.

Output (Metadata) File Information

All the input control information is copied to the output metadata file. Additional columns are added as follows:

Software downloads should also be available from the "speechresearch" project on, the Oxford University Library system, and .

This software is copyright Greg Kochanski (2010) and is available under the Lesser Gnu Public License, version 3 or higher. It was funded by the UK's Economic and Social Research Council under project RES-062-23-1323. This is available from,, and

Copyright: Greg Kochanski, 2010

License: Gnu Public License, version 3 or higher.


Version: Aesop.0.20.2

Note: Please cite in academic papers as "data collection software used in "Rhythm measures with language-independent segmentation", Anastassia Loukina, Greg Kochanski, Chilin Shih, Elinor Keane and Ian Watson Proceedings of the 10th Annual Conference of the International Speech Communication Association (Interspeech 2009). ISSN 1990-9772 Brighton, UK, 7--10 September 2009, pp 1531--1534. The software may be downloaded from . (URL checked ZZZ/ZZZ/ZZZ.)

Classes [hide private]
This class represents a subprocess that's automatically started and automatically killed by __del__ or an explicit call to close().
This is the Graphical User Interface for the experimental data collection software.
A class that defines the sequence of the experiment.
Functions [hide private]
run(argv) source code
Variables [hide private]
  ROOT = '/projects/aesop/data_files'
  TEXT_ROOT = '/projects/aesop/Texts_for_recording'
  RATE = 16000
  LMARGIN = 100
  RMARGIN = 100
  CID_R = 1
  __package__ = None

Imports: os, signal, datetime, subprocess, fiatio, gpkmisc, die, EC, gtk, gobject