public void readMixedExcitationFilters(InputStream mixFiltersStream) throws IOException {
  String line;
  Vector<Double> taps=new Vector<Double>();
  Scanner s=null;
  int i, j;
  try {
    s=new Scanner(new BufferedReader(new InputStreamReader(mixFiltersStream,"UTF-8")));
    s.useLocale(Locale.US);
    Log.d(Mary.LOG,"reading mixed excitation filters");
    while (s.hasNext("#")) {
      line=s.nextLine();
    }
    while (s.hasNextDouble())     taps.add(s.nextDouble());
  }
  finally {
    if (s != null) {
      s.close();
    }
  }
  orderFilters=taps.size() / numFilters;
  mixFilters=new double[numFilters][orderFilters];
  int k=0;
  for (i=0; i < numFilters; i++) {
    for (j=0; j < orderFilters; j++) {
      mixFilters[i][j]=taps.get(k++);
    }
  }
  Log.d(Mary.LOG,"initMixedExcitation: loaded filter taps");
  Log.d(Mary.LOG,"initMixedExcitation: numFilters = " + numFilters + "  orderFilters = "+ orderFilters);
}

public void readMixedExcitationFilters ( InputStream mixFiltersStream ) throws IOException { String line ; Vector < Double > taps = new Vector < Double > ( ) ; Scanner s = null ; int i , j ; try { s = new Scanner ( new BufferedReader ( new InputStreamReader ( mixFiltersStream , "UTF-8" ) ) ) ; s . useLocale ( Locale . US ) ; Log . d ( Mary . LOG , "reading mixed excitation filters" ) ; while ( s . hasNext ( "#" ) ) { line = s . nextLine ( ) ; } while ( s . hasNextDouble ( ) ) taps . add ( s . nextDouble ( ) ) ; } finally { if ( s != null ) { s . close ( ) ; } } orderFilters = taps . size ( ) / numFilters ; mixFilters = new double [ numFilters ] [ orderFilters ] ; int k = 0 ; for ( i = 0 ; i < numFilters ; i ++ ) { for ( j = 0 ; j < orderFilters ; j ++ ) { mixFilters [ i ] [ j ] = taps . get ( k ++ ) ; } } Log . d ( Mary . LOG , "initMixedExcitation: loaded filter taps" ) ; Log . d ( Mary . LOG , "initMixedExcitation: numFilters = " + numFilters + "  orderFilters = " + orderFilters ) ; }
initialisation for mixed excitation : it loads the filter taps , they are read from mixfilterfile specified in the configuration file .
