problems with matlab wavrecord and wavread

Posted by user504363 on Stack Overflow See other posts from Stack Overflow or by user504363
Published on 2010-12-22T18:51:05Z Indexed on 2010/12/22 18:54 UTC
Read the original article Hit count: 226

Filed under:
|

Hi all

I have a problem in matlab

I want to record a speech for 2 seconds then read the recorded sound and plot it

I use the code

FS = 8000;    
new_wav = wavrecord(2*FS,FS,'int16');
x = wavread(new_wav);
plot(x);

but the error appears

??? Error using ==> fileparts at 20
Input must be a row vector of characters.

Error in ==> wavread>open_wav at 193
[pat,nam,ext] = fileparts(file);

Error in ==> wavread at 65
[fid,msg] = open_wav(file);

Error in ==> test at 2
x = wavread(new_wav);

I plotted correctly recorded sound files, but when I want to record new one through matlab I get this errors.

I tried many ways by changing FS and 'int16' but nothing happens.

thanks

© Stack Overflow or respective owner

Related posts about matlab

Related posts about voice-recognition