// file: dec_sil_1.cc
//

// isip include files
//
#include "decoder.h"
#include "decoder_constants.h"
 
// method: find_sil_cc
//
// arguments: none
//
// return: logical_1 indicating status
//
// this method finds the silence model index
//
logical_1 Decoder::find_sil_cc() {
  
  // create the sil phone
  //
  int_4* phn = new int_4[cd_size_d];

  // if this is a context dependent mode create sp triphone
  //
  if (context_mode_d != DEC_MONO_PHONE_MODE) {
    phn[0] = (int_4)0;
    phn[1] = DEC_SILENCE_PHONE;
    phn[2] = (int_4)0;
  }

  // otherwise use the monophone
  //
  else {
    phn[0] = DEC_SILENCE_PHONE;
  }
  
  // get the model index
  //
  sil_model_d = get_model_index_cc(phn);
    
  // free memory
  //
  delete [] phn;
  phn = (int_4*)NULL;

  // exit gracefully
  //
  return ISIP_TRUE;
}
