Every Emu database is described by a database template. The template defines the kind of hierarchies which can be built for each utterance and the properties of the different kinds of files which make up an utterance. For the sample database we will first construct a simple template which allows access to the single level of phonetic labels which are already recorded for each utterance.
! definition of levels level Phonetic ! definition of label types at each level (this line not strictly ! needed, see text) label Phonetic Phonetic ! information about the format of label files labfile Phonetic :extension lab :format ESPS :time-factor 1000 ! location of files path lab /home/dbase/ path sd,fb /home/dbase/ ! definition of associations between tracks and file extensions track samples sd track fm fb ! configuration settings set PrimaryExtension lab |
This template file must be placed where Emu can find it. It should have the extension tpl and should be in one of the directories that Emu searches for these files. The default directories vary with each installation On Unix systems the default path includes the current directory, ~/.emu (that is the .emu directory in your home directory) and /usr/local/lib/emu for system wide template files. On Windows 95/NT systems all templates should be stored in the Emu installation directory (C:/Program Files/Emu by default). Note that these defaults can be changed when Emu is installed or by setting the environment variable EMU_TEMPLATE_PATH on Unix systems. See the section on the template path for more details. To experiment with a database, it should be sufficient to save the template file with the name test.tpl in ~/.emu on Unix, or in C:\Program Files\Emu on Windows 95/NT.
The example shows the database template for the sample database, we will cover it here section by section.
This section defines the levels at which segments or events that will be marked for utterances in the database. Each level represents a different kind of segment or event: in this case we will only be marking phonetic segments so there is only one level defined. More often in an Emu database there would be levels defined for segments such as phonemes, syllables and words.
See the section on Template Level Definitions for more details.
At each level there can be more than one kind of label associated with each segment or event. By default, one label type is automatically defined with the same name as the segment level, so, for example, the Phonetic level will have associated Phonetic labels. There could be other labels defined: for example, Word level segments might be labelled with the text and the syntactic class of the word. In the sample database we will use just the Phonetic labels which have already been marked and so no label definitions are really needed -- the label line has been included in the example as an illustration only (note that defining the default label type as we have done here will not produce an error).
See the section on Template Label Definitions for more details.
This section informs Emu about the presence of the external label files for some levels in the hierarchy. In our case we define the Phonetic labels as coming from files with a lab extension. Other properties of the label files can be specified -- in this case the files are in ESPS label file format and the label times are multiplied by 1000 to get milliseconds (ie they are in seconds).
See the section on Template Labfile Definitions for more details.
Here, the template provides search paths for each kind of file which will make up the database. In this example, we will store label files, sampled data (sd) files and formant (fb) files in the same directory, however the user is free to locate them separately. This is useful, for example, where sampled speech data is kept on CDROM while annotations are kept on the main disk. The path may contain multiple directories to search and may contain wildcard characters to match more than one directory. Using wildcards has implications for utterance names as covered in the section on Template Path Definitions. Each path statement can cover more than one extension, as shown in the second path statement above.
See the section on Template Path Definitions for more details.
Tracks are stored numerical speech data such as acoustic samples, jaw position traces or derived formant tracks. This section associates each track name with a file extension so that when Emu looks for a track it knows which file to look in. More than one track can be stored in a file using formats such as ESPS or the Emu SSFF format. The track name is normally also stored in the file header. Emu can read ESPS and SSFF format files for multidimensional data such as formants, and various formats of sampled speech data including at least SSFF and WAV format.
See the section on Template Track Definitions for more details.
Finally, the template allows the user to set arbitrary variables which can be used to configure the Emu tools or user defined scripts. Some variables are defined by the Emu core library, for example PrimaryExtension defines the default file extension to use when finding utterances in the database (ie. find all files in the path with this extension).
See the section on Template Variable Definitions for more details.