public void writeIntoSPTKLF0File(String sptkFileName) throws IOException {
  LEDataOutputStream lf0Data=new LEDataOutputStream(new BufferedOutputStream(new FileOutputStream(sptkFileName)));
  for (int i=0; i < this.contour.length; i++) {
    double f0Val=contour[i];
    if (contour[i] == 0.0f) {
      lf0Data.writeFloat(NEGATIVE_MAXIMUM);
    }
 else {
      lf0Data.writeFloat((float)Math.log(contour[i]));
    }
  }
  lf0Data.flush();
  lf0Data.close();
}

public void writeIntoSPTKLF0File ( String sptkFileName ) throws IOException { LEDataOutputStream lf0Data = new LEDataOutputStream ( new BufferedOutputStream ( new FileOutputStream ( sptkFileName ) ) ) ; for ( int i = 0 ; i < this . contour . length ; i ++ ) { double f0Val = contour [ i ] ; if ( contour [ i ] == 0.0f ) { lf0Data . writeFloat ( NEGATIVE_MAXIMUM ) ; } else { lf0Data . writeFloat ( ( float ) Math . log ( contour [ i ] ) ) ; } } lf0Data . flush ( ) ; lf0Data . close ( ) ; }
write contour into a lf0 file in sptk format
