can anybody help me with this code error ?
이전 댓글 표시
I have this code for voice recognition and when I run it I get error :
--------------
Error using wavread (line 66)
Invalid Wave File. Reason: Cannot open file.
Error in Untitled2 (line 16)
[t, fs] = wavread (file);
------------------------
This is the code I have : attached
댓글 수: 1
Adam
2015년 11월 25일
The error seems fairly self-explanatory and suggests the code is fine, but your wav file is in the wrong format or corrupted or, for some other reason cannot be read by wavread.
wavread no longer exists in R2015b apparently so I assume you are using an earlier version of Matlab.
답변 (1개)
Walter Roberson
2015년 11월 25일
Your code
file = sprintf ('%s%d.wav','rec',j);
path='rec1.wav';
file=cat(2,path,file);
is going to create the file name 'rec1.wavrec1.wav' which does not exist.
You wrote the file without using any path, so do not use a path when creating the name to read it from.
카테고리
도움말 센터 및 File Exchange에서 Speech Recognition에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!