marytts.signalproc.adaptation.codebook
Class WeightedCodebookFile

java.lang.Object
  extended by marytts.signalproc.adaptation.codebook.WeightedCodebookFile

public class WeightedCodebookFile
extends java.lang.Object

A class for handling file I/O of binary weighted codebook files

Author:
Oytun Türk

Field Summary
 java.lang.String currentFile
           
static java.lang.String DEFAULT_EXTENSION
           
static int NOT_OPENED
           
static int OPEN_FOR_READ
           
static int OPEN_FOR_WRITE
           
 MaryRandomAccessFile stream
           
 
Constructor Summary
WeightedCodebookFile()
           
WeightedCodebookFile(java.lang.String codebookFile)
           
WeightedCodebookFile(java.lang.String codebookFile, int desiredStatus)
           
 
Method Summary
 void close()
           
 void incrementTotalEntries()
           
 WeightedCodebook readCodebookFile()
           
 WeightedCodebook readCodebookFile(java.lang.String codebookFile)
           
 void readCodebookFileExcludingHeader(WeightedCodebook codebook)
           
 WeightedCodebookFileHeader readCodebookHeader()
           
static WeightedCodebookFileHeader readCodebookHeader(MaryRandomAccessFile ler)
           
 WeightedCodebookFileHeader readCodebookHeader(java.lang.String codebookFile, boolean bCloseAfterReading)
           
 WeightedCodebookEntry readEntry(int lpOrder, int mfccDimension)
           
 void WriteCodebookFile(java.lang.String codebookFile, WeightedCodebook codebook)
           
 void writeCodebookHeader(MaryRandomAccessFile ler, WeightedCodebookFileHeader header)
           
 MaryRandomAccessFile writeCodebookHeader(java.lang.String codebookFile, WeightedCodebookFileHeader header)
           
 MaryRandomAccessFile writeCodebookHeader(WeightedCodebookFileHeader header)
           
 void writeEntry(WeightedCodebookEntry w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_OPENED

public static int NOT_OPENED

OPEN_FOR_READ

public static int OPEN_FOR_READ

OPEN_FOR_WRITE

public static int OPEN_FOR_WRITE

stream

public MaryRandomAccessFile stream

currentFile

public java.lang.String currentFile

DEFAULT_EXTENSION

public static final java.lang.String DEFAULT_EXTENSION
See Also:
Constant Field Values
Constructor Detail

WeightedCodebookFile

public WeightedCodebookFile()

WeightedCodebookFile

public WeightedCodebookFile(java.lang.String codebookFile)

WeightedCodebookFile

public WeightedCodebookFile(java.lang.String codebookFile,
                            int desiredStatus)
Method Detail

close

public void close()

readCodebookHeader

public WeightedCodebookFileHeader readCodebookHeader(java.lang.String codebookFile,
                                                     boolean bCloseAfterReading)

readCodebookHeader

public WeightedCodebookFileHeader readCodebookHeader()

readCodebookHeader

public static WeightedCodebookFileHeader readCodebookHeader(MaryRandomAccessFile ler)
                                                     throws java.io.IOException
Throws:
java.io.IOException

writeCodebookHeader

public MaryRandomAccessFile writeCodebookHeader(java.lang.String codebookFile,
                                                WeightedCodebookFileHeader header)

writeCodebookHeader

public MaryRandomAccessFile writeCodebookHeader(WeightedCodebookFileHeader header)

writeCodebookHeader

public void writeCodebookHeader(MaryRandomAccessFile ler,
                                WeightedCodebookFileHeader header)
                         throws java.io.IOException
Throws:
java.io.IOException

readCodebookFile

public WeightedCodebook readCodebookFile()
                                  throws java.io.IOException
Throws:
java.io.IOException

readCodebookFile

public WeightedCodebook readCodebookFile(java.lang.String codebookFile)
                                  throws java.io.IOException
Throws:
java.io.IOException

readCodebookFileExcludingHeader

public void readCodebookFileExcludingHeader(WeightedCodebook codebook)

WriteCodebookFile

public void WriteCodebookFile(java.lang.String codebookFile,
                              WeightedCodebook codebook)

writeEntry

public void writeEntry(WeightedCodebookEntry w)

readEntry

public WeightedCodebookEntry readEntry(int lpOrder,
                                       int mfccDimension)

incrementTotalEntries

public void incrementTotalEntries()