Hi everyone I am trying to read .wav files in a loop. names of wav files are written in .txt file. The problem is that when i run my code it sometimes works fine but sometimes it give error
??? Error using ==> wavread at 67 Cannot open file.
Error in ==> Main at 9 [y,fs1] = wavread(name);
I have tried everything but cant figure out the problem. I have checked all wav files manually by using same function i.e. wavread on command window, it runs fine there. but same time it dont ru in my code. remember, it generates the error after reading quite a few files. here's my code:
Mul13=[];
fs=16000;
input_code = textread('WordsN.txt','%s','whitespace',' \t\n\r');
len = length(input_code);
for lenth=1:len
name = char(input_code(lenth));
[y,fs1] = wavread(name);
c = melcepst(y,fs);
[c,g,j,gg] = kmeans(c,10);
c=c(:);
Mul13 = [Mul13 c];
end
can anyone help me??? need it urgently :(