The Emu Query Tool

As an alternative to performing queries from the command line, the Emu query tool provides a tabbed notebook style interface for querying and extracting data from Emu database. It can be accessed either from the Emu labeller or as a standalone tool. You can query a database and extract speech data, saving the results in a text file for import into other tools such as R or Excel.

The interface provides three kinds of display pages: the section called “Utterance Lists”, the section called “Query Results” and the section called “Extracted Data”. Initially the interface displays an utterance list page, other pages are generated as you query the database and extract data. The contents of any page can be saved in a text file for later use.

Utterance Lists

Figure 3.3. The Emu query tool utterance list page.

The Emu query tool utterance list page.

This page allows you to construct an utterance list to use as the basis of a database query -- the query will search only the utterances shown in your list. You can add utterances to the list using wildcard patterns (eg. the pattern * will add all utterances to the list, the pattern ag* will add those beginning with ag). Individual items or can be deleted from the list by selecting them in the list display and clicking on 'Delete from list'.

When searching for utterance names in the database, Emu uses a particular file extension: for example it might look for files ending in .lab. By default, Emu uses the extension defined in the database template as the PrimaryExtension (see Template Variable Definitions). If this is not defined the first extension defined in the paths section of the template file is used. The extension can be changed in the utterance list editor via the Options -- File Extension menu item which lists all extensions defined in the template file: the selected extension is has a highlighted radiobutton displayed next to it.

Once you have a useable utterance list you may add a comment and save it for later use. You can reload an utterance via the file menu, this will create a new utterance list page.

Finally you can perform a query on the utterance list via the text box at the bottom of the page. Enter a query and press Search and the results of the query will be displayed on a new the section called “Query Results” page. See Chapter 5, Querying a Database for details of the syntax of Emu queries.

Query Results

Figure 3.4. The Emu query tool query results page.

The Emu query tool query results page.

The result of a query is a list of either segments or events from the database. Segments have both a start and end time, events have only a single time. The query results page (entitled Seglist-n where n is 1, 2, 3 etc) shows the label, start and end times and the utterance name for each segment matching the query.

These results can be saved to a text file for later reference (although they can't yet be reloaded into the query tool).

This page allows you to extract speech data corresponding to each segment. Select a track name from the drop down list (this will show all track names listed in the database template). Two kinds of data extraction can be performed on segment data: either the full sequence of data from start to end time can be extracted for each segment or each segment can be cut at a given cut point between 0 and 1. For event lists only a single point can be extracted per event. The result of a data extraction request is an the section called “Extracted Data” page.

Extracted Data

Figure 3.5. The Emu query tool data page.

The Emu query tool data page.

Figure 3.6. The Emu query tool data page, cut data.

The Emu query tool data page, cut data.

This page either lists the data explicitly (if one point is extracted per segment/event) or lists the label, length and width of the data otherwise. The data can be saved to a text file in a format suitable for loading into other applications. Single point data is saved in a simple table. Multiple point per segment data is stored in columns with more than one entry per segment. The Emu R/Splus library includes routines to load these files directly (see matscan and read.trackdata).