Having created the database template file we can now begin to put the database to use. Since we have only one level of labels for each utterance, we can only do simple sequence queries but this simple case will serve to illustrate the main features of the Emu system.
Firstly we can find out what utterances are included in our database. This is a good check that the format of the template file is correct and that the directory paths have been configured correctly. For this we will use the command line tool utterances: to get a list of utterances use the command (note that here and elsewhere in this manual we give example commands for both Unix and Windows 95 where they are different):
unix% utterances test lab windows:> utters test lab |
msajc001 msajc002 msajc003 msajc004 msajc005 msajc006 msajc007 msajc008 msajc009 |
We can now query the database to find, for example, all instances of the vowel A. This is a simple query which can be carried out from the command line as follows[1]:
unix% emuquery test '*' 'Phonetic=A' windows:> emuquery test * "Phonetic=A" |
database:this query:Phonetic=A type:segment # A 1401.15 1495.15 msajc005 A 1835.15 1964.15 msajc005 A 1647.88 1732.63 msajc008 A 3028.99 3098.2 msajc008 |
If you don't see a result like this, it means that Emu couldn't read the Phonetic label files for some reason: check that the path statement in the template file is appropriate for the directory where these files are located.
More complex queries are possible with Emu; later chapters will discuss using the graphical interface to the query tool which allows you to build up a custom utterance list, and to view the utterances from which each segment came with a click of the mouse. With a simple database like this one, only single level queries are possible (we could search for A segments followed by nasals for instance with the query [Phonetic=A -> Phonetic=n|m|N]). To take advantage of the full capabilities of Emu, we need to superimpose a hierarchical description of the utterance on the Phonetic level labels, including, for example, syllable, word and phrase level structure. These topics are covered in later chapters.
To complete our simple example we will now extract speech data for each of the segments which matched the query above. To do this we must first save the segment list in a file: the easiest way is to use the -o option to emuquery:
unix% emuquery -o test.seg test '*' 'Phonetic=A' windows:> emuquery -o test.seg test * "Phonetic=A" |
Using this segment list we will now extract formant data at the midpoint of each vowel for which the command is:
unix% get_track -c 0.5 test.seg fm test windows:> gettrack -c 0.5 test.seg fm test |
567.954 1470.69 2222.27 2988.12 543.007 1599.88 2362.44 3485.31 491.082 1580.24 2320.8 3390.59 536.617 1604.64 2308.16 3355.14 |
If you want to extract all the data for each segment, then you should omit the -c 0.5 option to get_track. In this case the result is two files, one containing the data, with the extension dat, and a second, with the extension tim containing three columns: the number of samples for the segment, the time of the first sample and the time of the last sample. For example if we redo the example above the file test.tim contains:
27 1404.5 1539.5 33 1839.5 2004.5 23 1649.5 1764.5 26 3029.5 3159.5 |
Having extracted this data it can now be passed to your favourite analysis tool for further work. For example you could load it into a spreadsheet or data plotting package. Emu provides a set of extensions for two statistical packages (Xlisp-Stat and Splus) which are tailored to speech research. Details of these are provided in a later section.
| [1] | Note that the * needs to be quoted in Unix to prevent it being expanded by the shell. It is good practice to also quote the query since it may contain embedded spaces -- note though that on Windows 95 double quotes must be used. |