next up previous contents index
Next: 4.9 Byte-swapping of HTK data files Up: 4 The Operating Environment Previous: 4.7 Memory Management

4.8 Input/Output via Pipes and Networks

 

Most types of file in HTK can be input or output via a pipe  instead of directly from or to disk. The mechanism for doing this is to assign the required input or output filter  command to a configuration parameter or to an environment variable, either can be used. Within this command, any occurrence of the dollar symbol $ will be replaced by the name of the required file. The output of the command will then be input to or output from the HTK tool via a pipe. 

For example, the following command will normally list the contents of the speech waveform file spfile

    HList spfile
However, if the value of the environment variable HWAVEFILTER is set as follows
    setenv HWAVEFILTER 'gunzip -c $'
then the effect is to invoke the decompression filter  gunzip with its input connected to the file spfile and its output connected to HLIST via a pipe. Each different type of file has a unique associated variable so that multiple input and/or filters can be used. The full list of these is given in the summary section at the end of this chapter.

HTK is often used to process large amounts of data and typically this data is distributed across a network. In many systems, an attempt to open a file can fail because of temporary network glitches. In the majority of cases, a second or third attempt to open the file a few seconds later will succeed and all will be well. To allow this to be done automatically, HTK tools can be configured to retry opening a file several times before giving up. This is done simply by setting the configuration parameter MAXTRYOPEN  to the required number of retriesgif.   


next up previous contents index
Next: 4.9 Byte-swapping of HTK data files Up: 4 The Operating Environment Previous: 4.7 Memory Management

ECRL HTK_V2.1: email [email protected]