public double run(){
  try {
    AudioInputStream inInput=AudioSystem.getAudioInputStream(files[0]);
    AudioFeature audioFeatureInput=(AudioFeature)featureExtractorInput.calculate(inInput);
  }
 catch (  Exception e) {
  }
  double avgDistance=0;
  for (int i=0; i < arrayFeatureExtractorTrainSet.size(); i++) {
    double distance2DB=audioThreadDistance(featureExtractorInput.getMFCC(),arrayFeatureExtractorTrainSet.get(i));
    Log.i("size","Different distance " + distance2DB);
    avgDistance+=distance2DB;
  }
  Log.i("size","average distance " + (avgDistance / arrayFeatureExtractorTrainSet.size()));
  return avgDistance / arrayFeatureExtractorTrainSet.size();
}

public double run ( ) { try { AudioInputStream inInput = AudioSystem . getAudioInputStream ( files [ 0 ] ) ; AudioFeature audioFeatureInput = ( AudioFeature ) featureExtractorInput . calculate ( inInput ) ; } catch ( Exception e ) { } double avgDistance = 0 ; for ( int i = 0 ; i < arrayFeatureExtractorTrainSet . size ( ) ; i ++ ) { double distance2DB = audioThreadDistance ( featureExtractorInput . getMFCC ( ) , arrayFeatureExtractorTrainSet . get ( i ) ) ; Log . i ( "size" , "Different distance " + distance2DB ) ; avgDistance += distance2DB ; } Log . i ( "size" , "average distance " + ( avgDistance / arrayFeatureExtractorTrainSet . size ( ) ) ) ; return avgDistance / arrayFeatureExtractorTrainSet . size ( ) ; }
starts processing the feature extraction batch job .
