Started code for DSP final project
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Either load in an ascii .dat file or
|
||||
% uses wavread to read a wave file
|
||||
% function [speechData] = load_or_audioread(speechFile)
|
||||
% speechfile in quotes
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
function [speechData] = load_or_audioread(speechFile)
|
||||
|
||||
% The speech file is loaded
|
||||
if (ischar(speechFile))
|
||||
if(strcmpi(speechFile(end-3:end),'.dat'))
|
||||
speechData = load(speechFile);
|
||||
elseif(strcmpi(speechFile(end-3:end),'.wav'))
|
||||
speechData = audioread(speechFile);
|
||||
end
|
||||
elseif (isnumeric(speechFile))
|
||||
speechData = speechFile;
|
||||
end
|
||||
Reference in New Issue
Block a user