i am trying to read the .wav file through "wavread" giving path of wave using following code but it always give error 67(i-e ??? Error using ==> wavread at 67 Cannot open file)
2 次查看(过去 30 天)
显示 更早的评论
[FileName,PathName] = uigetfile('AUD-20150716-WA0032.wav');
PathOriginal=sprintf('%s%s',C:\Users\Downloads,AUD-20150716-WA0032);
[xt,fs]=wavread('C:\Users\Downloads');
please help anyone ???
0 个评论
采纳的回答
Walter Roberson
2015-7-22
编辑:Walter Roberson
2015-7-22
[FileName,PathName] = uigetfile('AUD-20150716-WA0032.wav');
PathOriginal = fullfile(PathName, FileName);
[xt,fs] = wavread(PathOriginal);
Or, along the lines that B.k Sumedha suggests:
PathOriginal = fullfile('C:\Users\Downloads', 'AUD-20150716-WA0032.wav');
[xt, fs] = wavread(PathOriginal);
The difference between these two is that the second one has a fixed file name, whereas the first one allows the users to navigate to other locations to pick a file.
更多回答(1 个)
B.k Sumedha
2015-7-22
You can directly use
y = wavread('filename')
y = wavread('filename') loads a WAVE file specified by the string filename, returning the sampled data in y. The .wav extension is appended if no extension is given. Amplitude values are in the range [-1,+1].
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!