function dud = keysigmatch(keysig,pth,mth) % dud = keysigmatch(keysig,pth,mth) % % keysigmatch takes in the key signal and the pitch and magnitude thresholds % and runs matches against every file in the below specified directory. It % uses the thresholds to determine if there was a match and prints out a % listing of results. % % ELEC 301 Project - "Mars Lander the Theologian", aka, "Speaker Verification" % Sara MacAlpine, Aamir Virani, Nipul Bharani, JP Slavinsky % WRC (OCEE) Class of 2001 - Fall '99 d = dir('sayproject'); %assuming the directory is here for i = 3:length(d), %positions 1 and 2 hold curr and prev dir so skip cd sayproject; %change to data directory sig = load(d(i).name); %load sig cd ..; %go back a directory to the m-files pitch = pitchmaster(keysig,sig); mag = magmaster(keysig,sig); pitchstr = num2str(pitch); magstr = num2str(mag); if (pitch-pth) > 0 & (mag-mth) > 0 disp([ 'Key and ', d(i).name, ' results: Pitch - ', pitchstr, ', Magnitude - ', magstr, ', **MATCH**']); else disp([ 'Key and ', d(i).name, ' results: Pitch - ', pitchstr, ', Magnitude - ', magstr, ', no match']); end end