Clear Filters
Clear Filters

open wav file error

8 views (last 30 days)
The on 14 Mar 2013
Commented: zaYy Nab on 9 May 2017
When i try to open a wav file, i got this error:
Error using wavread (line 67)
Invalid Wave File. Reason: Cannot open file.
Error in gui>Open_Callback (line 125)
Error in gui_mainfcn (line 96)
Error in gui (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
Error while evaluating uimenu Callback
my code:
function Open_Callback(hObject, eventdata, handles)
global pl;
global sf;
[M N] = size(mySong);
axis([1 M min(mySong) max(mySong)]);
  1 Comment
zaYy Nab
zaYy Nab on 9 May 2017
Invalid wave file error (line 67)occur because matlab supports specific format of audio file i-e PCM . first convert your audio from mp3 to pcm then place into current directory and run the program

Sign in to comment.

Accepted Answer

ChristianW on 14 Mar 2013
The on 17 Mar 2013
I tried 2 different wav files. They give this error:
Undefined function 'auidoplayer' for input arguments of type 'double'.
Error in gui>Open_Callback (line 131) pl=auidoplayer(mySong,sf);
Image Analyst
Image Analyst on 17 Mar 2013
I thought this was marked as solved. Maybe you want audioplayer instead of auidoplayer.

Sign in to comment.

More Answers (2)

Youssef  Khmou
Youssef Khmou on 14 Mar 2013
hi, take that file into directory ...\Documents\MATLAB :

Image Analyst
Image Analyst on 14 Mar 2013
You didn't construct the full filename properly. Use the fullfile() function:
fullFileName = fullfile(PathName, FileName);
[mySong, sf] = wavread(fullFileName);


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!