public void read(MaryRandomAccessFile ler) throws IOException { totalEntries = ler.readInt(); lsfParams = new LsfFileHeader(); lsfParams.readHeader(ler); ptcParams = new PitchFileHeader(); ptcParams.readPitchHeader(ler); energyParams = new EnergyFileHeader(); energyParams.read(ler, true); mfccParams.readHeader(ler); codebookType = ler.readInt(); numNeighboursInFrameGroups = ler.readInt(); numNeighboursInLabelGroups = ler.readInt(); int tagLen = ler.readInt(); sourceTag = String.copyValueOf(ler.readChar(tagLen)); tagLen = ler.readInt(); targetTag = String.copyValueOf(ler.readChar(tagLen)); vocalTractFeature = ler.readInt(); }
public void write(MaryRandomAccessFile ler) throws IOException { ler.writeInt(totalEntries); lsfParams.writeHeader(ler); ptcParams.writePitchHeader(ler); energyParams.write(ler); mfccParams.writeHeader(ler); ler.writeInt(codebookType); ler.writeInt(numNeighboursInFrameGroups); ler.writeInt(numNeighboursInLabelGroups); int tagLen = sourceTag.length(); ler.writeInt(tagLen); ler.writeChar(sourceTag.toCharArray()); tagLen = targetTag.length(); ler.writeInt(tagLen); ler.writeChar(targetTag.toCharArray()); ler.writeInt(vocalTractFeature); }