function data = getspeech(fname)
%GETSPEECH  Load speech waveform from a .WAV file
%  Created for use by EE538, Fall 1998
%    data = getspeech('enf1s1t0.wav');
%  loads the speech portion of the named file.

%  T. Krauss and T. Charbonneau 8/31/98

if strcmp(computer,'PCWIN')
    fp=fopen(fname,'r','b');
else
   % fp=fopen(fname,'r');
    fp=fopen(fname,'r','b');
end
[data,length]=fread(fp,[1,1024],'char');
%  Limit the number of elements read to 16384 if Student Edition
if isstudent
   [data,length]=fread(fp,[1,16384],'short');
else
   [data,length]=fread(fp,[1,inf],'short');
end
fclose(fp)

