next up previous contents index
Next: 4.10 Summary Up: 4 The Operating Environment Previous: 4.8 Input/Output via Pipes and Networks

4.9 Byte-swapping of HTK data files

 

      Virtually all HTK tools can read and write data to and from binary files. The use of binary format as opposed to text can speed up the performance of the tools and at the same time reduce the file size when manipulating large quantities of data. Typical binary files used by the HTK tools are speech waveform/parameter files, binary master model files (MMF), binary accumulator files used in HMM parameter estimation and binary lattice files. However, the use of binary data format often introduces incompatibilities between different machine architectures due to the different byte ordering conventions used to represent numerical quantities. In such cases, byte swapping of the data is required. To avoid incompatibilities across different machine architectures, all HTK binary data files are written out using big-endian (NONVAX) representation of numerical values. Similarly, during loading HTK binary format files are assumed to be in NONVAX byte order. The default behavior can be altered using the configuration parameters NATURALREADORDER and NATURALWRITEORDER. Setting NATURALREADORDER to true will instruct the HTK tools to interpret the binary input data in the machine's natural byte order (byte swapping will never take place). Similarly, setting NATURALWRITEORDER to true will instruct the tools to write out data using the machine's natural byte order. The default value of these two configuration variables is false which is the appropriate setting when using HTK in a multiuple machine architecture environment. In an environment comprising entirely of machines with VAX byte order both configuration parameters can be set true which will disable the byte swapping procedure during reading and writing of data.


next up previous contents index
Next: 4.10 Summary Up: 4 The Operating Environment Previous: 4.8 Input/Output via Pipes and Networks

ECRL HTK_V2.1: email [email protected]