//System.out.println("spectrum seyz: frameSize: " + frameSize + " frameRate: " + frameRate +
// " fileFrameLength: " + fileFrameLength + " fileTimeLength: " + fileTimeLength +
// " framesPerPixel: " + framesPerPixel + " timePerPixel: " + timePerPixel + " w: " + w);
FeatFile fF = new FeatFile("small_chunks_temp.feat");
double currTime = localFirstEventTime;
String srcFileName = fCTD.srcFile;
for (int x = 0; x < w; x++)
{
FeatChunk fC = new FeatChunk(srcFileName, currTime, timePerPixel, null);
fF.chunks.add(fC);
currTime += timePerPixel;
}
try
{
fF.writeFile();
}
catch (IOException e1)
{
e1.printStackTrace();
}
Vector extractors = new Vector();
extractors.add(new AvgMelSpec());
FeatFile spectrumFeats = new FeatFile("temp.feat");
FeatExtractor fE = new FeatExtractor(fF, spectrumFeats, extractors);
fE.setProgress(progress);
try
{
fE.setup();
fE.processFeatFiles();
}
catch (Exception e)
{
e.printStackTrace();
}
int elementsPerFeature[] = { 0 };
elementsPerFeature = spectrumFeats.getFeatureLengths();
featureSize = elementsPerFeature[0];
featureNumber = 0;
shortEvents = spectrumFeats.chunks;