function [ data, par ] = my_htk_read( input_filename )
  
  if nargin < 1
    error( [ mfilename ' needs 1 input argument.' ] );
  end

  fid = fopen( input_filename, 'r', 'ieee-be' );
  
  if fid < 0
    error( [ mfilename ' could not read-open file "' input_filename '".' ] );
  end
  
  % Read 12-byte HTK header
  
  par.n_frames = fread( fid, 1, 'int32' );
  
  
  par.period = fread( fid, 1, 'int32' );
  par.FRAME_SHIFT_SEC = par.period * 1e-7;
  
  
  par.size_of_sample = fread( fid, 1, 'int16' );
  par.DATA_DIMENSION = par.size_of_sample / 4;
  
  
  par.HTK_Type = fread( fid, 1, 'int16' );
  
  
  % Read the data
  
  data = fread( fid, [ par.DATA_DIMENSION   par.n_frames ], 'float32' );
  
  
  fclose( fid );
  