class IOHTK

Handles the standard binary sequence format in HTK.

Inheritance:


Public Fields

[more]HTKHeader* header
Contain the htk header informations

Public Methods

[more] IOHTK(const char* filename_, bool one_file_is_one_sequence_=false, int max_load_=-1, bool is_sequential_=false)
Reads the sequence contained in filename.
[more]static void saveSequence(XFile* file, Sequence* sequence, HTKHeader* header_)
Saves sequence in file using the HTK format
[more]char* parmKind2Str(ParmKind kind, char* buf)
HTK source code


Inherited from IOSequence:

Public Fields

oint n_sequences
oint frame_size

Public Methods

ovirtual int getNumberOfFrames(int t)
ovirtual void getSequence(int t, Sequence* sequence)
ovirtual int getTotalNumberOfFrames()


Inherited from Object:

Public Fields

oAllocator* allocator

Public Methods

ovoid addOption(const char* name, int size, void* ptr, const char* help="")
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="")
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="")
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
ovoid addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovoid setOOption(const char* name, Object* option)
ovirtual void loadXFile(XFile* file)
ovirtual void saveXFile(XFile* file)
ovoid load(const char* filename)
ovoid save(const char* filename)
ovoid* operator new(size_t size, Allocator* allocator_=NULL)
ovoid* operator new(size_t size, Allocator* allocator_, void* ptr_)
ovoid operator delete(void* ptr)


Documentation

Handles the standard binary sequence format in HTK.

oHTKHeader* header
Contain the htk header informations

o IOHTK(const char* filename_, bool one_file_is_one_sequence_=false, int max_load_=-1, bool is_sequential_=false)
Reads the sequence contained in filename. If one_file_is_one_sequence is false, getSequence() will return one sequence with one frame at each call. (If calling getSequence(t, foo), it will put in the sequence foo the frame corresponding to the line t of the file). Note also that if one_file_is_one_sequence is false, the access to the IO must be sequential when calling getSequence() if is_sequential is true. (Sequential mode is faster). If max_load_ is positive, it loads only the first max_load_ frames, if one_file_is_one_sequence is false. The file will be opened when reading the first sequence, and closed when reading the last one if is_sequential is true. Otherwise, the file will be opened and closed each time you call getSequence().

ostatic void saveSequence(XFile* file, Sequence* sequence, HTKHeader* header_)
Saves sequence in file using the HTK format

ochar* parmKind2Str(ParmKind kind, char* buf)
HTK source code


This class has no child classes.
Author:
Johnny Mariethoz (Johnny.Mariethoz@idiap.ch)
See Also:
IOBin

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.