int uttSize = 0;
int unitEntry;
int unitStart;
int unitEnd;
SampleSet sts = (SampleSet) utterance.getObject("sts_list");
lpcResult = new LPCResult();
for (Item unit = utterance.getRelation(Relation.UNIT).getHead();
unit != null; unit = unit.getNext()) {
unitEntry = unit.getFeatures().getInt("unit_entry");
unitStart = unit.getFeatures().getInt("unit_start");
unitEnd = unit.getFeatures().getInt("unit_end");
uttSize += sts.getUnitSize(unitStart, unitEnd);
pitchmarks += unitEnd - unitStart;
unit.getFeatures().setInt("target_end", uttSize);
}
lpcResult.resizeFrames(pitchmarks);
pitchmarks = 0;
uttSize = 0;
int[] targetTimes = lpcResult.getTimes();
for (Item unit = utterance.getRelation(Relation.UNIT).getHead();
unit != null; unit = unit.getNext()) {
unitEntry = unit.getFeatures().getInt("unit_entry");
unitStart = unit.getFeatures().getInt("unit_start");
unitEnd = unit.getFeatures().getInt("unit_end");
for (int i = unitStart; i < unitEnd; i++,pitchmarks++) {
uttSize += sts.getSample(i).getResidualSize();
targetTimes[pitchmarks] = uttSize;
}
}
utterance.setObject("target_lpcres", lpcResult);
}