private void initVocoder(int mcep_order,int mcep_vsize,HMMData htsData){
  stage=htsData.getStage();
  gamma=htsData.getGamma();
  use_log_gain=htsData.getUseLogGain();
  fprd=htsData.getFperiod();
  rate=htsData.getRate();
  rand=new Random(SEED);
  C=new double[mcep_order];
  CC=new double[mcep_order];
  CINC=new double[mcep_order];
  if (stage == 0) {
    int vector_size=(mcep_vsize * (3 + PADEORDER) + 5 * PADEORDER + 6) - (3 * (mcep_order));
    D1=new double[vector_size];
    pt2=(2 * (PADEORDER + 1)) + (PADEORDER * (mcep_order + 1));
    for (int i=PADEORDER; i >= 1; i--)     pt3[i]=(2 * (PADEORDER + 1)) + ((i - 1) * (mcep_order + 1));
  }
 else {
    int vector_size=((mcep_vsize + 1) * (stage + 3)) - (3 * (mcep_order));
    D1=new double[vector_size];
  }
  p1=-1;
  pc=0.0;
}

private void initVocoder ( int mcep_order , int mcep_vsize , HMMData htsData ) { stage = htsData . getStage ( ) ; gamma = htsData . getGamma ( ) ; use_log_gain = htsData . getUseLogGain ( ) ; fprd = htsData . getFperiod ( ) ; rate = htsData . getRate ( ) ; rand = new Random ( SEED ) ; C = new double [ mcep_order ] ; CC = new double [ mcep_order ] ; CINC = new double [ mcep_order ] ; if ( stage == 0 ) { int vector_size = ( mcep_vsize * ( 3 + PADEORDER ) + 5 * PADEORDER + 6 ) - ( 3 * ( mcep_order ) ) ; D1 = new double [ vector_size ] ; pt2 = ( 2 * ( PADEORDER + 1 ) ) + ( PADEORDER * ( mcep_order + 1 ) ) ; for ( int i = PADEORDER ; i >= 1 ; i -- ) pt3 [ i ] = ( 2 * ( PADEORDER + 1 ) ) + ( ( i - 1 ) * ( mcep_order + 1 ) ) ; } else { int vector_size = ( ( mcep_vsize + 1 ) * ( stage + 3 ) ) - ( 3 * ( mcep_order ) ) ; D1 = new double [ vector_size ] ; } p1 = - 1 ; pc = 0.0 ; }
the initialisation of vocodersetup should be done when there is already information about the number of feature vectors to be processed , size of the mcep vector file , etc .
