How to play Audio File
Show older comments
A= testing;
B= [ten;
twenty;
fifty;
hundered;
fivehundered;
thousand];
G={'ten';
'twenty';
'fifty';
'hundered';
'five_hundered';
'thousand'};
class=knnclassify(A,B,G);
disp(class);
pathss=class
for index = 1:numel(pathss)
temp=pathss{index}
end
% [rows]=testing;
% for i=1:rows
if (temp=='ten')
a=wavread('stopsign.wav');
wavplay(a,44100);
% end
% end
% TF=strcmp(temp,ten)
% for index = 1:numel(pathss)
% temp1=pathss{index}
%
elseif (temp=='twenty')
a=wavread('crossroad.wav');
wavplay(a,44100);
elseif (temp=='fifty')
a=wavread('crossroad.wav');
wavplay(a,44100);
elseif (temp=='hundered')
a=wavread('crossroad.wav');
wavplay(a,44100);
elseif (temp=='five_hundered')
a=wavread('crossroad.wav');
wavplay(a,44100);
elseif (temp=='thousand')
a=wavread('crossroad.wav');
wavplay(a,44100);
end
end
This is a knnclassifer which i am using.It gets classifed into correct group but the audio file doesnt play.Whats the problem in here?
Accepted Answer
More Answers (0)
Categories
Find more on Audio I/O and Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!